Sequencer Input (SQI)

The SQI instruction detects when a step is complete in a sequence pair of SQO/SQI instructions.
When true, the SQI instruction passes the Source and current Array element through the Mask. The results of these masking operations are compared and if they are equal, rung-condition-out is set to true, otherwise rung-condition-out is cleared to false. Typically use the same CONTROL structure as the SQO and SQL instructions.
Available Languages
Ladder Diagram
Ladder Diagram_Sequencer Input (SQI)_v1
Operands
The data conversion rules for mixed data types within an instruction. See Data Conversion.
Operand
Type
Format
Description
Array
DINT
array tag
Sequencer array
Specify the first element of the sequencer array
do not use CONTROL.POS in the subscript
Mask
SINT
INT
DINT
tag
immediate
This operand is used to determine which bits to block (0) or pass (1) when applied to the Source and the Array element referenced by .POS.
INT and SINT types are zero extended to the size of a DINT type.
Source
SINT
INT
DINT
tag
immediate
The input data used to compare with an array element referenced by .POS..
Control
CONTROL
tag
Control structure for the operation
The same control tag should be used in the SQO and SQL instructions
Length
DINT
immediate
This represents the CONTROL structure .LEN.
Position
DINT
immediate
This represents the CONTROL structure .POS.
CONTROL Structure
Mnemonic
Data Type
Description
.ER (Error)
BOOL
The instruction encountered an error.
.LEN (Length)
DINT
The length specifies the number of sequencer steps in the sequencer array
.POS (Position)
DINT
The position identifies the Array element that the instruction is currently comparing with the Source.
The initial value is typically 0
Using SQI without SQO
When the SQI instruction determines a step is complete, the ADD instruction increments the sequencer array. The GRT determines whether another value is available to check in the sequencer array. The MOV instruction resets the position value after completely stepping through the sequencer array one time.
FTStudio-SQI-LD-EX1-V1
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See Common Attributes for operand-related faults.
Execution
Ladder Diagram
Condition/State
Action Taken
Prescan
N/A
Rung-condition-in is false
N/A
Rung-condition-in is true
See Flow Chart (True)
Postscan
N/A
Flow Chart (True)
RSL5K_SQI Flow Chart True
Example
Ladder Diagram
FTStudio-SQI-LD-EX2-V1
If you use the SQI instruction without a paired SQO instruction, you have to externally increment the sequencer array.
The rung-condition-in will be set to true when the instructions enableOut will be true when the result of ANDing the array value specified by the Position e.g. Array[Position] with the Mask value is equal to the result of ANDing the Source value with the Mask value, otherwise the rung-condition-out will be cleared to false.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.