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

How to search and find element in the tree?

$
0
0

Hi,
I want to do a program than search and find text in the tree?

Thank you .


network stream from cRio to host

$
0
0

Hi,

 

I stream data from the RT host (cRio 9024) to my host computer. The streaming is working and data in being transferd, but I got the following two problems:

 

1. The data stream is working and in the Host Vi the Property "Is Connected" has the value "true" as it should be. At the same time the Property "Is Connected" on the RT host has the value "false". Is this property not available/accessible on the RT host? (got the code of the RT host in the screenshot)

 

2. My second question is about the URL of the reader endpoint on the Host computer. The URL "//130.83.27.15/reader_NI_9239" with the IP of my host computer is working if the VI is also executed on the host computer. If it runs on the cRio RT processor the URL doensn't seem to be sufficient and no network stream is created. Also there in only one application running on the host.Is there something missing in the URL?

Max/min of data incoming in real time

$
0
0

Hey there! 

I've created an intensity graph whose Z-axis color scale max and min values are programmed to be the same as the max and min values in a data set, which is coming into a 2D array in real time from an instrument. 

My VI works, but seems to only update the max and min once, and is not continually updating them in real time as the data changes. 

My question has to do with the nature of the Array Max/Min function. Do I need to place the max/min array function in a loop for the VI to continually search the data set for max/mins in real time as new data comes in? Or should it already be comparing all values in the array as it grows, and I have not correctly identified the problem?

Thank you so much for your help.

Combining two images

$
0
0

I am working on a way to identify overexposed and underexposed pixels then to combine the two images into one.  I can fairly easily obtain each image but am having trouble combining the two.  When I try to add them together, the over exposed image is completely ignored.  I have tried a number of different approaches, but nothing seems to be working.  Help would be appreciated.

Handle hardware driver error with dialog box suppression

$
0
0

Dear experts,
In my low level VIs, I'm calling some functions from a DLL file (using the Call Library Function Node), in order to control a device connected through USB. Sometimes, during running, the USB driver of the device reports an error through a LabVIEW message box; then the VI remains suspended waiting for a user action on this dialog box. Unfortunately, no error is reported in the output error cluster of the Call Library Function Node.
I tried to disable the automatic error handling from the labVIEW option window, and also I tried to change the Error Checking Level of the Call Library Function Node. But I didn't manage to suppress the dialog box neither direct this error to the error cluster. It seems that it's recognised as a message, instead properly as an error.
Any idea?
Thanks in advance

problem for to select automatically the cell in the control tree .

$
0
0

hi.
how to select automatically  the cell in the control tree ? or to flash the cell that I returned in command like you see.Untitled.png

 

thank you.

Error 1097 in CANOpen Library

$
0
0

Hi All,

 

I am running an XNET card as a CAN card and I'm communicating with a motor using the CANOpen library. My understanding from a few years ago is that NI technically don't support the CANOpen library with Xnet as one function (heartbeat as far as I recall) isn't compatible.

 

My issue is I'm running three identical motors from three different PCs using identical code. Two of the rigs are rock solid but the third intermittently (i.e. about very 20 minutes or so of operation) will throw an Error 1097 and LabVIEW will crash and have to be restarted.

 

The image attach is the block diagram of the vi - as its NI code I can't actually edit or modify it (or even connect the error wires which I'm sure would perhaps prevent a complete crash). I've seen multiple Error 1097's mentioned and the solution seems to be to fix the dll caller - something I can't seem to do here.

 

Vi.png

 

Has anyone come across a problem with this particular library before? My instinct is to do a complete clean and reinstall of the troublesome rig but I'd like to keep this as a last resort.

 

Thank you,

Dave

 

Event Structure exiting process working alongside a while loop sequentially.

$
0
0

Hello, 

 

Perhaps the subject is not indicating much scope as to what I am trying to achieve. The LabVIEW GUI I have designed operates with an mbed application board.

 

I currently have an event structure which enables the user in the front panel to change the brightness of LED's using the controls. The GUI operates when the front panel is adjusted, however it always waits for event structure before making any updates on the hardware itself i.e. to the potentiometers (p19, p20). 


What I wish to accomplish is for the while loop to continue reading and writing to the hardware without waiting for the event structure to occur, perhaps with the use of a timing sequence. The reason I want to do this is so that the pots can continually update in real time on the front panel. At the moment the LED's and potentiometers only update when the LED's are adjusted during the simulation, which is understandably due to the event structure.

 

However I was not sure as to whether or not the event structure could be time sequenced as a loop within a loop, that way the pots can continually be read and the LED's can still be written out. 

 

Not sure if I have made myself clear enough, so please let me know if you have any further questions and I will try to explain it a different way. 

 

Once you look at the GUI this may help put things into perspective.

 

Thanks!


