LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Access ouside of loops

I basically have a counter that is inside a while loop. I want the counter to perform 2 functions in my program.

First, when the count reaches a predetermined value, a sub vi must be triggered.
Second, when the count reaches another value, the execution of the sub vi must be terminated.

It is important that the counter run continously (it is an encoder value for posistion). How do I access the value of the counter from outside the while loop, while the loop is still running?

Thanks,

Jordan
0 Kudos
Message 1 of 4
(2,544 Views)
Assuming that the counter value is updating an indicator in the while loop, you can access the value of the counter in another loop
either by
creating a local variable (make it read)
or
creating a property node..>> value
or
by reference (most likely if it is in another vi)
0 Kudos
Message 2 of 4
(2,544 Views)
Use a queue or a notifier if you need the actual counter value. If you just need to know *when* your counter hits those two values, use an occurrence (see attachment).
0 Kudos
Message 3 of 4
(2,544 Views)
Hi Jordan;

Try this on for sizs:


Eric
Eric P. Nichols
P.O. Box 56235
North Pole, AK 99705
0 Kudos
Message 4 of 4
(2,544 Views)