SMC_ReadKinTransformForAxis (FB) ¶ FUNCTION_BLOCK SMC_ReadKinTransformForAxis This function block returns the kinematic transformation for a given axis. If a coupled kinematics is used for the axis group, each axis either belongs to the position kinematics, the orientation kinematics, or to no transformation (additional axis). If no coupled kinematics is used, then each axis that is part of the kinematics (i.e. that is not an additional axis) belongs the the main kinematics. For example, to test whether a given axis with index i is an orientation or position axis, call the FB with IdentInGroup = i and then test the returned KinTransform: itfOri : TRAFO.ISMOrientationKinematics ; itfPos : TRAFO.ISMPositionKinematics ; isOriAxis := __QUERYINTERFACE ( KinTransform , itfOri ); isPosAxis := __QUERYINTERFACE ( KinTransform , itfPos ); InOut: Scope Name Type Comment Inout AxisGroup AXIS_GROUP_REF_SM3 Reference to a group of axis Input Enable BOOL Gets the kinematic transformation information of the axis continuously while enabled IdentInGroup IDENT_IN_GROUP_REF_SM3 The index of the axis inside the axis group 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 KinTransform TRAFO.MC_KIN_REF_SM3 The kinematic transformation for the axis identInKinematics UDINT The index of the axis inside KinTransform
Movement ¶ GroupInterrupt SMC_GroupInterruptAt (FunctionBlock) SMC_GroupInterruptPosition (Union) SMC_GroupInterruptPositionMvtRel (Struct) MC_GroupContinue (FunctionBlock) MC_GroupHalt (FunctionBlock) MC_GroupInterrupt (FunctionBlock) MC_GroupStop (FunctionBlock) MC_MoveCircularAbsolute (FunctionBlock) MC_MoveCircularRelative (FunctionBlock) MC_MoveDirectAbsolute (FunctionBlock) MC_MoveDirectRelative (FunctionBlock) MC_MoveLinearAbsolute (FunctionBlock) MC_MoveLinearRelative (FunctionBlock) SMC_GroupEnableResumeAfterError (FunctionBlock) SMC_GroupJog (FunctionBlock) SMC_GroupJog2 (FunctionBlock) SMC_GroupUpdateContinueData (FunctionBlock) SMC_GroupWait (FunctionBlock)
GroupInterrupt ¶ SMC_GroupInterruptAt (FunctionBlock) SMC_GroupInterruptPosition (Union) SMC_GroupInterruptPositionMvtRel (Struct)
GeoPrim_CreateLinear (FUN) ¶ FUNCTION GeoPrim_CreateLinear : BOOL InOut: Scope Name Type Inout errCtx SMRE.ErrorContext ef ElemFun Inout Const poseStart ElemFunPose poseDest ElemFunPose Input eps LREAL Return GeoPrim_CreateLinear BOOL
MC_GroupContinue (FB) ¶ FUNCTION_BLOCK MC_GroupContinue This function block transfers the axis group back to the situation stored in the continueData . It immediately returns CommandAborted if MC_GroupStop is active. An error is returned if the axis group is not in state GroupStandby. The axis group must be at the continue-position, which is stored in continueData . (See SMC_GroupGetContinuePosition .) If a CP-tracking-movement is to be continued, the axis group needs to be following the PCS at this position, otherwise the axes must be in state standstill . ..note:: The continue data can be recorded using MC_GroupInterrupt or SMC_GroupInterruptAt , by calling SMC_GroupSaveContinueData , or automatically on an axis group error when enabled, see SMC_GroupEnableResumeAfterError . ..note:: When trying to continue from a position in a dynamic coordinate system, the continue data has to be updated using SMC_GroupUpdateContinueData InOut: Scope Name Type Comment Inout AxisGroup AXIS_GROUP_REF_SM3 Reference to a group of axis Inout Const continueData SMC_AXIS_GROUP_CONTINUE_DATA The continue data stored by MC_GroupInterrupt . Input Execute BOOL Starts the function block on rising edge Output Done BOOL The operation has been finished successfully CommandAborted BOOL The command is aborted by another FB Busy BOOL The FB is not finished Error BOOL Signals that an error has occurred within the function block ErrorID SMC_ERROR Error identification
MC_GroupHalt (FB) ¶ FUNCTION_BLOCK FINAL MC_GroupHalt This function block commands a controlled motion stop. It aborts all other motion function blocks, except MC_GroupStop . The AxisGroup is moved to the state GroupMoving , until transferred to GroupStandby . Note The effective limits for deceleration and jerk are determined by the inputs Deceleration , Jerk , AccFactor , and JerkFactor . These limits can be exceeded in order to stay on the commanded path. Note In contrast to MC_GroupStop the given dynamic limits are influenced by an override set using MC_GroupSetOverride and by ancillary limits set using SMC_GroupSetAncillaryPathLimits and SMC_GroupSetAncillaryAxisLimits respectively. For halting point-to-point movements: the velocity/acc-/deceleration/jerk of each axis are properties of each axis and not specified within this function block. See also inputs AccFactor, and JerkFactor. SMC_GroupSaveContinueData and MC_GroupContinue can be used to continue on the original path after a halt, if ClearMovements is set to FALSE. The first movement after an MC_GroupHalt overwrites the state of the axis group, so SMC_GroupSaveContinueData has to be called before any new movement is commanded. If ClearMovements is set to FALSE and there are any movements in a dynamic coordinate system (see MC_TrackConveyorBelt , MC_TrackRotaryTable , MC_SetDynCoordTransform , or SMC_SetDynCoordTransformEx ) that are not yet Done when MC_GroupHalt is executed, the coordinate systems will remain InUse even after MC_GroupHalt is Done . InOut: Scope Name Type Initial Comment Inout AxisGroup AXIS_GROUP_REF_SM3 Reference to a group of axes Input Execute BOOL Start the action at rising edge Deceleration LREAL Value of the deceleration [u/s²]. Only used if a continuous-path movement is halted. Jerk LREAL Value of the jerk [u/s³]. Only used if a continuous-path movement is halted. AccFactor LREAL 1 The maximum deceleration of each axis is multiplied by this factor, which must be in the range ]0, 1]. JerkFactor LREAL 1 The maximum jerk of each axis is multiplied by this factor, which must be in the range ]0, 1]. TorqueFactor LREAL 1 The maximum torque of each axis is multiplied by this factor, which must be in the range ]0, 1]. A dynamic model must have been set using SMC_GroupSetDynamics for this factor to have an effect. ClearMovements BOOL TRUE If set to TRUE, all movements commanded before MC_GroupHalt are cleared after the axis group reaches standstill. In order to be able to continue the previous movements from the halt position using SMC_GroupSaveContinueData and MC_GroupContinue , ClearMovements has to be set to FALSE. Output Done BOOL Standstill has been reached Busy BOOL The FB is not finished Active BOOL Indicates that the FB has control on the axis CommandAborted BOOL Command is aborted by another command CommandAccepted BOOL The command has been accepted by the axis group. If the output becomes TRUE , the function block instance can be used to command the next movement with a new rising edge on Execute . While the output is FALSE , keep calling the function block without a new rising edge of Execute . The output is reset to FALSE on a falling edge of Execute . Error BOOL Signals that an error has occurred within the function block ErrorID SMC_ERROR Error identification MovementId SMC_Movement_Id The unique identifier of the movement. Valid if CommandAccepted or Done is TRUE .
MC_GroupInterrupt (FB) ¶ FUNCTION_BLOCK MC_GroupInterrupt This function block interrupts the on-going motion. It stops the group from moving, however does not abort the interrupted motion (meaning that at the interrupted FB the output CommandAborted will not be set and Busy is still high). To continue from the saved state, use MC_GroupContinue . Issuing MC_GroupContinue with the information written by this FB transfers the axis group back to the situation at issuing MC_GroupInterrupt . Note If a CP-tracking-movement is active, we halt on the path, thus not with respect to the MCS. Interrupting can only be aborted by MC_GroupStop . This FB immediately returns CommandAborted , if another MC_GroupInterrupt or MC_GroupStop is active. The FB SMC_GroupSaveContinueData is not required for MC_GroupInterrupt / MC_GroupContinue . The continue data is written once the Done output of MC_GroupInterrupt is set to TRUE . InOut: Scope Name Type Comment Inout AxisGroup AXIS_GROUP_REF_SM3 Reference to a group of axis continueData SMC_AXIS_GROUP_CONTINUE_DATA Written when getting Done Input Execute BOOL A rising edge starts the function block. Output Done BOOL Zero velocity reached Busy BOOL The FB is not finished CommandAborted BOOL Command is aborted by another command Error BOOL Signals that an error has occurred within the function block ErrorID SMC_ERROR Error identification mvtIdInterruptPosition SMC_Movement_Id Movemnet Id corresponding to the interrupt position
GeoPrim_Eval (FUN) ¶ FUNCTION GeoPrim_Eval : BOOL InOut: Scope Name Type Comment Inout errCtx SMRE.ErrorContext Inout Const ef ElemFun Inout v SM3M.SMC_VECTOR3D The position, given in the coordinate system of the element function. sx ParamState Input x LREAL t LREAL bComputePsArc BOOL Return GeoPrim_Eval BOOL
MC_GroupStop (FB) ¶ FUNCTION_BLOCK FINAL MC_GroupStop This function block commands a controlled motion stop and transfers the axis group to the state GroupStopping . It aborts any other motion command. While the axis group is in state GroupStopping, no other FB can perform any motion on the same axis group. After the axis group has reached standstill, the Done output is set to TRUE immediately. The axis group remains in the state GroupStopping as long as Execute is still TRUE or the axes are not yet in standstill. As soon as Done is set and Execute is FALSE , the axis group goes to state GroupStandBy . The command can only be aborted by MC_Power . Note The effective limits for deceleration and jerk are determined by the inputs Deceleration , Jerk , AccFactor , and JerkFactor . These limits can be exceeded in order to stay on the commanded path. Note In contrast to MC_GroupHalt the given dynamic limits are neither influenced by an override set using MC_GroupSetOverride , nor by axis limit factors set using SMC_GroupSetAxisLimitFactors , nor by ancillary limits set using SMC_GroupSetAncillaryPathLimits and SMC_GroupSetAncillaryAxisLimits respectively. For halting point-to-point movements: the velocity/acc-/deceleration/jerk of each axis are properties of each axis and not specified within this function block. See also inputs AccFactor and JerkFactor . SMC_GroupSaveContinueData and MC_GroupContinue can be used to continue on the original path after a stop, if ClearMovements is set to FALSE. The first movement after an MC_GroupStop overwrites the state of the axis group, so SMC_GroupSaveContinueData has to be called before any new movement is commanded. If ClearMovements is set to FALSE and there are any movements in a dynamic coordinate system (see MC_TrackConveyorBelt , MC_TrackRotaryTable , MC_SetDynCoordTransform , or SMC_SetDynCoordTransformEx ) that are not yet Done when MC_GroupStop is executed, the coordinate systems will remain InUse even after MC_GroupStop is Done . InOut: Scope Name Type Initial Comment Inout AxisGroup AXIS_GROUP_REF_SM3 Reference to a group of axes Input Execute BOOL Start the action at rising edge Deceleration LREAL Value of the deceleration [u/s²]. Only used if a continuous-path movement is halted. Jerk LREAL Value of the jerk [u/s³]. Only used if a continuous-path movement is halted. AccFactor LREAL 1 The maximum deceleration of each axis is multiplied by this factor, which must be in the range ]0, 1]. JerkFactor LREAL 1 The maximum jerk of each axis is multiplied by this factor, which must be in the range ]0, 1]. TorqueFactor LREAL 1 The maximum torque of each axis is multiplied by this factor, which must be in the range ]0, 1]. A dynamic model must have been set using SMC_GroupSetDynamics for this factor to have an effect. ClearMovements BOOL TRUE If set to TRUE, all movements commanded before MC_GroupStop are cleared after the axis group reaches standstill. In order to be able to continue the previous movements from the stop position using SMC_GroupSaveContinueData and MC_GroupContinue , ClearMovements has to be set to FALSE. Output Done BOOL Standstill has been reached Busy BOOL The FB is not finished Active BOOL Indicates that the FB has control on the axis CommandAborted BOOL Command is aborted by disabling MC-Power of one or more of the axes in the group. The state changes to GroupDisabled CommandAccepted BOOL The command has been accepted by the axis group. If the output becomes TRUE , the function block instance can be used to command the next movement with a new rising edge on Execute . While the output is FALSE , keep calling the function block without a new rising edge of Execute . The output is reset to FALSE on a falling edge of Execute . Error BOOL Signals that an error has occurred within the function block ErrorID SMC_ERROR Error identification MovementId SMC_Movement_Id The unique identifier of the movement. Valid if CommandAccepted or Done is TRUE .
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 .