07-27-2015 04:11 PM
the stop sign does not do anything, it just stops after the timeout.
Which is exactly what you're asking it to do.
The STOP button is not a magic ABORT function. It's a simple TRUE/FALSE variable.
The way you have it set up is:
repeat
Get some data (Timeout = 10 sec)
Process the data
until STOPped
It's going to check that STOP value (is it pressed or not) ONCE, sometime during the loop. Maybe before your GET DATA, maybe during, maybe after - you don't know.
Whenever the GET DATA thing returns (after 10 sec, or after getting some data), then it willl use that value and decide to loop again, or to stop.
If you want to abort the GET DATA operation, you have to find another way.
One way is to use a shorter timeout. Do you have to track it down to 1 pulse every 10 sec? If not shorten your timeout and go from there.
Another way is to find a way to abort the operation.
Again, I'm not familiar with the EXPRESS stuff you're using, so I don't know the details. In all my 26 years of LabVIEW programming, I've never once used EXPRESS stuff.
Using the regular NIDAQ stuff, you would
INIT a task
START a task (Task ID)
repeat
READ a task (TaskID, timeout = 0.1 sec, or something)
if TIMED OUT
do nothing
else if ERROR
announce error
else
Process data
end if
until STOPPed or ERROR
CLEAR task(Task ID)
It's more complicated, but you have more control.
Blog for (mostly LabVIEW) programmers: Tips And Tricks