Skip to main content

Call Structured Text Program

Instruction Parameters

Supported PLC Series

CM1

XP SeriesUP SeriesCP Series
--

CM3

PlusMini ModularMicro-SPro
--

Supported Data Registers

MXYKLFTCSZRQD@DConstant
S1-
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.
DThe second 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 a non-manually executed Structured Text program is set.
0xF1Result value when a manually executed program set to disable is set through the STRUN instruction.
0xF2Result value when a non-Structured Text program is used for the first operand.
Instruction Behavior

The STCALL instruction behaves as follows:

  • It is required that the STCALL instruction be used with a pulse contact as an execution condition.
  • A single execution is sent to manually run Structured Text programs.
    • Manual execution programs execute once they receive the command, and then they return to a waiting state.
  • The manual program executes once immediately after the execution of the STCALL instruction.
    • The timing of a manually executed Structure Text program may be different from the timing of an automatically executed Structured Text program.
Program Execution Behavior

Program execution behaves as follows:

  1. Input (Refresh)
  2. Scan Program Execution
  3. Structured Text Program Execution
  4. Self-Diagnosis
  5. Output (Refresh)
  6. Structured Text Manual Execution
  7. Repeat

Examples