Chapter 16 PLC Function Applications│CP2000
16-56
16-6-4 Detailed explanation of applications commands
API
CALL
S
Call subprogram
01
P
Bit device Word device
16-bit command (3 STEP)
CALL Continuous
execution type
CALLP Pulse
execution type
32-bit command
- - - -
Flag signal: none
X Y M K H KnX KnY KnM T C D
Notes on operand usage:
The S operand can designate P
CP2000 series device: The S operand can designate P0-P63
S:Call subprogram pointer.
Write the subprogram after the FEND command.
The subprogram must end after the SRET command.
Refer to the FEND command explanation and sample content for detailed
command functions.
API
SRET
-
Conclusion of subprogram
02
P
Bit device Word device
16-bit command (1 STEP)
FEND
Continuous
execution type
- -
32-bit command
- - - -
Flag signal: none
X Y M K H KnX KnY KnM T C D
Notes on operand usage:
No operand
A contact-driven command is not needed
A contact-driven command is not needed. Automatically returns next
command after CALL command
Indicates end of subprogram. After end of subprogram, SRET returns to main
program, and executes next command after the original call subprogram CALL
command.
Refer to the FEND command explanation and sample content for detailed
command functions.