PT – TML Programming Details

In the PT motion mode the load/motor is controlled in position. The built-in reference generator computes a positioning path using a series of points. Each point specifies the desired Position, and Time, i.e. contains a PT data. Between the PT points the reference generator performs a linear interpolation.

The PT Interpolated mode is typically used together with a host, which sends PT points via a communication channel. Due to the interpolation, the PT mode offers the possibility to describe an arbitrary position contour using a reduced number of points. It is particularly useful when the motion reference is computed on the fly by the host like for example in vision systems.  By reducing the number of points, both the computation power and the communication bandwidth needed are substantially reduced optimizing the costs. When the PT motion mode is used simultaneously with several drives/motors having the time synchronization mechanism activated, the result is a very powerful multi-axis system that can execute complex synchronized moves.

The PT motion mode can be started only when the previous motion is complete. However, you can switch at any moment to another motion mode. The PT mode can be relative (following a CPR command) or absolute (following a CPA command). In the absolute mode, each PT point specifies the position to reach. The initial position may be either the current position reference TPOS or a preset value read from the TML parameter PVTPOS0. In the relative mode, each PT point specifies the position increment relative to the previous point. In both cases, the time is relative to the previous point i.e. represents the duration of a PT segment. For the first PT point, the time is measured from the starting of the PT mode.

Each time when a new PT point is read from a TML program or received via a communication channel, it is saved into the PT buffer. The reference generator empties the buffer as the PT points are executed. The PT buffer is of type FIFO (first in, first out). The default length of the PT buffer is 7 PT points. The drive/motor automatically sends messages to the host when the buffer is full, low or empty.  The messages contain the PT status (TML variable PVTSTS). The host address is taken from the TML parameter MASTERID. The buffer full condition occurs when the number of PT points in the buffer is equal with the buffer size. The buffer low condition occurs when the number of PT points in the buffer is less or equal with a programmable value – the low level. The buffer empty condition occurs when the buffer is empty and the execution of the last PT point is over. When the PT buffer becomes empty the drive/motor keeps the position reference unchanged.

Remarks:

The PVT and PT modes share the same buffer. Therefore the TML parameters and variables associated with the buffer management are the same.
Before activating the PT mode, you must place at least one PT point in the buffer
The buffer low condition is set by default when the last PT point from the buffer is read and starts to be executed
Both the PT buffer size and its start address are programmable via TML parameters PVTBUFBEGIN and PVTBUFLEN. Therefore if needed, the PT buffer size can be substantially increased.

 

Each PT point also includes a 7-bit integrity counter. The integrity counter value must be incremented by the host by one, each time a new PT point is sent to the drive/motor. If the integrity counter error checking is activated, the drive compares its internally computed integrity counter value with the one sent with the PT point (i.e. with the PTP command). This comparison is done every time a PTP instruction is received. If the values of the two integrity counters do not match, the integrity check error is triggered, the drive/motor sends the PVTSTS to the host with PVTSTS.12 =1 and the received PT point is discarded. Each time a PT point is accepted (the integrity counters match or the integrity counter error checking is disabled), the drive automatically increments its internal integrity counter. The default value of the internal integrity counter after power up is 0. Its current value can be read from the TML variable PVTSTS (bits 6..0). The integrity counter can also be set to any value using TML command SETPT.

See also:

PT – Related TML Instructions and Data

TML Description