Events – TML Programming Details

An event is a programmable condition, which once set, is monitored for occurrence. You can do the following actions in relation with an event:

A)Change the motion mode and/or the motion parameters, when the event occurs
B)Stop the motion when the event occurs
C)Wait for the programmed event to occur

Remark: The programmed event is automatically erased if the event is reached, if the timeout for the wait is reached or if a new event is programmed.

Only a single event can be programmed at a time. The Table below presents all the events with their mnemonic and a short description.

TMLProgrammingEvents

If you want to change the motion mode and/or the motion parameters when an event occurs, you must do the following:

Program/define one of the above events
Set the new motion mode and/or the motion parameters
Set one of the TML commands: UPD! (Update on event) or STOP! (Stop on event), which will become effective when the programmed event occurs

Remark: After you have programmed a new motion mode and/or new motion parameters with update on event, you need to wait until the programmed event occurs, using the TML command WAIT!. Otherwise, the program will continue with the next instructions that may override the event monitoring.

The instruction WAIT!, stops the TML program further execution, until the programmed event occurs. During this period, only the TML commands received via a communication channel are processed. You may also specify the time limit for the wait, by adding a time value after the WAIT! command: WAIT! time_limit. If the monitored event doesn’t occur in the time limit set, the wait loop is interrupted, the event checking is reset and the TML program passes to the next instruction.  

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 – After a wait time 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