Operation & Software Manual
220
Direct Drives & Systems
Chapter D: Programming ETEL Doc. - Operation & Software Manual # DSC2P 903 / Ver. F / 3/6/05
Example:
Here is the sequence:
:79.1 ;Label n°79. the sequence is executed as soon as the controller is switched on.
PWR.1=1 ;Initialization then power supply in the phases, the motor is in closed loop.
IND.1 ;The motor moves up to the index.
WTM.1 ;Waits until the movement is finished
SET.1=0 ;Definition of ’0 machine’ where the motor is.
MMD.1=1 ;Selection of a S-curve movement.
JRT.1=10 ;Jerk time = 10 x STI (STI = 166.67µs for the DSC2P/DSC2V and 500µs for the
DSCDP, DSCDL and DSCDM)
ACC.1=500000 ;Definition of a
max
.
SPD.1=200000 ;Definition of v
max
.
:10.1 ;Label n°10.
POS.1=300000 ;The motor moves to the position 300000 at a speed of 200000 and an acceleration
of 500000 increments.
WTM.1 ;Waits until the movement is finished
POS.1=0 ;The motor moves to the position 0 with the same speed and acceleration as before.
WTM.1 ;Waits until the movement is finished
JMP.1=10 ;Unconditional jump, the execution of the sequence goes on from label n°10.
:80.1 ;Label n°80. In case of error, the execution of the sequence continues from this
place.
POP.1 ;The stack is erased.
RST.1 ;The error is reset.
JMP.1=79 ;The sequence continues at label n°79, from the beginning in this case.
All benefits that can produce the use of particular labels in the execution of a sequence, especially when
handling errors and warnings, is demonstrated here.
14.2.2 Unconditional jump: JMP command
As soon as the controller meets the JMP command (JuMP), the sequence execution goes on from the label
indicated in <P1>. The bit# 8 of SD1 is set to 1 (’Status Drive’)
Sent on-line, the JMP command starts the sequence execution from the label indicated in <P1>.
Example:
JMP.1=12 ;The sequence execution starts from label :12.1
JMP.1=X1.1 ;If X1.1=10, the sequence starts or jumps to label :10.1
Remark: If the label 79 is present, the sequence is automatically executed from this label when the
controller is switched on.
If the label given by <P1> is not in the sequence, a MAX SEQ LINE ERR error (M64=37) appears
and the sequence stops (refer to §18.
for the warning list).
Command <P1> Value of <P1> Comment
JMP.<axis> = <P1> n° of label 0 - 511 The execution of the sequence continues on the label indicated by <P1>