Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

CWAI1.stop

Hello
Do you have a manner (software) to determine if the cwai1 is in
running mode or if is it in stop mode

because went I stop the cwai1 and it in already in the stop mode the
board return to me a error...

I want exemple

if CWAI1.running = true then
cwai1.stop
end if

(running is a exemple of a name for the property)

Thanks
0 Kudos
Message 1 of 2
(3,051 Views)
I don't know of any property that would indicate the state of a CWAI object. Perhaps you can trap the error that you get back from the board and do an ON ERROR RESUME NEXT to ignore the error. This would work if the second CWAI.Stop didn't lock up the DAQ board or something like that.

Another possibility is to attach a parasitic boolean variable to each instance of .Start and .Stop to keep track of the state of the CWAI. You could then check the value of this variable to see whether or not the CWAI is running. This assumes that there are no other hardware-related ways that start or stop the CWAI; these would render the boolean variable unreliable.

Good Luck!
0 Kudos
Message 2 of 2
(3,051 Views)