MC_MoveDirectRelative (FB)¶
FUNCTION_BLOCK FINAL MC_MoveDirectRelative
This function block commands a movement of an axis group by the specified relative distance in the specified coordinate system .
Each axis is moved to its target position independently, the movement is only synchronized such that all axes reach the target at the same time. This means that the path travelled by the TCP depends on the kinematic transformation used. In general, it will not be a line. (This is called a point to point or PTP movement.)
Note
The path travelled by the TCP results indirectly from the movement of the axes and the kinematic transformation. It is not easy to predict the path based on the start- and end-position of the movement. However, once a PTP movement has been taught-in, the path is not modified by changing the override, interrupting, halting, or stopping. In more detail:
The path is independent of the override.
The path is independent of the limits of the axes (limits for velocity, acceleration, deceleration, and jerk). The only exception is for determining the cutoff points in TMStartVelocity mode.
In TMCornerDistance mode, the path is independent of the blending type (BlendingHigh/Low/Previous/Next).
The path is not left on halt or stop (MC_GroupHalt/MC_GroupStop).
The path is not left on interrupt or continue (MC_GroupInterrupt/MC_GroupContinue).
The acceleration, constant velocity, and deceleration phase for all axes begins and ends at the same time.
Note
The velocity/acc-/deceleration/jerk limits of each axis are properties of each axis and not specified within this function block. See also inputs
VelFactor
,AccFactor
andJerkFactor
.The transition mode TMCornerDistance is only supported if the start- and end-position of the movement are given in the ACS. Otherwise, an error is reported.
- The following example shows the behaviour of
MC_MoveDirectRelative
. - All positions are related to the MCS:
Starting at position p0 (10; 10) a
MC_MoveLinearAbsolute
to position p1 (80; 35) is commanded.While the TCP is moving towards p1, the
MC_MoveLinearAbsolute
command is aborted by aMC_MoveDirectRelative
command. The actual position of the TCP, whenMC_MoveDirectRelative
becomes active, is (44.5; 21.63).The TCP leaves the line p0 .. p1 and moves to the new target position p2 (54.5; 41.63). The resulting trajectory depends on the kinematic transformation of the axis group.

- InOut:
Scope
Name
Type
Initial
Comment
Inout
AxisGroup
Reference to a group of axes
Input
Execute
BOOL
Start the motion at rising edge
Distance
Distance in the specified coordinate system.
The relative orientation in Distance.A/.B/.C is interpreted as a rotation.
The resulting orientation of the end position is then determined as Rot_End(u) = Rot_Rel(Rot_Start(u)) where Rot_Rel is the rotation and Rot_Start is the rotation that belongs to the start position of the movement.
Note
The rotation that belongs to an orientation is the function that transforms direction vectors u from the TCP coordinate system to the base coordinate system
CoordSystem
. The corresponding rotation matrix can be computed from A/B/C as R = Rz(A) * Ry(B) * Rz(C).MovementType
Type of PTP movement. No longer supported. This obsolete input will be removed in future versions.
CoordSystem
Applicable coordinate system
BufferMode
MC_BUFFER_MODE
Defines the chronological sequence of the FB relative to the previous block.
TransitionMode
Defined the blending in case of a blending buffer mode
TransitionParameter
ARRAY [0..(SMC_RCNST.MAX_TRANS_PARAMS - 1)] OF LREAL
Parameters for blending
VelFactor
LREAL
1
The maximum velocity of each axis is multiplied by this factor, which must be in the range ]0, 1].
AccFactor
LREAL
1
The maximum acceleration of each axis is multiplied by this factor, which must be in the range ]0, 1].
JerkFactor
LREAL
1
The maximum jerk of each axis is multiplied by this factor, which must be in the range ]0, 1].
TorqueFactor
LREAL
1
The maximum torque of each axis is multiplied by this factor, which must be in the range ]0, 1]. A dynamic model must have been set using SMC_GroupSetDynamics for this factor to have an effect.
Name
STRING
‘MC_MoveDirectRelative’
The name of the movement.
Output
Done
BOOL
Commanded end positions reached for all axes
Busy
BOOL
The FB is not finished
Active
BOOL
Indicates that the FB has control on the axis
CommandAborted
BOOL
Command is aborted by another command
CommandAccepted
BOOL
The command has been accepted by the axis group. If the output becomes
TRUE
, the function block instance can be used to command the next movement with a new rising edge onExecute
. While the output isFALSE
, keep calling the function block without a new rising edge ofExecute
. The output is reset toFALSE
on a falling edge ofExecute
.Error
BOOL
Signals that an error has occurred within the function block
ErrorID
SMC_ERROR
Error identification
MovementId
SMC_Movement_Id
The unique identifier of the movement. Valid if
CommandAccepted
orDone
isTRUE
.