Linear Interpolation – Related TML Instructions and Data |
Parameters
RESRATIOX, RESRATIOY, RESRATIONZ Defines the position feedback resolution for each axis. The motion controller will use the best resolution for computing the segments in PVT points. VSPD – vector speed for current segment. Measured in speed units VACC – vector acceleration for current segment. Measured in acceleration units
Variables SEGBUFSTS Contains the status of segment buffer. SEGBUFSTS bit description
Instructions SETMODE value Set Linear Interpolation operation as specified by value: Linear Interpolation operation mode (a copy of value is saved in the TML variable MACOMMAND) LPLANE (X_axis, Y_axis, Z_axis) Set the coordinate system for 2D/3D move. MODE LI Set Linear Interpolation motion mode. LPOS1 (X_inc, Y_inc, Z_inc) LPOS2 (X_inc, Y_inc, Z_inc) Describes a linear segment. UPD Update motion parameters and start new motion mode STOP Stop the motion Remarks:
Programming Example // Linear Interpolation sequence executed from non-volatile // memory of the drive. All slave execute a linear movement and // have the feedback resolution identical (2000 counts/rev) SETMODE 0xCF00; //Clear buffer LPLANE (A, B, D); //Axes A, B and D define the coordinate //system of the movement RESRATIOX=0u; // All axes have the same feedback resolution RESRATIOY=0u; // therefore the resolution ratio is 0 RESRATIOZ=0u; MODE LI; // Set Linear Interpolation Mode VACC = 0.0002; // Vector Acceleration = 0.5[m/s^2] VSPD = 1.2732; // Vector Speed = 4[m/s] // Increment position with (X, Y, Z) = (1e+002[mm], 3e+001[mm], 3e+001[mm]) LPOS1 32L, 10L, 11L; LPOS2 32L, 10L, 11L; UPD; //Execute immediate // Increment position with (X, Y, Z) = (3e+001[mm], 3e+001[mm], 1e+002[mm]) LPOS1 10L, 8L, 32L; LPOS2 10L, 8L, 32L; // Insert End Segment LPOS1 0L, 0L, 0L; LPOS2 0L, 0L, 0L; See also: |