SMC_GroupConvertPosition (FB)ΒΆ
FUNCTION_BLOCK SMC_GroupConvertPosition
Converts a position between different coordinate systems of an axis group.
If one of the coordinate systems is dynamic, the conversion between the coordinate systems is done at the time at the end of the bus task cycle.
The tool offset currently set in the axis group is used, not the tool offset
of the active movement. This can be overriden by the inputs
UseToolOffsetParameter and ToolOffset.
Note
the coordinate system used is not necessarily the one of the currently active movement. It is always the coordinate system that would be used for new movements.
- InOut:
Scope
Name
Type
Comment
Inout
AxisGroupReference to a group of axes
Inout Const
PositionInIn: Position to be converted
Input
EnableBOOLConverts the position while enabled
CoordSystemInCoordinate system of
PositionInCoordSystemOutCoordinate system of
PositionOutaRefTRAFO.AXISPOS_REFThe reference position of the axes. Only used if
CoordSystemOut=ACSandCoordSystemIn<>ACS.configTRAFO.CONFIGDATAThe kinematic configuration. Only used if
CoordSystemOut=ACSandCoordSystemIn<>ACS.UseToolOffsetParameterBOOLWhether to use the
ToolOffsetparameter. If set to FALSE, the last tool offset set by SMC_GroupSetTool is used.ToolOffsetThe tool offset used for converting the position.
Output
ValidBOOLTRUEif valid outputs are availableBusyBOOLThe FB is not finished
ErrorBOOLSignals that an error has occurred within the function block
ErrorIDSMC_ERRORError identification
PositionOutThe position converted to coordinate system
CoordSystemOutconfigOutTRAFO.CONFIGDATAThe kinematic configuration that belongs to a cartesian position. The configuration is calculated when an axis position gets converted to a cartesian position, i.e.
CoordSystemIn=ACSandCoordSystemOut<>ACS. Otherwise, the givenconfigis returned. For rotary axes with multiple periods,configOutcontains the periods determined by the axis positions. Automatic period selection can be enabled using SMC_KinConfigActivateAutomaticPeriods.