Operation & Software Manual
214
Direct Drives & Systems
Chapter D: Programming
ETEL Doc. - Operation & Software Manual # DSC2P 903 / Ver. F / 3/6/05
14.
Basic programming
14.1 Commands
The commands allow the communication with the controller, giving it orders, etc. They can be sent one after
the other and immediately executed by the controller: this is the
on-line
mode. A sequence of commands can
also be memorized in the controller, and in this case it is called a
user sequence
(refer to
14.1.1 Wait commands
These commands temporarily stop the execution of a sequence (normal commands) during all the waiting time
and then continue from the following line.
14.1.1.1 WTT command
The
WTT
command (
w
ai
t
a
t
ime) makes a pause in the sequence progression. The pause duration is set with
the command parameter.
Example:
The Slow Time Interrupt (sti) is equal to 166.67
µ
s for the DSC2P/DSC2V and to 500
µ
s for the DSCDP, DSCDL
and DSCDM.
WTT.1=500
;The pause duration is equal to 500×166.67
µ
s = 83ms for the DSC2P and DSC2V.
The pause duration is equal to 500×500
µ
s = 250ms for the DSCDP, DSCDL and
DSCDM.
WTT.1=20
;The pause duration is equal to 20×166.67
µ
s = 3,32ms for the DSC2P and DSC2V.
The pause duration is equal to 20×500
µ
s = 10ms for the DSCDP, DSCDL and
DSCDM.
14.1.1.2 WTM and WTP commands
When the
WTM
command (
W
ai
T
for end of
M
ovement) is executed, the controller waits for the end of the
current movement before going on with the sequence execution. If several movement commands (POS, STA,
etc.) are successively sent it is not necessary to introduce the WTM command between each movement to wait
for the end of the preceding one because the controller does it automatically, unless
concatenated
movements
are executed (refer to
The
WTP
command (
W
ai
T
for
P
osition) allows the user to wait for the motor to cross the position specified in
its parameter, in any direction, before going on with the sequence execution from the following line.
Remark:
With WTP, if the specified position has not been crossed yet, and the movement ends, the
command following WTP is executed at the end of the movement.
If the motor is not moving when WTM or WTP commands are sent, they are ignored. Both commands are
generally preceded by the POS or STA command because the motor must be moving.
Command
<P1>
Comment
Units
WTT.<axis> = <P1>
Pause duration Pause of <P1> * sti (166.67
µ
s or 500
µ
s) in the process of the sequence.
[sti]
Command
<P1>
Comment
Units
WTM.<axis>
-
Waits for the end of the current movement before continuing the execution
of the sequence.
-
WTP.<axis> = <P1>
Motor
position
Waits for the motor to cross position <P1> before going on with the
execution of the sequence.
[upi]
[rupi]