MC_MoveContinuousRelative (FB)

FUNCTION_BLOCK MC_MoveContinuousRelative

This function block commands a controlled motion of a specified relative distance, ending with the specified velocity.

../../../../../../_images/plcopen.png
  • If the commanded position is reached and no new motion command is put into the buffer, the axis continues to run with the specified “EndVelocity”.

  • The function block will start the axis with state DiscreteMotion, while positioning.

  • It will change to state continuous motion (meaning: it will not stop by itself) with EndVelocity <> 0.

  • It will change to standstill with EndVelocity = 0.

  • This function block is specified here for systems without the support for the “BufferMode”.

Sampling traces showing the effect of the sign of the value of the input EndVelocity

Input EndVelocity with positive direction

../../../../../../_images/MC_MoveContinuousRelative_Ex1.png
Input EndVelocity with negative direction

../../../../../../_images/MC_MoveContinuousRelative_Ex2.png
Example for MC_MoveContinuousRelative

../../../../../../_images/MC_MoveContinuousRelative_Ex3.png

Note

Input validation is done at the rising edge of Execute. If function block is in Active/Busy state, new value at input will not be validated. If value passed is invalid function block will continue execution with last valid value.

InOut:

Scope

Name

Type

Comment

Input

Execute

BOOL

Starts the function block at rising edge

ContinuousUpdate

BOOL

Decide if new input parameters are processed during the movement

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

EndVelocity

LREAL

[u/s] Signed value for the end veloicty, determines the direction when ending the positioning movement

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

InEndVelocity

BOOL

Commanded position finally reached

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