Quantcast
Channel: LabVIEW topics
Viewing all 66767 articles
Browse latest View live

Intersection of two arbitrary 2D lines

$
0
0

Hello,

 

I have a program (attached) which samples a height from two intensity graphs, creates a contour for each, and finds the intersection between these two contours. To do this I simply "brute force" by finding the distance from each point on one contour to each point on the other contour and save the values corresponding to the smallest distance. I'd like this process to be as fast as possible, and I'm sure there exists a much more elegant solution. Can anyone point me in the right direction? Unfortunately the contours are not necessarily the same size and do not share axis values, so I don't believe I can subtract one from the other and find the minimum.

 

Additionally I'd like to perform a check for the input intensity graphs (this will be variable in my application) which plots some ammount of contours along each graphs' range (see Contour Graph 2) and reports if any contour from Intensity Graph 1 intersects more than once with any contour from Intensity Graph 2

 

I'm working with LabVIEW 2015 SP1 32 bit. Any advice is appreciated! Thank you


Sensirion ek-h4 / Humidity Sensor SHT21 - Error 1386

$
0
0

Hi,

 

I was using the Sensirion ek-h5 before and because of your help (Link) I could make it work with my LabVIEW program.

 

Now I switched to the ek-h4 and I was happy to see a LabVIEW GUI (Link) from Sensirion. However, the program does not work at all, I always get the error 1386 (see attachment).

The constructor node in the SubVI "CreateReferences_EKH4.vi" causes the problem and I found this similar thread: Link

