LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do I fill an array only when a case statement executes?

Solved!
Go to solution
Hello. I want to have a while loop, with a case statement. When the case is true, it should read analog data every iteration of the while loop via Daqmx and store those values in an array. If the case is false, I dont want to read any data or store anything else in the array. When the while loop is finished, I want to have that array available to write to a file or something. How can I go about this?
0 Kudos
Message 1 of 2
(2,655 Views)
Solution
Accepted by topic author -SK-
Research a 'shift register'. This will hold your data. In the false case feed the array data back through without change. In the true case add the new value to the array using 'build array' or better yet 'replace array subset' for a defined array size.
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 2 of 2
(2,653 Views)