LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stop counter in a well defined way

Hello,
I have the following problem.
I use the counters on the NI 6602 card. In an inner while-loop I check if the counter is armed or not.
The outer while-loop will be stopped through an stop-button. I tried to use a local variable to pass the stop signal into the inner while-loop. In principle it works fine. But if I stop the measurement the counter's value is wrong.
I think the counter stops within a measurement and returns the measured value, up to now. However it's always a wrong value (the count-value is too little)

But when I use the "Abort Execution"-Button of LabView the execution will be
aborted completely and some values that should be displayed after the outer
while-loop won't be displayed.

Is there a possibilit
y to stop the counter in a well defined way.
Maybe to indicate that the current value is wrong and take the last
value. Or that the counter first counts the value and then stops??

Any hints?

Regards Thomas
0 Kudos
Message 1 of 2
(2,527 Views)
You could always set up an Event Strucutre that only waits for your stop button's value to change. When it changes, take one last reading from the counter. I hope this helps you out. It's at least worth a try!
J.R. Allen
Message 2 of 2
(2,527 Views)