The leader in industrial automation and control solutions

Instruction Parameters

Supported PLC Series

PLC-AESPLC-FBPLC-ES

Supported Data Registers

MXYKLFTCSZRQD@DConstant
S1
S2
D

Supported Flags

FlagBitSupport
ErrorF11.0
ZeroF11.1
CarryF11.2

Number of Steps

Steps
3

Operands

OperandDescription
S1The first operand.
Entries are WORD data registers or constants.
This is the Structured Text program ID.

The value range is 0 ~ 127.

If the value is set to 0xFF, all Structured Text programs are targeted.
S2The second operand.
Entries are BOOL data registers or constants.

0: Disables Structured Text program.
1: Enables Structured Text program.
DThe third operand.
Entries are only WORD data registers.
This is the result of the instruction execution.
The result is in Hexadecimal form.

Result Format

ValueDescription
0x01Result value during normal operation.
0xF0Result value when setting a running program to run or a stopped program to stop.
0xF1Result value when a non-Structured Text program is used for the first operand.
Sets an error value as the instruction execution result, but no CPU error occurs.
0xF2Result value when the operand value of S2 is neither 0 or 1.

Ladder Diagram Examples

STRUN

The STRUN instruction enables or disables Structured Text programs, S1, based on the operand value of S2 and store the execution result in the data register, D.