Vector Mode – Related TML Instructions and Data

Parameters

MASTERIDContains the axis ID of the host/master where the motion controller must send the messages related to segment buffer. It must be set before starting the Linear Interpolation 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 messages to be sent via RS-232
SEGBUFBEGINSpecifies the start address of the segment buffer
SEGBUFLENSpecifies the segment buffer length expressed in segments

RESRATIOX, RESRATIOY, RESRATIONZ Defines the position feedback resolution ratio for each axis. The motion controller will use the best resolution for splitting the segments in PVT points. The fines encoder resolution will be used to compute the scaling factors for the other axes.

NLINESTAN Encoder resolution for tangent axis

VSPD – vector speed for current segment. Measured in speed units

VACC – vector acceleration for current segment. Measured in acceleration units

 

 

Variables

SEGBUFSTS        Contains the segment buffer status.

SEGBUFSTS bit description

SEGBUFSTSDescription

MACOMMANDVector Mode configuration as was set with the SETMODE command
VTPOS        Vector Target load position – vector position reference computed by the reference generator at each slow loop sampling period. Measured in position units

 

Instructions

SETMODE        value        Set Vector Mode operation as specified by value:

Vector Mode operation mode (a copy of value is saved in the TML variable MACOMMAND)

SETMODEdescription

VPLANE(X_axis, Y_axis, Z_axis)        Set the coordinate system for 2D/3D move.

MODE VM        Set Vector motion mode.

VSEG1 (X_inc, Y_inc) VSEG2 (X_inc, Y_inc)        Describes a linear segment.

CIRCLE1 (Radius, Theta_inc) CIRCLE2 (Radius, Theta_start)        Describes a circular segment.

UPD        Update motion parameters and start new motion mode

STOP        Stop the motion

Remarks:

When a sequence of segments is executed from a TML program they are processed one after the other, until the segment buffer fills up. At this point the TML program stops until the buffer starts to empty. Therefore, the next segment is processed in the cadence of the segments execution. At the end of the sequence, the buffer starts to empty and next TML instructions start to execute. This may lead to incorrect operation if for example a new motion mode is set while there are still segments in the buffer waiting to be executed. In order to avoid this situation, it is mandatory to end the segments sequence with an event on motion complete and wait until this event occurs.
The motion complete event is set when all the slave axes signal the end of their movement.

 

 

Programming Example

// Vector Mode sequence executed from non-volatile

// memory of the drive. X and Y axis have identical feedback

// resolution identical (2000 counts/rev)

 SETMODE 0xCF00; //Clear buffer

 VPLANE (A, B, D);// Axes A and B define the coordinate system.

//D axis is the tangent axis.

 RESRATIOX=0u;

 RESRATIOY=0u;

 NLINESTAN=2000;        // Tangent axis resolution

 MODE VM; // Set Vector Mode

 VACC = 0.0006; // Vector Acceleration = 2[m/s^2]

 VSPD = 0.3183; // Vector Speed = 1[m/s]

 // Increment position with (X, Y) = (100[IU], 100[IU])

 VSEG1 100L, 100L; VSEG2 100L, 100L;

 UPD; //Execute immediate

 // Increment position with (X, Y) = (101[IU], 101[IU])

 VSEG1 101L, 101L; VSEG2 101L, 101L;

 VACC = 0.0064; // Vector Acceleration = 20[m/s^2]

 // Circular segment of radius 9.42478[mm], with initial angle 20[deg] and angle increment 50[deg])

 CIRCLE1 3L, 50.; CIRCLE2 3L, 20.;

 VACC = 0.0006; // Vector Acceleration = 2[m/s^2]

 VSPD = 0.3183; // Vector Speed = 1[m/s]

 // Increment position with (X, Y) = (102[IU], 102[IU])

 VSEG1 102L, 102L; VSEG2 102L, 102L;

 VSPD = 0.9549; // Vector Speed = 3[m/s]

 // Circular segment of radius 1e+001[mm], with initial angle 21[deg] and angle increment 51[deg])

 CIRCLE1 4L, 51.; CIRCLE2 4L, 21.;

 // Insert End Segment

 VSEG1 0L, 0L; VSEG2 0L, 0L;

See also:

VectorMode – TML Programming Details

TML Description