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?
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.