However, I could not make it work after several hours of trying (I'm kind of beginner in LabVIEW).

Also the Sensirion does not seem to start (black display) as I start the LabVIEW program.

With the viewer software from Sensirion (V2) it worked for me.

 

I am using Windows 7 and LabVIEW 2015.

If you need any additional information please let me know.

 

I welcome your help a lot.

Thanks,

Tobias

 

Programmatically changing scales for multiple graphs on different tabs

$
0
0

I'm creating a data viewer that plots various sets of data collected from a piece of hardware into multiple XY graphs. The graphs are on different tabs. When the user zooms in on the x-axis of one graph, all graphs are supposed to update, so that the user can jump from tab to tab and be looking at the same time period for each set of data.

 

Here's where I encounter a problem: when I upload the data to all of the graphs, and then zoom in on one graph, none of the other graphs zoom in unless I've already looked at them. If I click through all the tabs (so that all graphs have been viewed), and then zoom in on any one graph, every other graph updates to match the new x-axis max and min. If I only clicked through the first two tabs before zooming on one of them, the first two graphs would have matching x-axis maxs and mins, but any graphs on tabs not viewed would still be zoomed all the way out to show the full x-axis.

 

I created a pared down sample program that illustrates this issue, and attached it here. I simulated the uploading of data by placing a "Populate Graphs" button that puts random data in a graph on each of four tabs.

 

To mimic the issue:

  1. Press the "Populate Graphs" button
  2. View a tab or two
  3. Zoom in on a section of the graph
  4. Look at all tabs and notice that any previously viewed match the zoomed graph x-axis, but the others are still zoomed out
  5. Zoom in on any one graph again
  6. Look at all tabs and see that now all the graphs have the same zoomed x-axis.

I also placed a "Clear Graphs" button to illustrate that each time you "upload" new data, the problem starts over anew.

 

Can anyone tell me if there is something I'm doing wrong here, or if there's a work-around? Other than programmatically flipping through every tab after every data upload?

 

Thanks in advance!

Setting up RFID system

$
0
0

Hi all,

 

My situation currently is setting up proper communication between the Arduino and a UHF reader/ writer.

I am using

 

-Arduino Mega 2560

-Arduino compatible Compiler for LabVIEW

-Reader “CF-RU5106”

-Shield for Serial communication “RS232”

 

Tested the Arduino Compiler for LabVIEW and it works. I set up serial settings, and now starting to create serial instances for data flow. One mistake I made is that I totally forgot to take into consideration of the CRC-16. I tried setting up CRC computation code provided by the manufacturer using Formula Node in LabVIEW but was unsuccessful.

 

Any feedback or suggestions is much appreciated.

How to plot BER vs SNR graph for BPSK modulation in LabVIEW with Tx and Rx as USRP 2932

$
0
0

Hello

 

I wanted to know how we can plot a graph between BER and SNR for modulation techniques likes BPSK. I am using two USRP 2932, one as TX and another as Rx.

 

Thanks

Best way to pass data between parallel VIs and don't get race conditions?

$
0
0

Hi!

 

I need to transfer data between different levels of my architecture:

  • top level: GUI and overall program control
  • middle level: process control
  • low level: instrument control

All my levels incorporate state machines with a consumer/producer architecture with queues.

I pass messages and message data from top to bottom with queues, that works just fine.

 

But I don't know if queues are the best option to pass data back up the hierarchy.

Top down it is easy: The lower VIs wait (or run a default case) until some message is received (start process 1, turn motor on etc.).

But bottom up is not so clear: The higher level VIs, especially the GUI, need to be responsive to user input, so I really don't want to insert new messages (or cases) that would fiddle with the overall program flow just to get a status update from an instrument.

Currently I read the instrument statii with globals, but I want to change that.

I thought about FGVs, but then I read this:

http://labviewjournal.com/2011/08/race-conditions-and-functional-global-variables-in-labview/

 

It seems to me that FGVs don't automatically avoid race conditions?

Maybe I should stick to queues, or is there some other better option?

Mouse click on hidden/transparent FP

$
0
0

Hi all,

 

So I'm working on making a certain vi a remote panel. However this vi is quite complex with a lot of property nodes events which makes remote panel connection can be a bit unreliable cross-site because of the amount of data being transferred. What i'm trying to do to solve this is use a secondary vi that grabs an image of the first vi's front panel at a given frequency so that any changes are seen with out having to send too much data back and forth between the server and client. Basically all we should see is the change in pixels. When a user clicks on the image on this secondary vi i would like to simulate a click on the first vi at the same co-ordinates which should give me full control. I would use the secondary vi as the remote panel instead. I'm guessing this is how remote desktop would work?

 

I have looked into simulating mouse click events using the User32.dll and it works great > http://digital.ni.com/public.nsf/allkb/9BB3211F3469623649257360000E272C

 

However my problem is that this vi may not be the top vi or may be transparent at times. So my question is, is there a way of simulating a mouse click on a specific vi even if its not on top or hidden?

 

This idea may be too crazy to work and in that case any suggestions are welcome.

 

Thanks in advance.

Plotting a graph with array values

$
0
0

I have a 2D array. The first colum is the X axis values and the other 4 colums each Y axis .

 

How can i plot such a graph?   A graph with 1 X axis and 4 Y axis sca


How to remove Distortion in Image taken by camera?

$
0
0

Hello , 

I am using Ni Vision for Object detection and want to do coordinate alignement. Currenly I am considering XY coorinate only.

My camera is Mounted on fixed position, But I am facing problem regaring to coordinate alignment. 

Object which are near to center point of camera are aligned good with world coordinate but object, which are bit far from center of camera has some difference in (cm). I guess this is because of camera lens distortion so called barrel distortion.

Is there any way to correct or remove this distortion from the image??

I had seen some vi called perspective calibrartion vi, but I am bit confuse that how to use it, or may be there is some other solution to overcome this problem.

 

Thank you very much in advance.

 

Regards, 

Ankit Ramani.

 

create image from string

$
0
0

Hi,

For my project I have to receive an image via tcp from another computer, the sender sends me a string like this:

'0  255    0  255  255  255  255  255    0  255    0  255  255  255  255  255    0  255    0  255  255  255  255  255'

 in which every value is the pixel intensity of a greyscale image that I have to recreate, how can i do that knowing the size of image?

 

I have Labview 2016 with vision tollbox

Time Based Progress Bar

$
0
0

Hello all,

 

Has anyone got any ideas on how to implement a time-based progress bar?

 

For example if I have a while loop with a wait of 5 seconds the progress bar will fill accordingly and reset on the next loop? 

 

Examples I have previously seen usualy rely on a for loop with a defined number of iterations rather than time.

 

Cheers!

Event Structure & Add Stop priority during a process

$
0
0

Hi all,

In my program, I use an event structure and during a process, I want to add Stop Emergency button.

How can I do ?

Thanks

HP E1411B not showing in NI-MAX

$
0
0

Hi,

I am trying to use a HP E1411B multimeter in a Racal 1261B vxi mainframe. I have the Racal resource controller in slot 1 and a racal card  in slot 3. The Racal card works fine and I can control it in Labview through the bpib. The HP E1411 card however, is not recognised no matter what slot or secondary address I set it at. The screenshots attached is what I get when I run NI-MAX.  As well as the ni drivers shown in one of the screen shots I  have also run the vxi driver for the E1411b called driver_vxipnp_E1411_a_02_17.exe available at -> ftp://ftp.keysight.com/mpusup/VXI_PnP_WOW64/Released%20VXI%20Plug&Play%20Drivers/

My pc runs windows 7 64 bit.

I read on another post that the passport in the Tools ->NI Visa -> visa options of MAX needs to have the line Enable NI-VISA passport for Tupil. I ticked this box but the instrument still didn't show. This tulip option is only for 32bit systems so I'm not sure if that's a problem given my os is 64 bit.??

Opining VI problem

$
0
0

Hi

 When I download any VI from internet and i want to open it from my PC whith labview 2013 i 'm always got these screen as attacvhed which repeated for many times and finally when the VI  opend it has no  compelte diagram inside

any advice please Capture.JPGCapture2.JPG

Case structure not calling VI

$
0
0

I am new with labview and I am updating a code that was written with labview 5.. I am having troubles with case structures not calling sub VIs. I have added the "Source size calculation" button to the menu cluster but when it is selected in the case structure it does not execute. All of the existing buttons work fine (and have been removed from the other cases of the case structure), but not the one I added. I have selected "Run when opened" in VI Properties>Execution. I have also tried other sample VIs in the case strucutre but they also do no execute when selected. Any suggestions are appreciated!


Hotplug Ethernet on cRIO-9012

$
0
0

Question:

Is it possible to have the deployed program periodically check if internet access is available?  It seems to only do one check on startup.

 

Current Situation:

I'm using a Raspberry Pi 3 as a wireless-to-ethernet bridge for my cRIO-9012 (RPi3 and cRIO-9012 connected through an ethernet cable) so I can get wireless access.  Deployed program is from LabVIEW 2015.

 

Problem:

If the RPi is given time to boot up prior to plugging it in to the cRIO, everything works fine.  If they're turned on at the same time, the cRIO boots up faster and will not receive internet connection before executing the deployed program.  It doesn't receive internet access even after the RPi is finished booting up. 

 

* Note: If there are other suggestions on ways to get reliable wifi access on a cRIO-9012, that would be appreciated.  I'm using RPi3 because it was already being used for a different purpose as well.

Is there a way to modify a single value of an array without rewriting to the other elements?

$
0
0

With a cluster, I can use the "Controls[]" property node to get a reference for any control in the cluter and then write to that value by using an additional "value" property node.

Is there a way to do a simialr thing with an array?

I have tride using the "IndexVals" property node, but if I change any of the other array elements through the front panel while the code is running it breaks.

Basically I want to programatically change the value of one element but still be able to change the values of of other elements on the front panel.

resize plot legend programmatically

$
0
0

Hi All,

 

I want to know if there is any way to programatically re-size the plot legend so that it can show longes names. I have tried setting the "Autosize" property to TRUE but I do not need that because some names in the plot could be really long and I do not want to show the complete name. I need a way to resize it so whataever size I want.

I played around with the "LegWidth" property but when I increase it, the size of the text box in the legend remains the same.

 

Is there any way to implement it what I want to achieve?

 

Thanks!

BK Precision 1786B not showing up in VISA resource name or NI MAX

$
0
0

I have an existing setup that controls an Agilent 34970A and wanted to add a power supply(BK Precision 1786B).

 

The power supply has a NI certified driver, so I thought the example VIs would work when I installed the driver, but they don't and I could use some help figuring out what's wrong.

 

Some details/things i've investigated:

  • Labview 2014, NI-VISA 16.0, MAX 16.0.1 (other installed software also listed in the attached image)
  • "BK Precision 178XB Series" appears under "Installed Instrument Drivers" in the NI Instrument Driver Finder window, but does not show up under "Connected Instruments" and does not respond when I run the example VIs in the driver folder
  • The power supply is connected to the computer through a usb-serial and shows up under windows device manager as "Prolific Serial-to-USB Comm Port(COM3)" 
  • I am able to add it to NI MAX as a new port, but after setting it up NI MAX is both able to validate and unable to validate the connection. When i press the validate button on the "port settings" tab it says the setup is okay, but it says unable to open a VISA session under the "general settings" tab, and doesn't let me open the VISA test panel. (see attached image)
  • I am able to communicate/control the power supply with the manufacturer's program, so I know that both the cable and power supply are functional

I'd appreciate any input on what could be wrong/steps I could take to get the power supply working with Labview.

NI-DAQmx crash on Max "add task" or LV "DAQ Assist"... LVBroker?

$
0
0

Sorry for the slight confusion, but I'm trying to diagnose by proxy.  Got a student in class with LV 2014 installed, who installed NI-DAQmx (I believe 16.1; he said "latest version").  Windows 7 SP1; sorry the data is a little slim but I didn't have much time to diagnose today.

 

Any time he drops a "DAQ Assist" Vi onto his block diagram, LabVIEW crashes pretty instantly; in the "details" of the crash I believe it mentioned "NiMAXLVBroker" (something like that--did not directly mention LVBroker.dll or any dll).  We can get the same crash to happen by opening up Max (not sure of version right now; didn't have time to write everything during class) and trying "Add task".

 

The DAQ (a USB-6251) does show up in Max, and "self-test" works fine.  It does NOT pull up the "NI Device Monitor Device Detected" dialog when plugging it in.

 

We did try "add/remove programs-> repair installation", recommended several times on forums, and he reported no luck from that.

 

Any ideas?  I need a fix relatively fast, as he'll start being affected in class pretty quickly.  I'm preparing a secondary laptop, but if all the students in the next semester with the same issued computer have the same problem, it'll be pretty tricky to deal with.

Viewing all 66767 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>