PathElem_SetDerivStepSize (FUN) ¶ FUNCTION PathElem_SetDerivStepSize : BOOL InOut: Scope Name Type Return PathElem_SetDerivStepSize BOOL Inout pe PathElem Input derivStepSize LREAL
SMC_GroupUpdate (FB) ¶ FUNCTION_BLOCK SMC_GroupUpdate This function block can be used to bring forward the execution of all of the axis group’s implicit computations. If Enable = TRUE , they will be shifted from the end of the cycle to the execution-time of this function block. InOut: Scope Name Type Comment Inout AxisGroup AXIS_GROUP_REF_SM3 Input Enable BOOL Output Error BOOL Signals that an error has occurred within the function block ErrorID SMC_ERROR Error identification
SMC_SetMovementQueueBuffer (FB) ¶ FUNCTION_BLOCK SMC_SetMovementQueueBuffer This function block can be used to modify the size of the movement queue that is used internally by referencing an external buffer and giving its size. This buffer must contain the desired number of movements plus one movement. Once called with rising edge and pMvt <> 0 , this FB must be called cyclically. Don’t use more than one instance of this FB for one axis group. InOut: Scope Name Type Comment Inout AxisGroup AXIS_GROUP_REF_SM3 Reference to a group of axis Input Execute BOOL Sets the movement queue buffer on rising edge pMvt POINTER TO SMC_Movement Pointer to the first element of the buffer. 0 means that the internal buffer is used. nSizeBuf UDINT Size of the buffer in bytes. Only used if pMvt <> 0. nSizeBuf must be a power of two multiple of SIZEOF(SMC_Movement) , i.e. nSizeBuf = 2^n * SIZEOF(SMC_Movement) Output Done BOOL The FB is finished Busy BOOL The FB is not finished Error BOOL Signals that an error has occurred within the function block ErrorID SMC_ERROR Error identification
SMC_TuneCPKernel (FB) ¶ FUNCTION_BLOCK SMC_TuneCPKernel This function block can be used to tune the behaviour of the CP movements kernel. It must be called from the planning task. Once called with rising edge and pPE <> 0 , this FB must be called cyclically. Don’t use more than one instance of this FB. InOut: Scope Name Type Initial Comment Inout AxisGroup AXIS_GROUP_REF_SM3 Reference to a group of axis Input Execute BOOL Applies the settings on a rising edge pPE POINTER TO SMC_AXIS_GROUP_PATH_ELEMENT Pointer to the first element of the path buffer; 0 means reset to default. Note: this input is deprecated. The internal path buffer has been increased, it should no longer be necessary to change it. Use of this input is discouraged. nSizeBuf UDINT Size of the path buffer; Must be a multiple of SIZEOF(SMC_AXIS_GROUP_PATH_ELEMENT) . The buffer must contain the desired number of path elements plus one, but at least 5 path elements. Note: this input is deprecated. The internal path buffer has been increased, it should no longer be necessary to change it. Use of this input is discouraged. fPlanningInterval LREAL The planning interval in seconds. (If less than bus task interval, then the bus task interval will be used.) 0 means reset to default. This is the maximum step size of the trajectory planner. Using a longer planning interval can reduce the amount of computation done by the planning task. If there are no performance issues in the planning task, it is recommended to leave this parameter at its default value. If the planning interval is changed, the following consideration should be taken into account: Since in one planning cycle at most a duration of fPlanningInterval of the trajectory is planned, the planning interval must not be lower than the average planning task cycle time. Otherwise, the synchronisation buffer (see |fSyncBufferDuration| ) might run empty. A longer planning interval can lead to a coarser trajectory, i.e. configured limits might not be reached or they might be exceeded. For fast movements with acceleration and deceleration phases well below one second, a planning interval between 0.016 and 0.032 is recommended. Changing the planning interval should be done step by step, starting from the default value 0.016, while checking the resulting trajectories for each step. fSyncBufferDuration LREAL Employed for the synchronisation between planning task and bus task: the minimum duration of trajectories that shall be held available (apart from end of path). The lower this parameter, the lower the latency. Too low values may lead to errors, if the synchronisation-queue runs empty. 0 means reset to default. The current sync buffer duration can be monitored using the CurrentSyncBufferDuration output of MC_GroupReadStatus . fSyncBufferMinFactor LREAL Employed for the synchronisation between planning task and bus task: the factor of fSyncBufferDuration that the duration of the synchronisation buffer should not fall below. If a queue underrun error occurs, using a higher value of this parameter may help. Too low values may lead to queue underrun errors. 0 means reset to default, must be in the range [0, 1[. fMaxBrakeDuration LREAL The maximum duration of a stop trajectory. In seconds. Setting a low value may lower the effective maximum velocity. 0 means reset to default. Note: this input is deprecated. It no longer has an effect on the trajectory planning. diMaxBlendingDelayCycles DINT -1 The maximum time the planner waits for a second element after planning has started. (In cycles of the bus task.) Before this duration has elapsed, the planner will not plan beyond half of the first element. A negative value will reset the setting to its default. A too short delay may result in too little blending after a new path has been started. A too long delay may result in an acutal delay before the movement starts. (This delay is important for good blending behaviour after the planner starts. If no delay were used and the second blended movement was commanded a bit later, the planner might have advanced the lookahead marker too much, limiting or removing the effect of blending.) fPlanningForecastDuration LREAL -1 The planning forecast duration in seconds. This parameter is relevant for various function blocks that allow querying information about the future state of an axis group. This includes function blocks related to triggers (see SMC_GroupPrepareTrigger , SMC_GroupReadTrigger , and SMC_TRIGGER_INFO ) as well as function blocks such as SMC_GroupReadRemainingTrajectoryDuration or SMC_GroupReadPathDynamics , if the TimeOffset input is used. The lower this parameter, the lower the latency. This has the following effects: Depending on the performance of the PLC, higher values of this parameter can slightly delay the start of a movement from standstill. However, for PLCs with good performance, this delay will be much smaller than the configured value of this parameter. On the other hand, some operations that are executed on an ongoing movement are affected by this parameter and result in a higher latency. The latency increases by the value that is set for this parameter. It affects the following operations: (1) Movements with MC_BUFFER_MODE.Aborting . (2) Changing the dynamics with MC_GroupSetOverride . (3) Performing an immediate interrupt with MC_GroupInterrupt . (4) Applying ancillary limits with SMC_GroupSetAncillaryAxisLimits or SMC_GroupSetAncillaryPathLimits and execution mode MC_EXECUTION_MODE.Immediately . (5) Applying a load with SMC_GroupSetLoad and execution mode MC_EXECUTION_MODE.Immediately . A negative value will reset the parameter to its default value. If the value is too large, the error SMC_CP_FORECAST_TOO_LARGE is returned. For this error, the value of fSyncBufferDuration and fPlanningInterval are also considered. The larger the total duration forecast and buffer) and the smaller the planning interval, the more likely the error is returned. For a planning interval of 0.016 s and a sync buffer duration of 0.05 s, a typical forecast duration is 0.3 s. In this case, a forecast duration of more than 8 seconds (a value that is very high and not recommended due to the resulting latency) leads to an error. The recommended range for the quotient (sync buffer duration + forecast duration) / fPlanningInterval is between 0 and 25, the maximum is 511. The current planning forecast can be monitored using the CurrentPlanningForecast output of MC_GroupReadStatus . Output Done BOOL The FB is finished 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_SetCoordinateTransform (FB) ¶ FUNCTION_BLOCK MC_SetCoordinateTransform This function block sets a coordinate transformation between the world coordinate system (WCS) and the product- or machine-coordinate system (PCS_*/MCS). Note When the PCS is dynamic (in the sense that the PCS is moving relative to WCS), please use MC_SetDynCoordTransform instead. This FB does not start a movement (administrative FB). InOut: Scope Name Type Comment Inout AxisGroup AXIS_GROUP_REF_SM3 Reference to a group of axis Input Execute BOOL Sets the coordinate transformation on rising edge CoordTransform MC_COORD_REF The coordinate transformation, i.e. a product coordinate system (PCS_1 or PCS_2) or machine coordinate system (MCS) expressed in the world coordinate system (WCS) CoordSystem SMC_COORD_SYSTEM Which coordinate transformation is to be set. Allowed values are PCS_1, PCS_2, and MCS. Output Done BOOL The transformation has been set successfully Busy BOOL The FB is not finished Error BOOL Signals that an error has occurred within the function block ErrorID SMC_ERROR Error identification
GeoPrimLineAS_CreateExt (FUN) ¶ FUNCTION GeoPrimLineAS_CreateExt : BOOL InOut: Scope Name Type Inout errCtx SMRE.ErrorContext ef ElemFun traces ElemFunTraces Inout Const poseStart ElemFunPose poseDest ElemFunPose cdStart TRAFO.CONFIGDATA cdDest TRAFO.CONFIGDATA aRefStart TRAFO.AXISPOS_REF aRefDest TRAFO.AXISPOS_REF Return GeoPrimLineAS_CreateExt BOOL
MC_SetDynCoordTransform (FB) ¶ FUNCTION_BLOCK MC_SetDynCoordTransform This FB couples two axis groups via a dynamic coordinate transformation. The coordinate transformation is fixed to the tool coordinate system of the master axis group. 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 For common special cases of a dynamic PCS, the function blocks, MC_TrackConveyorBelt , and MC_TrackRotaryTable can be used. 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 with a target position in the PCS. InOut: Scope Name Type Comment Inout AxisGroup AXIS_GROUP_REF_SM3 Reference to an axis group MasterAxisGroup AXIS_GROUP_REF_SM3 Reference to the master axis group Input Execute BOOL Sets the coordinate transformation on rising edge CoordTransform MC_COORD_REF The relative position and orientation of the PCS with respect to the tool coordinate system of the master axis group. CoordSystem SMC_COORD_SYSTEM Which PCS is to be set (PCS_1 or PCS_2) 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 error SMC_AXIS_GROUP_PCS_STILL_IN_USE . For this information to be up-to-date, the function block has to be called continuously (even if already Done ). A dynamic coordinate system becomes InUse when a movement to a position in the coordinate system is commanded. It remains InUse 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
MC_TrackConveyorBelt (FB) ¶ FUNCTION_BLOCK MC_TrackConveyorBelt This function block tracks a piece on a conveyor belt. Based on the position and orientation of the conveyor belt and on the position and orientation of the piece relative to the conveyor belt, the tracking is performed using SMC_SetDynCoordTransformEx . The position, velocity, etc. of the conveyor belt 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_TrackRotaryTable . 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. The following example demonstrates the usage of MC_TrackConveyorBelt . The task is to manipulate a workpiece, starting from a certain position P (xPCS; yPCS; 0) on the workpiece. The workpiece is lying on a conveyor belt (CB) which is moving with speed vCB. The workpiece is detected by a digital camera, which also provides the position (and orientation) of the workpiece relative to the conveyor belt. At time t0, when the workpiece is detected by the camera, MC_TrackConveyorBelt is executed. At the same time, a movement to position P in PCS is started. The axis group starts to move from its waiting position W (MCS) towards P (PCS). At time t1 the axis group has reached P. In the meantime the conveyor belt has moved by the distance dx0_1. After P has been reached, the process can be started. All positions within the process have to be related to the PCS. At time t2 the process is finished and the axis group moves back to its waiting position WMCS. A possible resulting trajectory of the TCP is shown in the picture below. InOut: Scope Name Type Comment Inout AxisGroup AXIS_GROUP_REF_SM3 Reference to the axis group. ConveyorBelt AXIS_REF_SM3 Reference to the axis of the conveyor belt. If ConveyorBelt.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 ConveyorBeltOrigin MC_COORD_REF Specifies the position and orientation of the conveyor belt in world coordinates (WCS). This defines a coordinate system of the conveyor belt in which the position of an object lying on the conveyor belt can be specified. The x-axis of the coordinate system of the conveyor belt has to point into the direction of movement of the conveyor belt. InitialObjectPosition MC_COORD_REF Specifies the position and orientation of an object lying on the conveyor belt relative to the conveyor belt. CoordSystem SMC_COORD_SYSTEM Which PCS is to be set (PCS_1 or PCS_2) 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 error SMC_AXIS_GROUP_PCS_STILL_IN_USE . For this information to be up-to-date, the function block has to be called continuously (even if already Done ). A dynamic coordinate system becomes InUse when a movement to a position in the coordinate system is commanded. It remains InUse 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
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 AXIS_GROUP_REF_SM3 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 MC_COORD_REF 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 MC_COORD_REF Specifies the position and orientation of an object lying on the rotary table relative to the table. CoordSystem SMC_COORD_SYSTEM Which PCS is to be set (PCS_1 or PCS_2) 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 error SMC_AXIS_GROUP_PCS_STILL_IN_USE . For this information to be up-to-date, the function block has to be called continuously (even if already Done ). A dynamic coordinate system becomes InUse when a movement to a position in the coordinate system is commanded. It remains InUse 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
MC_MoveCircularAbsolute (FB) ¶ FUNCTION_BLOCK FINAL MC_MoveCircularAbsolute This function block commands a circular movement of an axis group to an absolute position in the specified coordinate system. The arc segment can be described in several ways, depending on the value of input CircMode . Note The velocity/acc-/deceleration/jerk of each axis are properties of each axis and not specified within this function block. See also inputs VelFactor , AccFactor and JerkFactor . InOut: Scope Name Type Initial Comment Inout AxisGroup AXIS_GROUP_REF_SM3 Reference to a group of axes Input Execute BOOL Start the motion at rising edge CircMode SMC_CIRC_MODE Specifies the meaning of the inputs AuxPoint and CircDirection . See SMC_CIRC_MODE . AuxPoint SMC_POS_REF Auxilliary point in the specified coordinate system. See CircMode . EndPoint SMC_POS_REF End position in the specified coordinate system PathChoice MC_CIRC_PATHCHOICE Choice of path: clockwise or counter-clockwise. Velocity LREAL Maximum path velocity [u/s]. Always positive. Not necessarily reached. Acceleration LREAL Maximum path acceleration [u/s²]. Always positive. Not necessarily reached. Deceleration LREAL Maximum path deceleration [u/s²]. Always positive. Not necessarily reached. Jerk LREAL Maximum path jerk [u/s³]. Always positive. Not necessarily reached. CoordSystem SMC_COORD_SYSTEM Applicable coordinate system BufferMode MC_BUFFER_MODE Defines the chronological sequence of the FB relative to the previous block. TransitionMode MC_TRANSITION_MODE Defines the way of blending in case of a blending buffer mode TransitionParameter ARRAY [0..(SMC_RCNST.MAX_TRANS_PARAMS - 1)] OF LREAL Parameters for blending OrientationMode SMC_ORIENTATION_MODE Determines how the orientation is interpolated. VelFactor LREAL 1 The maximum velocity of each axis is multiplied by this factor, which must be in the range ]0, 1]. AccFactor LREAL 1 The maximum acceleration 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. Output Done BOOL Commanded end positions reached for all axes 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 .