04-25-2008 09:44 AM
04-25-2008 09:51 AM
Hi Jessica,
you can read the values from your controls and write it to a file. You can build a shift register or write it into a txt file, or, ...! Can you show your main vi, and explain which format you prefer?
Mike
04-25-2008 10:34 AM
Mike,
Thanks for replying so quickly. I've attached a screenshot of my block diagram.
I've worked on it a little more since my post, and now the data is being saved, but it doesn't make sense. I am saving it as a .lvm file and opening it in Excel. I'm new to LabVIEW, so I may simply be struggling with the syntax and logic. From my experience coding, it makes sense to have the data stored inside the while loop. However, in this program, it seems that the data doesn't start saving until after I've stopped the subVIs.
04-25-2008 10:41 AM
Hi Jessica,
to store the data in your main vi, create shift registers on your while loop and build an array from your values. To learn more about LabView see this link
http://www.ni.com/academic/lv_training/how_learn_lv.htm there are two free courses. ![]()
Mike
04-30-2008 10:10 AM
Mike,
I tried using shift registers, as you suggested. However, I think that the way I am reading data does not work with them. I added an iteration counter to my while loop to see how it was running. The way I am reading data from my subVIs, with the control reference, means that as soon as I start the subVI, the while loop in my main VI stops looping, and stays in the same iteration until I stop taking data. This means I only get two data points in my measurement file: the first and the last.
I am able to read continuously updating data this way, but I am not able to store it for some reason. I tried feeding the control reference directly into the 'Write Measurement File' function, but I still get only the first and last data points. I am wondering if it would be easier to save the data in arrays, the way you suggested, in the subVIs and pass those arrays to the main VI to be put in the same file. Is this reasonable?
Thanks, Jessica
05-02-2008 12:26 AM