LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Only saves first and last data points to spreadsheet file

Hey,
I am sure this is an easy fix, but I can't seem to figure it out.  I am trying to interpolate values every 50 ms in a while loop and save the new values in a spreadsheet file.  Unfortunately, I only get two values saved, which I believe to be the first and last values. The vi is attached; I didn't attach the subvi because it is kind of complicated and probably not necessary. 
 Thanks in advance,
 
Strass
0 Kudos
Message 1 of 5
(2,732 Views)
You're right about it only saving the first and last...

What's happening is every time you click start, the case structure executes only once, and then the outer loop iterates, and the "start-stop" loop begins executing.  This means that you'd have to click the start button every time you want a reading...  I'd fix it for you, but I haven't got time!  Sorry...
Message 2 of 5
(2,730 Views)

Thanks for the help

It sounds like fixing it will require another while loop inside the case structure...  Does this mean that I will have 3 while loops running every iteration or does the run/stop loop quite after the run button is pressed?  I dont know if I have enough time to spare if the former is the case.   

0 Kudos
Message 3 of 5
(2,724 Views)
Here, try this...  I think this would work better...  unless I'm missing something.  I tried to do it quick, but I think this is the route you should be taking as opposed to what you had...
Message 4 of 5
(2,720 Views)
Looks like it will work a lot better.  Thanks a lot.
0 Kudos
Message 5 of 5
(2,711 Views)