Events – After a wait time. Related TML Instructions and Data

Setting this event allows you to introduce a delay in the execution of the TML program.

The monitored event is: when relative time (TML variable RTIME) is equal or over a value or the value of a variable. The relative time RTIME is computed with formula:

RTIME = ATIME – TIME0,

where        ATIME is a 32-bit absolute time counter, incremented by 1 at each slow loop sampling period and TIME0 is the ATIME value when the wait event was set. After power on, TIME0 is set to 0. RTIME is updated together with ATIME, at each slow loop sampling period.  

Remark:

ATIME and RTIME start ONLY after the execution of the ENDINIT (end of initialization) command. Therefore you should not set wait events before executing this command
After setting a wait time event, in order to effectively execute the time delay, you need to wait for the event to occur, using WAIT!

Variables

ATIME        Absolute time counter. Incremented at each slow loop sampling period. Starts after execution of ENDINIT command. Measured in time units

RTIME                Relative time. RTIME = ATIME – TIME0. Measured in time units

TIME0                Absolute time when last wait event was set. Measured in time units

Instructions

!RT value32Introduce a time delay equal with value32. Value32 is a 32-bit long                integer number. Measured in time units

!RT var32        Introduce a time delay equal with value of var32. Var32 is a 32-bit long integer TML variable or parameter. Measured in time units

UPD!                Update the motion mode and/or the motion parameters when the programmed event occurs

STOP!                Stop motion with the acceleration/deceleration set in CACC, when the programmed event occurs

WAIT! value16Wait until the programmed event occurs. If the command is followed by value16, the wait ends after the time interval specified in this 16-bit integer value. Value16 is measured in time units

Programming Example

       //Introduce a 100 ms delay

!RT 100;        // set event: After a wait of 100 slow-loop periods

// 1 slow-loop period = 1ms

WAIT!;        // wait the event to occur

See also:

Events – When the actual motion is completed. Related TML Instructions and Data

Events – Function of motor or load position Related TML Instructions and Data

Events – Function of motor or load speed Related TML Instructions and Data

Events – Function of reference Related TML Instructions and Data

Events – Function of inputs status Related TML Instructions and Data

Events – Function of 32-bit variable value Related TML Instructions and Data

Events – TML Programming Details