Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 443
Sequencer Instructions (SQI, SQO, SQL) Chapter 10
Example: When enabled, the SQO instruction increments the position, passes the data at
that position in array_dint through the mask, and stores the result in value_1.
A 0 in the mask means the bit is not compared (designated by xxxx in
this example).
Using SQI with SQO
If you pair an SQ I instruction with an SQO instr uction, make sure that both instructi ons use the same Control, Leng th, and Position values.
Resetting the Position of SQO
Each time the controller goes from Program to Run mode, the SQO instruction clears (initializes) the .POS value. To reset .POS to the initialization value (.POS = 0), use a RES instruction to clear the position value. This example uses the status of the first-scan bit to clear the .POS value.
SQO Operand Example Values (Using INTS Displayed In Binary)
Array xxxxxxxx xxxxxxxx xxxx0101 xxxx1010
Mask 00000000 00000000 00001111 00001111
Destination xxxxxxxx xxxxxxxx xxxx0101 xxxx1010