Strain gauge best practices NI-9237 / 9944

$
0
0

We are getting ready to do some strain gauge testing and wanted to iron out some questions ahead of time, for the purpose of following best practice. We will be using NI-9237, NI-9944, Cdaq controller, 120 ohm, 3 grid rosette's. My questions are as follows and any input is much appreciated.

 

1.) Is it preferred to use NI-9237 to acquire strain or voltage?

2.) If acquiring strain, what is the best method to determine initial voltage? 

3.) Is there a process or specification for qualifying strain gauge measurements?

.NET Process STDOUT / STDIN Interface to CLI application

$
0
0

Working on interfacing with a CLI application our firmware team uses for hardware testing. Currently working with .NET Process calls with StreamReader Read functions for reading STDOUT. Unfortunately, it looks like Peek and Read block whenever there's nothing to read on STDOUT, rather than return -1 as expected.

 

Was looking into implementing an Asynchronous Read instead, as I've read on other .NET/VB forums that this is an issue outside of LabVIEW as well. However, I'm struggling to implement this example:

 

https://msdn.microsoft.com/en-us/library/system.diagnostics.process.beginoutputreadline(v=vs.110).aspx

 

specifically the 

// Set our event handler to asynchronously read the sort output.

 section. Not sure if I just don't know what to look for in the .NET property/method/constructors in LabVIEW of if this isn't possible in LabVIEW at all.

 

Attached is what I've got working so far, but it hangs at times when the STDOUT stream is empty.

 

Hoping someone can take a look at the MSDN example and see if there's a way to implement this in LabVIEW with .NET calls.

 

Thanks,

Preston

Read Log File Format

$
0
0

There is a software called Op Torque Field Test V2.1. made in Labview for adquire data from another device who is the transmitter. My problem is that it saves the data in a *.log file format that just can be opened in this software, but when I try to open it in an own VI, i can't do it. I don't know how to read this file.

Could anyone help me please?

Attached I leave the file.

No scrollbar on probe with array of larger data type

$
0
0

So, I would file this under bugs, but I thought I throw this out there.  I am trying to probe a wire in LabVIEW 2016 that carries an array of a data type that large (i.e. extends beyond the viewable area; see image below).  If I view a single element of the array on a probe, I get the vertical scroll bar.  Has anyone else noticed this?  Is this intended behavior?

 

no-borders.png

Event Structure exiting process working alongside a while loop sequentially.

$
0
0

Hello, 

 

Perhaps the subject is not indicating much scope as to what I am trying to achieve. The LabVIEW GUI I have designed operates with an mbed application board.

 

I currently have an event structure which enables the user in the front panel to change the brightness of LED's using the controls. The GUI operates when the front panel is adjusted, however it always waits for event structure before making any updates on the hardware itself i.e. to the potentiometers (p19, p20). 

 

You may be asking why I even want to use an event structure - because when the program ends I wish to turn off all the LED's as an indication that the program has ended successfully.


What I wish to accomplish is for the while loop to continue reading and writing to the hardware without waiting for the event structure to occur, perhaps with the use of a timing sequence. The reason I want to do this is so that the pots can continually update in real time on the front panel. At the moment the LED's and potentiometers only update when the LED's are adjusted during the simulation, which is understandably due to the event structure.

 

However I was not sure as to whether or not the event structure could be time sequenced as a loop within a loop, that way the pots can continually be read and the LED's can still be written out. 

 

Not sure if I have made myself clear enough, so please let me know if you have any further questions and I will try to explain it a different way. 

 

Once you look at the GUI this may help put things into perspective.

 

Thanks!

How to synchronize tree active item set pragmatically with keyboard/mouse selection?

$
0
0

So here is the problem I am having:

1. I use the keyboard arrow keys to navigate up and down in a tree control

2. I then set the active item and value of the tree programatically.

3. I then press on the up or down key on the keyboard, and the active item and value is adjusted up or down relative to where it was when I last used the keyboard to set it's location, not relative to where I just set it programatically.

 

It seems that when the active item of a tree control is set with keyboard and/or mouse, this index is saved as an independent property to the active item property available using property nodes. How do I synchronize the two?

 

I have managed to reproduce this problem using the example here:

https://forums.ni.com/t5/Example-Program-Drafts/Moving-an-Active-Item-in-a-Tree-Control-Up-and-Down-the-Control/ta-p/3501768

To reproduce the problem, do the following:

1. Open the above vi and add property node after the case structure to set the tree control KeyFocus = True.

Tree update problem.PNG

2. Run the vi and click on the 2nd row of the tree control. The 2nd row should now be highlighted.

3. Set the EditPosition.Row control value to 6. You should see the 6th row highlighted.

4. Press the down arrow.  You should now see the 3rd row highlighted... but should be the 7th.

 

