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
AxisGroup
Reference to a group of axes
Inout Const
PositionIn
In: Position to be converted
Input
Enable
BOOL
Converts the position while enabled
CoordSystemIn
Coordinate system of
PositionIn
CoordSystemOut
Coordinate system of
PositionOut
aRef
TRAFO.AXISPOS_REF
The reference position of the axes. Only used if
CoordSystemOut
=ACS
andCoordSystemIn
<>ACS
.config
TRAFO.CONFIGDATA
The kinematic configuration. Only used if
CoordSystemOut
=ACS
andCoordSystemIn
<>ACS
.UseToolOffsetParameter
BOOL
Whether to use the
ToolOffset
parameter. If set to FALSE, the last tool offset set by SMC_GroupSetTool is used.ToolOffset
The tool offset used for converting the position.
Output
Valid
BOOL
TRUE
if valid outputs are availableBusy
BOOL
The FB is not finished
Error
BOOL
Signals that an error has occurred within the function block
ErrorID
SMC_ERROR
Error identification
PositionOut
The position converted to coordinate system
CoordSystemOut
configOut
TRAFO.CONFIGDATA
The 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
=ACS
andCoordSystemOut
<>ACS
. Otherwise, the givenconfig
is returned. For rotary axes with multiple periods,configOut
contains the periods determined by the axis positions. Automatic period selection can be enabled using SMC_KinConfigActivateAutomaticPeriods.