MC_SetPosition (FB)¶
FUNCTION_BLOCK MC_SetPosition
This function block shifts the coordinate system of an axis. Both the set and actual position of the axis are offset by the same amount. No movement is caused by this operation. This recalibration can be used, for instance, for referencing an axis.
The function block can be called while the axis is moving. In this case, the resulting movement of the drive is not affected. The same set positions in increments are sent to the drive as if MC_SetPosition had not been called. Only the set positions in technical units (fSetPosition) are shifted.
Important
ABSOLUTE (mode = FALSE) means that the new axis position is the value of input
Position.RELATIVE (mode = TRUE) means that the new axis position is the sum of the current axis position and the value of input
Position.
Note
This function block does not affect the trajectory of already commanded movements. However, the target position of absolute movements commanded after MC_SetPosition will be considered relative to the shifted coordinate system.
- InOut:
Scope
Name
Type
Comment
Inout
AxisReference to axis
Input
ExecuteBOOLRising edge: Starts the execution of the function block.
PositionLREALPosition unit [u] (means ‘Distance’ if
Mode= RELATIVE)ModeBOOLTRUE= RELATIVE,FALSE= ABSOLUTEOutput
DoneBOOLTRUE: The position has been shifted.BusyBOOLTRUE: Execution of function block is not finished yet.ErrorBOOLTRUE: An error has occurred within the function block.ErrorIDSMC_ERRORError identification