MC_MoveRelative (FB)¶
FUNCTION_BLOCK MC_MoveRelative
This function block commands a controlled motion of a specified distance. The motion ends in standstill (unless blended to a followup movement).
- Example
- Use of
MC_MoveRelative
The illustration shows how two instances (First
andSecond
) of typeMC_MoveRelative
are combined.In the left-hand part of the illustration,Second
is called afterFirst
. IfFirst
has reached the specified position distance 6000, the velocity is 0 andFirst.Done
is set. Then theSecond
instance will cause the axis to move to position 10000.In the right-hand part of the illustration, the execution is started bySecond
whileFirst
is still operating. The motion ofFirst
is interrupted and aborted by theTest
signal, which is transmitted during the constant velocity phase ofFirst
. The distance 4000 is added to the actual position 3250. ThenSecond
moves the axis to the resulting position 7250.

- InOut:
Scope
Name
Type
Comment
Inout
Axis
Reference to axis
Input
Execute
BOOL
TRUE
: Starts execution.Distance
LREAL
Relative distance for the motion in technical unit [u].
Velocity
LREAL
Maximum velocity in techincal units per second [u/s].
Is always positive.
Is not necessarily reached.
Acceleration
LREAL
Acceleration in [u/s²].
Is always positive.
Increasing motor energy
Deceleration
LREAL
Deceleration in [u/s²].
Is always positive.
Decreasing motor energy
Jerk
LREAL
Maximum magnitude of jerk in [u/s³]
BufferMode
MC_BUFFER_MODE
Defines the chronological sequence of the FB relative to the previous block. If the function block is Busy, then only BufferMode=Aborting is allowed.
Output
Done
BOOL
TRUE
: Distance has been achieved.Busy
BOOL
TRUE
: Function block is in operation.Active
BOOL
Indicates that the FB has control on the axis
CommandAborted
BOOL
TRUE
: Execution has been interrupted by another function block instance operating on the axis.Error
BOOL
TRUE
: Error has occurred.ErrorID
SMC_ERROR
Error identification