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 and Second) of type MC_MoveRelative are combined.
In the left-hand part of the illustration, Second is called after First. If First has reached the specified position distance 6000, the velocity is 0 and First.Done is set. Then the Second instance will cause the axis to move to position 10000.
In the right-hand part of the illustration, the execution is started by Second while First is still operating. The motion of First is interrupted and aborted by the Test signal, which is transmitted during the constant velocity phase of First. The distance 4000 is added to the actual position 3250. Then Second moves the axis to the resulting position 7250.
../../../_images/MoveRelativeExample.png
InOut:

Scope

Name

Type

Comment

Inout

Axis

AXIS_REF_SM3

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