User program configuration – Toshiba T2N User Manual

Page 160

Advertising
background image

2. User Program Configuration

User's manual

147

The instruction which calls a registered sub-routine is the CALL
instruction (sub-routine call instruction) of ladder diagrams. The CALL
instruction requires the number of the sub-routine it calls.

CALL N.000

Sub-routine number

The following is an execution sequence when sub-routines are included.

By the sub-routine 001 CALL instruction execution, the execution
shifts to sub-routine 001
When it has proceeded to the RET instruction, the execution
returns to the instruction following the CALL instruction in 1
When device A is ON, the CALL instruction is executed, and the
execution shifts to sub-routine 001
When it has proceeded to the RET instruction, the execution
returns to the instruction following the CALL instruction in 3
When device B is ON, the CALL instruction is executed, and the
execution shifts to sub-routine 031
When it has proceeded to the RET instruction, the execution
returns to the instruction following the CALL instruction in 5 (the
MOV instruction in this example)

Program under execution

Flow of execution

Sub-routines

Advertising