Thanks,

John

Error in executing a flat sequence in a while loop

$
0
0

I have written a VI to test an electrical part. However, when I run the VI, the program executes the flat sequence just once inside the while loop and I am not able to identify what prompts the program to exit the while loop. I tried running the VI with just the flat sequence inside a while loop and I was able to see that it doesn't have any problem. The problem arises when I place the Daqmx inside the while loop. Could someone please help me to identify the root cause of this error and what aspect of the Daqmx is prompting the program to exit the while loop. Thank you in advance. 


"Queued Message Handler" loops for asynchronous digital I/O from one piece of hardware

$
0
0

With 2015 LV Base (no PID toolkit available) I would like to make a VI to both control and measure a process and save all data to a file. 

 

I plan to use the "Queued Message Handler" template. 

My newbie understanding is that I can just add loops for any new parallel process (we might have up to 10). 

But what about coordinating hardware resources? We'll use a USB-6210 for digital I/O and voltage in along with a cDAQ for thermocouple. 

 

Can different loops access the same hardware simultaneously? 
We can read all temps at the same time, but digital relay on/off timing for cooling, heating and circuit load is asynchronous.
How do we structure a single piece of hardware with four digital outs to switch on and off as dictated by control algorithm? 

 

Below are options A and B. Loops 3 and 4 are the variants. 

 

Option A

Loop 0, be the coordinator of all other loops. (producer)
Loop 1, read tempertures (cDAQ)
Loop 2, read Fluke, Keithley, and vacuum valve (VISA)
Loop 3, open/close cooling relay (6210 digital out)
Loop 4, open/close load relay (6210 digital out)
Loop 5, measure voltage (6210 analog in)
Loop 6, etc. 
 
 
Option B
Loop 0, be the coordinator of all other loops. (producer)
Loop 1, read tempertures (cDAQ)
Loop 2, read Fluke, Keithley, and vacuum valve (VISA)
Loop 3, open/close relays for cooling and load; read voltage (6210 digital out, analog in)
Loop 4, etc. 

 

 

Output values after an increment

$
0
0

Hello,

I think the logic is straightforward, but I cannot figure out. I want to have a start value, an increment, a stop value, and a wait time between each increment and output the value each time after the increment. Let's say, if I start at 200 with an increment 10 and ends at 300, I want to have a value each time starts at 200, send to my other part of the code and wait for few seconds as I need to attach the value to a string to command a device to move, and then go to 210 send out again, and continue. I tried to use a while or for loop but the output will be an array not a value each time. Is there any simpler way to do this? Thank you.

Reading multiple csv file to Waveform graph

$
0
0

Hello There, I have been asking for help in Labview forum for a while since I am a new user. I am trying to build an application where you can filter our your desired csv file(2 variable or 3 variable data sheet) from a directory and open them in Waveform graph. I have figured out all part except the last one where I can display the data sheets into graph. I know that i have to use 'Read delimited Spreadsheet' element but I am still having hard time figuring out connecting elements with each other. If you run the attached snippet. you will see I can filter out my desired files (Which are also attached here) into 'selected file' box from 'file box' list. What I want to do is directly import the csv files from 'selected file' box to graph. If anyone have suggestions,please let me know. Thank you. Multicolumn list box v1.2.png

"Get Image" Invoke Node with transparency support?

$
0
0

In the UI for my application, I have a graph with a mostly transparent background on top of another object. I would like to be able to export an image of these two controls as they appear on the screen. The most obvious method for doing this is to call the "Get Image" invoke node to get image data for both, draw the image data for one on top of the other, then export the image. However, I'm having issues with the transparency. Specifically, if the "BG Color" parameter for the "Get Image" function is set to transparent, then it treats it as if it is black. As a result, instead of getting a transparent background in my resulting image, I get a black background, and when I draw it on top of the background image, it covers everything up.

 

I have also tried setting the "BG Color" to a color that does not appear in the image and then using the "Create Mask" VI to remove pixels of that color from the image. However, this results in a highly distorted image if the background image is a significantly different color from the mask color (see attached image). Does anyone know how to get an image of a control on the front panel with proper transparency?

 

Result.PNG

 

I have attached example code as well to illustrate what I am trying to do.

Errors when counters read zero

$
0
0

I have to read a signal from circuit to determine the RPM of three motors. At times these motors will be at zero RPM so there will be no pulses being output. I'm using three counters on the cDAQ chassis and a NI 9401 digital IO module. The problem I'm having is when the RPM is zero and there are no pulses coming into the 9401 the DAQmx read.vi times out and throws an error. (See the vi and error below) As long as there is a signal present all is good but I will need it to function when there is no signal input. How can I get around this?

 

Thanks

counter.PNG

Viewing all 69533 articles
Browse latest View live


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