01-27-2011 06:33 PM
I'm trying to get Elapsed Time VI to work but couldn't figure out how to use it properly.
I have a subVI with state machine structure to decode data stream from serial port.
State1 uses VISA read to read a byte and check if it is the Start of Frame. If TRUE, goes to State2. If FALSE, loop back to State1 and try again.
If the State1 keeps getting FALSE for certain time (e.g. 5 seconds), stop the subVI and insert custom error code.
So I have to calculate the elapsed time since State1 starts to be FALSE and keeps to be FALSE.
I tried to use Elapsed Time VI but have problem of understanding it well.
Is there any other better solution than using Elapsed Time VI? Also, how long is the execution time of Elapsed Time VI?
Any suggestion will be very much appreciated.
01-27-2011 09:11 PM
Please post your code so we can see what you are trying to do.
It is probably a matter of not using the reset terminal properly.
The Elapsed Time VI should execute very quickly.
01-27-2011 11:04 PM
Hi,
The Boolean output (Time Elapsed) in Elapse Time VI should give True when time got elapsed.
Else we can simulate using "Tick Count (ms)", which counts the ticks in milisecond. You can move on to state 2 when count reaches to reauired duration.
We can give you better idea if you post the code VI.
Regards
Haneef