Motion PT – TML Instructions and Data |
Parameters MASTERID Contains the axis ID of the host/master where the drive/motor must send the PT messages. It must be set before starting the PT mode. The MASTERID value must be set as: host ID << 4 + 1, where host ID is a number between 1 and 255 representing the host ID. By default, after power-on the host ID is set equal with the drive address causing all the PT messages to be sent via RS-232
PVTPOS0 Specifies for absolute mode, the initial position from which to start computing the distance to move up to the first PT point. An alternate option is to consider TPOS as initial position. Selection between these 2 options is done at PT initialization via TML command SETPT. The default value of PVTPOS0 is 0. PVTSENDOFF When set to 1, disables transmission of messages during PT mode. By default is set to 0 and the transmission is enabled
Variables PVTSTS Contains the PT motion mode status. PVTSTS bit description
APOS_LD Actual load position. Measured in position units. Alternate name: APOS ASPD_LD Actual load speed – measured in speed units APOS_MT Actual motor position. Measured in motor position units.
Instructions SETPT value Set PT operation as specified by value: PT operation mode (a copy of value is saved in the TML variable PVTMODE) CPR PT mode is relative CPA PT mode is absolute MODE PT Set PT motion mode.
PTP Position, Time, Counter Defines a PT point, where: Position – is the PT point position, measured in position units. In absolute mode, it is the position to reach. In relative mode, it is the position increment from the previous PT point. The position value is a 32-bit long integer. Time – is the PT point time measured in time units. The time value is a 16-bit unsigned integer Counter – is the PVT point integrity counter. It is a 7-bit unsigned integer with values between 0 and 127. UPD Update motion parameters and start new motion mode STOP Stop motion Remarks:
Programming Example // PT sequence. Position feedback: 500 lines incremental // encoder (2000 counts/rev) SETPVT 0xC000; //Clear PT buffer, disable counter check //Don’t change counter & buffer low condition MODE PT; // Set PT Mode TUM1;//Start from actual value of position reference CPR; PTP 2000L, 100U, 0; //PT(1[rot], 0.1[s]) UPD; //Execute immediate PTP 0L, 100U, 0; //PT(1[rot],0.2[s]) PTP -2000L, 100U, 0; //PT(0[rot],0.3[s]) !MC; WAIT!; //wait for completion See also: |