MC_MoveRelative (FB)

FUNCTION_BLOCK MC_MoveRelative

This function block commands a controlled motion of a specified distance relative to the actual position at the time of the execution.

../../../../../../_images/plcopen.png
  • This action completes with velocity zero if no further action are pending.

Example

The following figure shows the example of the combination of two MC_MoveRelative function blocks:

1. The left part of timing diagram illustrates the case if the second function block is called after the first one. If the first one reaches the commanded distance 6000 (and the velocity is 0) then the output Done causes the second Function Block to move to the distance 10000.

2. The right part of the timing diagram illustrates the case if the second move function blocks starts the execution while the first function block is still executing. In this case the first motion is interrupted and aborted by the test signal during the constant velocity of the first function block. The second function block adds on the actual position of 3250 the distance 4000 and moves the axis to the resulting position of 7250.

../../../../../../_images/Mc_MoveRelative_Ex.png
InOut:

Scope

Name

Type

Comment

Input

Execute

BOOL

Starts the function block at rising edge

Distance

LREAL

[u] = Technical unit, Relative distance for the motion. Range: Maximum range is 16#7FFFFFFF in increments, if configured in units, range will be limited to equivalent of 16#7FFFFFFF increments

Velocity

LREAL

[u/s] Value of the maximum velocity (not necessarily reached). Range: >0

Acceleration

LREAL

[u/s°°2] Value of the acceleration (increasing energy of the motor). Range: >0. If value = 0, Acceleration will be equal to parameter paraMaxAccelerationAppl.If value > 0 and <= 1,Acceleration will be limited to 1.

Deceleration

LREAL

[u/s°°2] Value of the deceleration (decreasing energy of the motor). Range: >0. If value = 0, Deceleration will be equal to parameter paraMaxDecelerationAppl.If value > 0 and <= 1,Deceleration will be limited to 1.

Jerk

LREAL

[u/s°°3] Value of the jerk. Range: >=0

BufferMode

MC_BufferMode

Not supported, default mcABORTING used

Output

Done

BOOL

Shows the status of the function block. Done = TRUE if the execution is finished

Busy

BOOL

The function block is not finished

Active

BOOL

Indicates that the function block has control on the axis

CommandAborted

BOOL

Command is aborted by another command from other PLCopen function block

Error

BOOL

Signals that error has occurred within function block

ErrorID

ERROR_ID

Error identification. For error details refer to Enumeration ERROR_ID

Inout

Axis

Axis_Ref

Reference to axis