ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

use read status to stop while loop

Disclaimer: I am relatively new to LabView so this may be simple but I haven't been able to figure it out.

 

I want to run a chip until it generates the signal of interest. I've come up with the attached code where the while loop generates all of the inputs to the chip including a software timed clock. When PFI5 is asserted (PFI5in button pressed) the top path captures the data. When the capture process is complete I would like to terminate the while loop. Right now I get and display the data but I haven't been able to figure out how to stop the while loop.

 

How would I configure this diagram to get that to happen? I thought I could look at the DAQmx Read properties and look for the buffer to fill up but all I ever get is zero in the different status indicators.

 

Thanks

0 Kudos
Message 1 of 2
(2,560 Views)

Hi,

You could use a functional global variable. Set it to false at start of top loop and true at end of top loop.

Inside the while loop read the functional global variable for a true to stop loop..

Code attached..Not tested - shud work..

Thanks,

Shane.

Download All
0 Kudos
Message 2 of 2
(2,532 Views)