Linear moves can be programmed using absolute or relative positions using the following function blocks:
Prior to performing any coordinated moves, some setup is needed (see "Create a Linear or Circular Coordinated Motion Application"). Once these steps have been performed, a linear move can be performed.
In the following examples, two linear moves will be performed. The first move is an absolute linear move that goes from (0, 0) to (100, 200). The second move is a relative linear move that goes a distance of (-75, 50) from the end of the first move.The BufferMode input is set to 'Buffered', meaning this move will wait for the first move to complete before it begins executing.
To Perform an Absolute Linear Move
Call MC_MoveLinAbs (Execute, AxesGroup, PositionArray, Velocity, Acceleration, Deceleration, JerkIn physics, jerk is the rate of change of acceleration; more precisely, the derivative of acceleration with respect to time, CoordSystem, BufferMode, TransitionMode, TransitionParameter). PositionArray is an array of absolute end positions containing one position for each axis in the group. The inputs velocity, acceleration, deceleration, and jerkIn physics, jerk is the rate of change of acceleration; more precisely, the derivative of acceleration with respect to time establish the maximum values for the move.
In this example, PosArrayAbs[0] represent the x-axis and PosArrayAbs[1] represent the y-axis.
PosArrayAbs[0] := 100;
PosArrayAbs[1] := 200;
TransParam[0] := 0;
TransParam[1] := 0;
Inst_MC_MoveLinRel(TRUE, Group1_ref, PosArrayAbs, MaxVel, MaxAcc, MaxDec, 0, MC_COORDINATE_SYSTEM_ACS, 1, 0, TransParam);
In the example a linear move will be performed on axis group 'Group1_ref'.
To Perform a Relative Linear Move
Call MC_MoveLinRel (Execute, AxesGroup, Distance, Velocity, Acceleration, Deceleration, Jerk, CoordSystem, BufferMode, TransitionMode, TransitionParameter). The Distance input is an array of distances, one distance for each axis in the group. The inputs velocity, acceleration, deceleration, and jerk establish the maximum values for the move.
In this example, DistArrayRel[0] represent the x-axis and DistArrayRel[1] represent the y-axis.
DistArrayRel[0] := -75.0; // Start pt 100 – rel 75 -> 25 absolute end pt
DistArrayRel[1] := 50.0; // Start pt 200 + rel 50 -> 250 absolute end pt
TransParam[0] := 0;
TransParam[1] := 0;
Inst_MC_MoveLinRel(TRUE, Group1_ref, DistArrayRel, MaxVel, MaxAcc, MaxDec, 0, MC_COORDINATE_SYSTEM_ACS, 1, 0, TransParam);
In the example above, all the variables have the same meaning as the absolute linear example except DistArrayRel. DistArrayRel contains the relative distance to move for each axis in the group. The axis stored in position 0 (IdentInGroup) of the group will be moved a distance of -75.0. The axis stored in postiion 1 of the group will be moved a distance of 50.0.
To Perform a Linear Move With More Than Two Axes
The dimensionality of the move is determined by the number of axes mapped to the group. This implies that a group which could hold a maximum of three or more axes will do two dimensional moves if it only has two valid axes mapped to it.
In order to perform higher dimensional moves, additional axes must be added to the group. The steps to do this are detailed in Create a Linear or Circular Coordinated Motion Application.
After the additional axes are added perform the following steps.
|
Copyright © 2015 Kollmorgen™ |
|