Ecall (Subroutine Call (With Pb No. Specification)) - Panasonic FP7 Series Command Reference Manual

Cpu unit
Hide thumbs Also See for FP7 Series:
Table of Contents

Advertisement

3.37 ECALL (Subroutine Call (with PB No. Specification))

Ladder diagram
List of operands
Operand
Description
n
Subroutine number: 0 to 65535/1 PB
PBm
Target PB number: The number of PB where the subroutine specified by n is stored
Devices that can be specified (indicated by ●)
Operan
d
W
W
X
Y
PBm
Outline of operation
● When the execution condition is ON, the SBLn subroutine of PBm is called.
● When the subroutine program is processed up to the "RET" instruction, the program will
return to the address next to the "ECALL" instruction in the main program, and continue with
processing of the main program.
● The local device of the called PBm is used as the local device in the called subroutine.
Operation Example
PB
PB1 program
Program
example
Operation when the execution condition of the ECALL instruction is OFF
● When the execution condition turns OFF, the operation of the current subroutine stops. (It is
also true for calls from the master control or step ladder.) In this case, the operation of each
instruction used in the subroutine is as follows.
WUME-FP7CPUPGR-12

3.37 ECALL (Subroutine Call (with PB No. Specification))

16-Bit device:
W
W
W
S
D
L
R
L
S
D
T
D
32-Bit
device:
TS
TE
U
W
WI
C
C
M
O
S
E
PB2 program
Real
Integer
numbe
r
D
IX
K
H
SF
F
Description
● Instructions between SBL
and RET are called and
executed when the ECALL
instruction is executed.
● When RET is executed,
program returns to the
calling ECALL instruction.
St
rin
g
Index
modifie
r
" "
3-113

Advertisement

Table of Contents
loading

Table of Contents