Manual – IPOSplus®
329
23
Program commands
Assembler – Commands
23.7 Program commands
23.7.1 Program command END
END
The END statement indicates the textual (not logical) end of an IPOS
plus®
program. The
END statement is not an IPOS command; you cannot delete it.
23.7.2 Subroutine call CALL
CALL
Subroutines are called up with a CALL command (CALL Mxx). The corresponding jump
flags (Mxx) are inserted in front of the first command in the subroutine. A subroutine
ends with a RETURN command (RET). The RETURN command causes program pro-
cessing to jump back to the line below the CALL command. The following program lines
will then be processed. It is also possible to have nested subroutine calls (maximum
nesting depth: 32 levels).
Structure
Example
The main program positions the drive 10 revolutions CCW, after which there is a sub-
routine call (CALL M1). Set 2 outputs of the basic unit for 1 s (the output parameters
must be set to "IPOS-OUTPUT"). The jump back to the main program (RET) takes place
next and the GOR WAIT #10 positioning command is processed.
INFORMATION
Do not exit subroutines by jumping to a main program or another subroutine. Condi-
tional exiting of the subroutine must be performed by jumping to the end of the sub-
routine.
Command structure
Mxxx CALL Myyy
Mxxx: Label (optional)
Myyy = Label as of which subroutine begins.
515186699
P
i
f
kVA
Hz
n
P
i
f
kVA
Hz
n