Delta Electronics AH500 Manual page 137

Motion control module
Hide thumbs Also See for AH500:
Table of Contents

Advertisement

A H 5 00 M o ti on C on tr ol M od ul e Ma nua l
API
Instruction code
02
SRET
E xp la nat io n
E xamp le 1
E xamp le 2
Operand
Pulse instruction 16-bit instruction (1 step) 32-bit instruction
The instruction SRET indicates that a soubroutine ends. After the
execution of a subroutine in a program is complete, the instruction
following CALL which calls the subroutine in the main program O100 will
be executed.
When X0.0 is ON, the instruction CALL is executed, and the execution of
the program jumps to the subroutine to which P2 points. When the
instruction SRET is executed, the execution of the program returns to
address 24.
X0.0
20
X0.1
24
When X2.0 is turned from OFF to ON, the instruction CALL P10 is
executed, and the execution of the program jumps to the subroutine to
which P10 points.
When X1.1 is ON, the instruction CALL P11 is executed, and the
execution of the program jumps to the subroutine to which P11 points.
When X1.2 is ON, the instruction CALL P12 is executed, and the
execution of the program jumps to the subroutine to which P12 points.
When X1.3 is ON, the instruction CALL P13 is executed, and the
execution of the program jumps to the subroutine to which P13 points.
When X1.4 is ON, the instruction CALL P14 is executed, and the
execution of the program jumps to the subroutine to which P14 points.
When the instruction SRET is executed, the execution of the program
returns to the previous subroutine.
When the instruction SRET in the subroutine to which P10 points is
executed, the execution of the program returns to the main program.
Function
Indicating that a subroutine ends
C ALL
P2
P2 points to a s ubr outine.
Y0 .1
Y0 .0
Subroutine
Y0 .0
5 - 2 2

Advertisement

Table of Contents
loading

Table of Contents