6. BASIC INSTRUCTIONS
6
−
63
MELSEC-A
Execution
The execution conditions of CALL and CALLP are a shown below.
Conditions
When a program uses the PLS and PLF instructions in the subroutine, and when the
ON/OFF time of a subroutine execution designation signal is set shorter than the
scan time, the device designated with (D) of the subroutine PLS and PLF
instructions may sometimes remain turned ON more than 1 scan.
Operation Errors
In the following cases, operation error occurs and the PC stops operation.
•
After the CALL(P) instruction is executed, the END(FEND) instruction has been
executed before executing the RET instruction.
•
The RET instruction has been executed before executing the CALL(P) instruction.
•
The label P255 has been called by the CALL(P) instruction.
•
The JMP instruction was executed to exit from a subroutine before execution of
the RET instruction.
•
Nesting is of six or more levels.
OFF
ON
Executed per scan
Executed
per scan
Executed only once
Executed
only once
CALL
CALLP
Subroutine execution
command
When the ON/OFF time is shorter than the scan time:
When the ON/OFF time is longer than the scan time:
X0
M0
X0
M0
Scan time
Scan time
CALL P0
FEND
X000
M9036
PLS P0
RET
29
30
35
P0
0
Summary of Contents for MELSEC-A series
Page 1: ......
Page 2: ......
Page 13: ...A 11 MEMO...
Page 505: ...APPENDICES APP 100 MELSEC A MEMO...
Page 507: ......
Page 508: ......