LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop recording data using a while loop

I hope I am going about this the right way. Here is what I am trying to do:

I have a laser revolving around a specimen and the laser voltage output is sampled through LabView. I have LabView sampling the voltage waveform at specified intervals for one rotation around the specimen. The sampled data is then bundled so that I can use Labview to manipulate it later on.

I would like the data collection to stop after there is a voltage reading of 12V b/c that voltage is a signal that I have completed one rotation. I was trying to connect something to the while loop that the acquire waveform vi is in, but its not working out as I had planned. Basically, I want the data collection to continue for voltage values that are
less than 12V but stop when that statement is false.
0 Kudos
Message 1 of 3
(2,554 Views)
Try to use 'Highlight Execution' or 'Probe Data Tool' in order to see the value that goes to the end condition. Maybe you need to insert a NOT before the end condition or use In Range.VI if the voltage is not exactly 12 V(but close). Also, it depends if you compare each voltage or just some samples (and how often).
Thus, it would be helpful if you can post your VI or a simulation.
Hope this helps ... somehow
0 Kudos
Message 2 of 3
(2,554 Views)
Inside your while loop, unbundle the voltage waveform and wire the voltage reading value to a 'less than' vi function (top terminal). To the bottom terminal of the 'less-than' vi, wire in a constant of 12. Wire this result to the while loop control. In Labview 6, you can right-click on the loop control and select 'continue if true' (voltage<12). This setup well allow your while loop to repeat as long as your voltage readings are less than 12.
Good luck with it, Doug
0 Kudos
Message 3 of 3
(2,554 Views)