LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Debug a For loop in a While loop

To all LabVIEW experts,
 
I have a general question on debugging For Loop in a while loop.  I have a DAQmx that monitors several AI channels in my While loop.  I, then, use a For Loop to extract the desired channels and process and manipulate the data.  My question is if there is a way to debug the value of a wire in the for loop only for i = 3.  For example, if I have a For loop with N=5, I want to see how the value of a wire in the For Loop when i (in the For loop) = 3 is changing from one iteration to the next iteration of the While Loop.  Any help is appreciated.  Thanks.
 
Peter
0 Kudos
Message 1 of 4
(2,928 Views)

Hi,

In this VI, i am inserting all the For loop 3rd iteration's values in an array.

By looking at the resultant array, you can compare all the values of third iteration.

There are better ways of doing this, that is just index out the 3rd row from your AI read( if you are reading data as a 2d array)

If this does not help, post your VI and explain further

Regards

Dev

 

Message 2 of 4
(2,923 Views)
And if you're using 7.0 or above (I think), you can right click the wire coming out of the i terminal (or create one if you don't have it) and create a conditional probe. A conditional probe will have an extra tab where you can set some conditions. For instance, you can set it to pause the VI when i=3. Then, you can single step or highlight execution to see how the code works and use probes to see the values.

___________________
Try to take over the world!
Message 3 of 4
(2,912 Views)

Thank you Tst and DevChandler,

I will try both of your methods and see which one works best for me.  I've tried conditional probe before with little success, but maybe I was doing it wrong.  I'll look at it again.  Thanks again.

Peter

0 Kudos
Message 4 of 4
(2,885 Views)