LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence structure and Latch action

Dear Sir or Madam,


I have a sequence with commands in each frame. Is there a way to have a
LATCH ACTION, between frames??.

Thanks in advance for your any help.

Sincerely,

Luis Diaz
luis_diaz_ballote@hotmail.com
0 Kudos
Message 1 of 3
(2,444 Views)
Luis Diaz wrote:

> Dear Sir or Madam,
>
> I have a sequence with commands in each frame. Is there a way to have a
> LATCH ACTION, between frames??.
>
> Thanks in advance for your any help.
>
> Sincerely,
>
> Luis Diaz
> luis_diaz_ballote@hotmail.com

Not quite sure what you mean here.
You can pause between each frame, there are 2 ways to do this.
Add a frame AFTER the frame to pause
1) put in a timer (Wait MS) you can hardcode this wait or have
a value that the user can enter.
2) put in a while loop and have a button to proceed, or use some sort of
logic.

All this will do is send the commands and then wait for the timer to expire
or the loop to end.

A more elegant approach is to use a state machine. This is a combination of
a case structure inside of a while loo
p. You have much more control over the

sequence of events and it is much easier to read and debug.

Again all this will do is wait between cases (if setup that way)

Using the state machine you can have a case return to itself which
is esentially a LATCH.

There are samples of the state machine at various locations.

Let me know if you need more help
Kevin Kent
0 Kudos
Message 2 of 3
(2,444 Views)
I would recomend that you get rid of the sequence structures and use a state
machine. A State machine will give you a much more powerful and flexible
program. Browse the example programs available at the Resource Library of
NI's Developer Zone zone.ni.com). There is even an example called Pause/Resume
& State Machine.

"Kevin B. Kent" wrote:
>Luis Diaz wrote:>>> Dear Sir or Madam,>>>> I have a sequence with commands
in each frame. Is there a way to have a>> LATCH ACTION, between frames??.>>>>
Thanks in advance for your any help.>>>> Sincerely,>>>> Luis Diaz>> luis_diaz_ballote@hotmail.com>>Not
quite sure what you mean here.>You can pause between each frame, there are
2 ways to do this.>Add a frame AFTER the frame to pau
se>1) put in a timer
(Wait MS) you can hardcode this wait or have>a value that the user can enter.>2)
put in a while loop and have a button to proceed, or use some sort of>logic.>>All
this will do is send the commands and then wait for the timer to expire>or
the loop to end.>>A more elegant approach is to use a state machine. This
is a combination of>a case structure inside of a while loop. You have much
more control over the>>sequence of events and it is much easier to read and
debug.>>Again all this will do is wait between cases (if setup that way)>>Using
the state machine you can have a case return to itself which>is esentially
a LATCH.>>There are samples of the state machine at various locations.>>Let
me know if you need more help> Kevin Kent>
0 Kudos
Message 3 of 3
(2,444 Views)