MC_SetPosition (FB)

FUNCTION_BLOCK MC_SetPosition

This function block shifts the coordinate system of an axis by manipulating both the set-point position as well as the actual position of an axis with the same value without any movement caused.

../../../../../../_images/plcopen.png

(Re-calibration with same following error). This can be used for instance for a reference situation. This function block can also be used during motion without changing the commanded position, which is now positioned in the shifted coordinate system. This block may just be called in: “StandStill”, “ContinuousMotion”, “ErrorStop” or “Disabled”.

  • RELATIVE means that position is added to the actual position value of the axis at the time of execution. This results in a recalibration by a specified distance.

  • ABSOLUTE means that the actual position value of the axis is set to the value specified in the position parameter.

InOut:

Scope

Name

Type

Comment

Input

Execute

BOOL

Starts the function block at rising edge.

Position

LREAL

[u] Reference position, used as Distance with Relative = TRUE. Range:
  • Linear Axis: Maximum range is 16#7FFFFFFF in increments, if configured in units, range will be limited to equivalent of 16#7FFFFFFF increments

  • Modulo Axis: Range will be limited by Modulo range defined

Relative

BOOL

TRUE = Relative, FALSE = Absolute

Output

Done

BOOL

Execution is finished

Busy

BOOL

The function block is not finished

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