MC_MoveLinRel
Description
MC_MoveLinRel commands interpolated linear movement of an axes group to the specified relative positions. The dimensionality of the move is determined by the number of axes mapped to the group.
-
-
- An error is returned if the group is in the GroupDisabled state.
- The maximum number of axes is set by the MaxNumberOfAxes input set in the MC_CreateAxesGrp function block.
- S-Curve motion is not currently supported. The JerkIn physics, jerk is the rate of change of acceleration; more precisely, the derivative of acceleration with respect to time input is currently ignored. S-Curve motion and the Jerk argument will be supported in a future release. .
When all motion has completed successfully, the state of the axes group goes to GroupStandby.
See Transition Between Moves for additional information.
Related Functions
MC_MoveLinAbs, MC_ErrorDescription
Coordinated Motion, the top-level topic for Coordinated Motion.
Arguments
Input
Execute |
Description |
On the rising edgeA rising edge is the transition of a digital signal from low to high. It is also called positive edge request to perform a linear relative move |
Data Type | BOOL | |
Range | 0, 1 | |
Unit | N/A | |
Default | — | |
AxesGroup |
Description |
The axis group that will perform the linear relative move |
Data Type | AXIS_GROUP_REF | |
Range | N/A | |
Unit | N/A | |
Default | — | |
Distance[] |
Description |
Array of distances for each axis in the group. |
Data Type | LREAL | |
Range | N/A | |
Unit | user units | |
Default | — | |
Velocity |
Description |
Maximum velocity of the defined path |
Data Type | LREAL | |
Range |
0 < Velocity < ( 20 * Acceleration ) and 0 < Velocity < ( 20 * Deceleration) See Limitations on Acceleration and Jerk for more information. |
|
Unit | user units per second | |
Default | — | |
Acceleration |
Description |
Maximum acceleration |
Data Type | LREAL | |
Range |
0 < Velocity < ( 20 * Acceleration ) See Limitations on Acceleration and Jerk for more information. |
|
Unit | user units per second2 | |
Default | — | |
Deceleration |
Description |
Maximum deceleration |
Data Type | LREAL | |
Range |
0 < Velocity < ( 20 * Deceleration) See Limitations on Acceleration and Jerk for more information. |
|
Unit | user units per second2 | |
Default | — | |
Jerk |
Description |
Maximum jerkIn physics, jerk is the rate of change of acceleration; more precisely, the derivative of acceleration with respect to time |
Data Type | LREAL | |
Range |
For trapezoidal velocity profiles: 0 For S-Curve velocity profiles: ( Velocity / 20 ) < Acceleration < ( 2 * Jerk ) and ( Velocity / 20 ) < Deceleration < ( 2 * Jerk ) See Limitations on Acceleration and Jerk for more information.
|
|
Unit | user units per second3 | |
Default | — | |
CoordSystem |
Description |
The coordinate system used when commanding the linear relative move Currently, only the ACS coordinate system is supported. See Coordinate Systems to learn more. |
Data Type | SINT | |
Range |
One of the following enumeration values:
|
|
Unit | N/A | |
Default | — | |
BufferMode |
Description |
Defines the chronological sequence of the function block relative to the previous block. MC_BUFFER_MODE_ABORTING = 0 = Abort The buffer mode is limited to MC_BUFFER_MODE_BUFFERED for groups with more than two axes. The blending modes (2, 3, 4, & 5) match the path velocity at the active move's endpoint. Some individual axis velocities may make an abrupt change if the path of the next move travels in a different direction. A transition move may be programmed at the See the table in Buffer Modes |
Data Type | SINT | |
Range | — | |
Unit | N/A | |
Default | — | |
TransitionMode |
Description |
Coupled with the TransitionParameter[ ], this input defines the shape and dynamics of the inserted contour to connect the current motion with the next motion in the queue. See Transition Between Moves for additional information. |
Data Type | SINT | |
Range |
The value is limited to the following:
The transition mode is limited to MC_TRANSITION_MODE_NONE for groups with more than three axes. |
|
Unit | N/A | |
Default | — | |
TransitionParameter[ ] |
Description |
This array is dependent on the TransitionMode specified. The transition parameter values are applied to the axis group. See Transition Mode Parameters for details. |
Data Type | LREAL | |
Range |
[0, N] The value of N is dependent on the TransitionMode specified. |
|
Unit | N/A | |
Default | — |
Output
Done | Description |
If True, then the command completed successfully. |
Data type | BOOL | |
Busy | Description |
If True, then the function block is executing. |
Data type | BOOL | |
Active | Description |
If True, then the function block is still controlling motion. |
Data type | BOOL | |
CommandAborted | Description |
If True, then the command was aborted by another function block. |
Data type | BOOL | |
Error | Description | If True, then an error has occured |
Data type | BOOL | |
ErrorID | Description | Indicates the error if Error output is set to TRUE. See table in PLCopen Function Block ErrorID Output |
Data type | INT |
Example
Structured Text
(* Inst_MC_MoveLinRelST example *)
Inst_MC_MoveLinRel( ExecuteLinearMove, Group1_Ref, DistanceList, Velocity, Acceleration, Deceleration, Jerk, CoordSystem, BufferMode, TranstionMode, TransitionParams );
IL
BEGIN_IL"Instruction list" This is a low-level language and resembles assembly CAL Inst_MC_MoveLinRel( ExecuteLinearMove, Group1_Ref, DistanceList, Velocity, Acceleration, Deceleration, Jerk, CoordSystem, BufferMode, TransitionMode, TransitionParams )
END_IL
FBD
FFLD