Instruction Parameters
Supported PLC Series
| PLC-AES | PLC-FB | PLC-ES |
|---|---|---|
| ✓ | – | – |
Supported Data Registers
| M | X | Y | K | L | F | T | C | S | Z | R | Q | D | @D | Constant | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| S1 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | – | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| S2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | – | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| D | ✓ | – | ✓ | ✓ | ✓ | – | ✓ | ✓ | – | ✓ | ✓ | ✓ | ✓ | ✓ | – |
Supported Flags
| Flag | Bit | Support |
|---|---|---|
| Error | F11.0 | – |
| Zero | F11.1 | – |
| Carry | F11.2 | – |
Number of Steps
| Steps |
|---|
| 3 |
Operands
| Operand | Description |
|---|---|
| S1 | The 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. |
| S2 | The second operand. Entries are BOOL data registers or constants. 0: Disables Structured Text program. 1: Enables Structured Text program. |
| D | The third operand. Entries are only WORD data registers. This is the result of the instruction execution. The result is in Hexadecimal form. |
Result Format
| Value | Description |
|---|---|
| 0x01 | Result value during normal operation. |
| 0xF0 | Result value when setting a running program to run or a stopped program to stop. |
| 0xF1 | Result 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. |
| 0xF2 | Result 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.
