LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

skip to next frame

Dear all

how can I advance to a next frame in a sequence upon a condition
becoming true in a previos frame? I am waiting for a response from a
serial instrument. If the instrument does not respond, the program sits
there forever. I would like to have some time-out condition, i.e. if no
response for, say, 5 seconds- move to next frame. Something easy 2 do in
a text based language- but how can I do it in labview?

TIA

YZ
0 Kudos
Message 1 of 4
(3,715 Views)
YZ wrote:

> Dear all
>
> how can I advance to a next frame in a sequence upon a condition
> becoming true in a previos frame? I am waiting for a response from a
> serial instrument. If the instrument does not respond, the program sits
> there forever. I would like to have some time-out condition, i.e. if no
> response for, say, 5 seconds- move to next frame. Something easy 2 do in
> a text based language- but how can I do it in labview?
>
> TIA
>
> YZ
Thank you, I have figured it out.

YZ
0 Kudos
Message 2 of 4
(3,715 Views)

YZ,

Sequence structures are not really good for this sort of thing. I would suggest that you use a state machine type architecture. using this type will give you many benefits and is very easy to upgrade and reuse if needed. Look in the example and do a search on the forum for state machines.




Joe.
"NOTHING IS EVER EASY"
Message 3 of 4
(3,700 Views)

I must agree with joe, anytime I see a sequence a state machine comes to mind, this is a much more flexible solution since you can easily modify the order of a sequence, skip steps by just modifying the transition logic.  I made the change from sequence to state machined about 3-4 years age and havent looked back.  Finite automata is a very well studied and mature design pattern and is easily modeled and implemented in labview.  The only disadvantage to it is that it is a little bit  more conceptually difficult to grasp than a sequence structure. 

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 4 of 4
(3,691 Views)