LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

While Loop Execution

Hey,

Cant get the lower portion of this while loop to execute more than once.  Please take a look at the jpeg and help me with the obvious.

Thanks,

BLW

0 Kudos
Message 1 of 3
(2,574 Views)

A good starting point is to use the Error outputs and try to see what error is preventing your code from running.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 3
(2,549 Views)

Have you used execution highlighting (the light bulb icon in the toolbar) so you can see if it does actually execute more than once?

 

Also take advantage of error inputs and outputs so that you can probe for errors.

 

I suspect the problem is that you have DAQmx Start Task inside the while loop, and you can't start a task that's already been started, so the second time through the loop you're not passing a valid task to the read, causing it to read no data.  DAQmx Start Task should be outside the loop.

0 Kudos
Message 3 of 3
(2,547 Views)