MC_TrackRotaryTable (FB)¶
FUNCTION_BLOCK MC_TrackRotaryTable
This function block tracks a piece on a rotary table.
Based on the position and orientation of the rotary table and on the position and orientation of the piece relative to the table, the tracking is performed using SMC_SetDynCoordTransformEx.
The rotation, angular velocity, etc. of the rotary table is given by a single axis.
This FB may be called with a new rising edge on Execute only after the
configured dynamic coordinate system is no longer in use by any movement,
otherwise error SMC_AXIS_GROUP_PCS_STILL_IN_USE will be returned.
See output InUse
.
Note
No dead time compensation is done. In case the axis is an encoder, it is recommended to use a logical axis to account for the dead time.
See also MC_TrackConveyorBelt.
The function block SMC_SetDynCoordTransformEx provides a more general interface.
This FB does not start a movement (administrative FB). The movement is initiated by a command in PCS.
- InOut:
Scope
Name
Type
Comment
Inout
AxisGroup
Reference to the axis group.
RotaryTable
AXIS_REF_SM3
Reference to the axis of the rotary table. The user units of the axis must be angle degrees (0°..360°). If
RotaryTable.bRegulatorOn
is set when the FB is started, the set values will be used. Otherwise the act values will be used.Input
Execute
BOOL
Start the action at rising edge
RotaryTableOrigin
Specifies the position and orientation of the rotary table in world coordinates (WCS). This defines the coordinate system of the rotary table in which the position of an object lying on the table can be specified. The z-axis of the coordinate system is the axis of rotation of the table.
InitialObjectPosition
Specifies the position and orientation of an object lying on the rotary table relative to the table.
CoordSystem
Which PCS is to be set (PCS_1 or PCS_2)
Name
STRING
The name of the coordinate system.
Output
Done
BOOL
The transformation has been set successfully
Busy
BOOL
The FB is not finished
InUse
BOOL
Signals that the axis group still needs the referenced dynamic coordinate system. A new rising edge of
Execute
will lead to the errorSMC_AXIS_GROUP_PCS_STILL_IN_USE
. For this information to be up-to-date, the function block has to be called continuously (even if alreadyDone
). A dynamic coordinate system becomesInUse
when a movement to a position in the coordinate system is commanded. It remainsInUse
until the target position of a movement to a different coordinate system has been reached.Error
BOOL
Signals that an error has occurred within the function block
ErrorID
SMC_ERROR
Error identification