Publication 1766-RM001A-EN-P - October 2008
Sequencer Instructions 289
The following figure explains how the SQC instruction works.
SQC FD bit is set when the instruction detects that an input word matches
(through mask) its corresponding reference word.
The FD bit R6:21/FD is set in the example, since the input word matches
the sequencer reference value using the mask value.
This instruction uses the following operands:
• File - This is the sequencer reference file. Its contents, on an
element-by-element basis, are masked and compared to the masked
value stored in source.
• Mask - The mask operand contains the mask constant, word, or file
which is applied to both file and source. When mask bits are set to
1, data is allowed to pass through for comparison. When mask bits
are reset to 0, the data is masked (does not pass through to for
comparison). The immediate data ranges for mask are from
0…0xFFFF or 0…0xFFFFFFFF.
TIP
If file type is word, then mask and source must be words. If file type is
long word, mask and source must be long words.
EN
DN
FD
SQC
Sequencer Compare
File #B10:11
Mask FFF0
Source I:3.0
Control R6:21
Length 4<
Position 2<
SQC
Input Word I:3.0
0010 0100 1001 1101
Mask Value FFF0
1111 1111 1111 0000
Sequencer Ref File #B10:11
Word Step
B10:11 0
B10:12 1
B10:13 0010 0100 1001 0000 2
B10:14 3
B10:15 4
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive