Installation manual

Publication 1747-RM001G-EN-P - November 2008
Application Example Programs G-15
Event Driven Sequencer
Application Example
The following application example illustrates how the FD (found) bit on an
SQC instruction can be used to advance as SQO to the next step (position).
This application program is used when a specific order of events is required to
occur repeatedly. By using this combination, you can eliminate using the XIO,
XIC, and other instructions. For a detailed explanation of:
XIC, XIO, and RES instructions, see Chapter 2.
SQO and SQC instructions, see Chapter 7.
Event Driven Sequencer
Ladder Program
The following table displays the FILE DATA for both sequencers. The SQC
compare data starts at N7:9. While the SQO output data starts at N7:10 and
ends at N7:19. Please note that the step 0 of the SQO is never active. The reset
rung combined with the rung logic of the sequencers guarantees that the
sequencers always start at step 1. Both sequencers also roll over to step 1.
Roll Over to step 1 is integral to all sequencer instructions.
0000
0001
0002
END
Ensures that the SQO always resets to step (position) 1 each REM Run mode entry. (This rung actually resets
the control register's position and EN enable bit to 0. Due to this the following rung sees a false-to-true
transition and asserts step (position) 1 on the first scan.)
S:1
15
FD
R6:0
EN
DN
SQO
Sequencer Output
File
Mask
Dest
Control
Length
Position
EN
DN
SQC
Sequencer Compare
File #N7:0
Mask 000F
Dest I:1.0
Control R6:0
Length 9<
Position 2<
#N7:10
000F
O:3.0
R6:0
9<
2<
Eliminate this rung for retentive operation.
RES
R6:0
The SQC instruction and SQO instruction share the same Control Register. This is acceptable due to the careful
planning of the rungstate condition. You could cascade (branch) many more SQO instructions below the SQO if you
desired, all using the same Control Register (R6:0 in this case). Notice that we are only comparing Inputs 0 to 3
and are only asserting Outputs 0 to 3 (per Mask Value).
FD
R6:0