LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stopping multiple while loops and data access from outside of while loop

I want to use the 2 number of counters of PCI 6225 card. Purpose is to find ratio of pulses accumulated by the two counters over a certain time, where at first counter defined number of pulses will set as the ‘Initial count’. For first counter, "count down" option will be used and in same time, number of pulses in second counter (count up) will be measured until counter-1 downcounts to ‘0’.

To achieve this, I am using two while loops (one for each counter). When counter 0 downcounts to ‘0’, want to send stop signal to other while loop. Also in second while loop, value of counter need to be passed out of while loop to do further calculation.

So wanted to know, how to stop second while loop by taking control from first one and how to pass the value out of while loop? I have already tried using a ‘local variable’ for passing of value across the loop. I find that it passes the data but only in ‘Read’ mode and not in ‘Write’ mode. Attached is VI used. Labview version is 8.5. Thanks in advance.
0 Kudos
Message 1 of 3
(3,662 Views)

HI

You are passing wire from loop1 to loop2, you are not able to run second loop.

Find attached snapshot, hope that helps you

Message 2 of 3
(3,655 Views)

Hi forbes marshall,

  It is better to use notifiers than a local variable as the local variables may create race conditions.

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 3 of 3
(3,643 Views)