LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get elapsed time in case struture?

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.

0 Kudos
Message 1 of 3
(2,845 Views)

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.

0 Kudos
Message 2 of 3
(2,835 Views)

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

0 Kudos
Message 3 of 3
(2,823 Views)