Page 274 - Programmable Logic Controllers, Fifth Edition - Mobile version
P. 274
12.2 Sequencer Instructions
SQO
SEQUENCER OUTPUT
PLC sequencer instructions replace the mechanical File EN
drum sequencer that is used to control machines that have Mask DN
Destination
a stepped sequence of repeatable operations. Programmed Control
sequencers can perform the same specific on or off pat- Length
terns of outputs that are continuously repeated with a Position
drum switch, but with much more flexibility. Sequencer
instructions simplify your ladder program by allowing Figure 12-7 SQO (Sequencer Output) instruction.
you to use a single instruction or pair of instructions to
perform complex operations. For example, the on/off op- • Each time the rung makes a false-to-true transition
eration of 16 discrete outputs can be controlled, using a the position is incremented to the next step in the
sequencer instruction, with only one ladder rung. By con- sequencer File.
trast, the equivalent contact-coil ladder control arrange-
ment would need 16 rungs in the program. • Data from the sequencer File are then transferred
Depending on the PLC manufacturer, various sequencer through the Mask into the specified Destination
instructions can be programmed. Figure 12-6 shows address.
the Sequencer menu tab for the Allen-Bradley SLC 500 • The data are updated during each scan where the
PLC and its associated RSLogix software. For the Allen- rung remains true.
Bradley line of controllers, sequencer commands may • When the last word in the sequencer file is trans-
include the following: ferred the done bit is set.
• Then, on the next false-to-true transition, the Des-
SQO (Sequencer Output)—Is an output instruction
that uses a file to control various output devices. tination data are cleared and the Position pointer is
reset to step one.
SQI (Sequencer Input)—Is an input instruction that
compares bits from an input file to corresponding bits • At start-up, when the processor is switched from pro-
from a source address. The instruction is true if all gram mode to the run mode the operation depends on
pairs of bits are the same. the rung being true or false on the initial scan.
- If true, the instruction transfers the value in
SQC (Sequencer Compare)—Is an output instruc- step zero.
tion that compares bits from an input source file to - If false, the first rung transition from false-
corresponding bits from data words in a sequence file. to-true transfers the value in step one of the
If all pairs of bits are the same, then a bit in the con- instruction.
trol register is set to 1. • The Mask bits must be set in order to change the
SQL (Sequencer Load)—Is an output instruction value in the Destination word. The bits mask data
used to capture reference conditions by manually when reset to 0 and pass data when set to 1.
stepping the machine through its operating sequences.
It transfers data from the input source module to the The Sequencer Output (SQO) instruction is used to
sequencer file. The instruction functions much like a control output devices sequentially. The desired sequence
file-to-word transfer instruction. operation is stored in a data file or array. As the sequencer
advances through its steps, the stored data are transferred
Figure 12-7 shows an example of an SQO (Sequencer one word at a time through a Mask to the Destination.
Output) instruction. Its execution is summarized as Parameters that may be required to be entered in sequencer
follows: instructions can be summarized as follows:
• The SQO instruction is placed on the right side of File—Is the starting address for the registers in the
the rung as an output. sequencer file and you must use the indexed file
indicator (#) for this address. The file contains the
data that will be transferred to the destination address
when the instruction undergoes a false-to-true transi-
BSL BSR SQC SQL SQO FFL FFU LFL LFU
tion. Each word in the file represents a position, start-
File/Misc File Shift / Sequencer Program Control ing with position 0 and continuing to the file length.
Mask—Is the bit pattern through which the sequencer
Figure 12-6 Sequencer menu tab. instruction moves source data to the destination address.
Sequencer and Shift Register Instructions Chapter 12 255
pet73842_ch12_252-280.indd 255 03/11/15 7:18 PM