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

AXIS_GROUP_REF_SM3

Reference to a group of axes

Inout Const

PositionIn

SMC_POS_REF

In: Position to be converted

Input

Enable

BOOL

Converts the position while enabled

CoordSystemIn

SMC_COORD_SYSTEM

Coordinate system of PositionIn

CoordSystemOut

SMC_COORD_SYSTEM

Coordinate system of PositionOut

aRef

TRAFO.AXISPOS_REF

The reference position of the axes. Only used if CoordSystemOut = ACS and CoordSystemIn <> ACS.

config

TRAFO.CONFIGDATA

The kinematic configuration. Only used if CoordSystemOut = ACS and CoordSystemIn <> ACS.

UseToolOffsetParameter

BOOL

Whether to use the ToolOffset parameter. If set to FALSE, the last tool offset set by SMC_GroupSetTool is used.

ToolOffset

MC_COORD_REF

The tool offset used for converting the position.

Output

Valid

BOOL

TRUE if valid outputs are available

Busy

BOOL

The FB is not finished

Error

BOOL

Signals that an error has occurred within the function block

ErrorID

SMC_ERROR

Error identification

PositionOut

SMC_POS_REF

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 and CoordSystemOut <> ACS. Otherwise, the given config 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.