From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Store a value in Labview 7.1

Does LV have the capability of saving a value?  Like in a variable?  I'm using a DO WHILE loop to look at and display data coming in from a serial device.. its real time.  When the vi first starts up I look at one of the values from the serial port and want to store it for later use.  When the user pushes an "aquire" button the inner loop stops, avgs the last 10 readings then subtracts that value from the one I "stored" when the loop 1st started running.

0 Kudos
Message 1 of 3
(2,440 Views)

Yes, it does. There's a variety of ways to do this. You could use a local variable, as in create an indicator to which you write the initial value and then read the value when the loop ends (watch for race conditions!). You could also use a shift register. You could also just use a wire, if the code is set up properly. You didn't post your code, so I can only speculate on whether using a simple wire is possible.

0 Kudos
Message 2 of 3
(2,432 Views)

Thanks!

0 Kudos
Message 3 of 3
(2,427 Views)