46
4 Functional Description
4.6 Sequence programs
Explanations of the commands and functions:
Jump commands
The program sequence can be specifically controlled with the jump commands.
The JMP command can also be used from the RS232. This is useful in cases where different program
routines are to be called from the computer.
Example:
A1
JMP1
... Endless loop
A2
… Program sequence 2 (can only be called by JMP2 from the RS232)
LA10000
NP
M
JMP1
... Return to endless loop
A3
… Program sequence 3 (can only be called by JMP3 from the RS232)
LA-10000
NP
M
JMP1
... Return to endless loop
The program sequences according to A2 or A3 can only be called by a JMP2 or JMP3 command from
the RS232. A JMP2 from the RS232 results in the drive moving to position 10000 and stopping there.
The DxJNZ commands serve to form loops with a predefined number of cycles.
Example:
Move by the same relative position 5 times.
SETA5
… Set variable A to the value 5
A2
… Define jump address 2
LR100
… Load relative position
NP
… Notify Position
M
… Start positioning
DAJNZ2
… Decrease A by 1 and jump to address 2, provided that variable A is not yet 0.
The commands JPH, JPF and JPT enable jumps that are only executed if the relevant input is active.
This means that programs can be called via external switches.
The commands JMPGx, JMPLx, JMPEx enable jumps that refer to the result of the last query
command.
Example:
SETA 100
GN
JMPLA3