SMC_GetCamSlaveSetPosition (FB) ¶ FUNCTION_BLOCK SMC_GetCamSlaveSetPosition This function block calculates the current target position of an axis (slave) in the case the axis is coupled via a cam to the motion of another axis (Master). The slave is not moved or otherwise affected. The module can be used to determine the start position, velocity, and acceleration of a slave that is coupled to a master axis via a cam table. Due to the fact that the corresponding value is calculated within one cycle, the output Done is not necessary. Note This FB can only be called once to determine the start conditions that the slave must have in order to avoid ramping in. It cannot be used cyclically to read the current slave values. InOut: Scope Name Type Initial Comment Inout Master AXIS_REF_SM3 Reference to master axis Slave AXIS_REF_SM3 Reference to slave axis Input Enable BOOL TRUE : Starts the execution of the function block. MasterOffset LREAL Offset of master table SlaveOffset LREAL Offset of slave table MasterScaling LREAL 1 Scaling factor for master profile SlaveScaling LREAL 1 Scaling factor for slave profile CamTableID MC_CAM_ID Identifier of cam table, output of MC_CamTableSelect Output fStartPosition LREAL Slave position according to cam and current master position. fStartVelocity LREAL Slave velocity according to cam and current master position. fStartAcceleration LREAL Slave acceleration according to cam and current master position. Busy BOOL TRUE : Execution of function block has not been finished yet. Error BOOL TRUE : Error has occurred within the function block. ErrorID SMC_ERROR Error identification
SMC3_PersistPosition (FB) ¶ FUNCTION_BLOCK SMC3_PersistPosition This function block serves to persist the axis position of a multi-turn absolute encoder with real axis. This function block assumes that the multi-turn encoder has a range of 2^32. For multi-turn encoders with a smaller range, please use SMC3_PersistPositionSingleturn . InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 PersistentData SMC3_PersistPosition_Data Input bEnable BOOL FALSE TRUE : Acrivates FB, else inactive. Output bPositionRestored BOOL TRUE : The position has been restored during the last start-up of the axis. bPositionStored BOOL TRUE : The position has been stored during the last call. bBusy BOOL TRUE : FB is not idle. bError BOOL FALSE TRUE : Error has occured within the function block. eErrorID SMC_ERROR SMC_NO_ERROR Error identification eRestoringDiag SMC3_PersistPositionDiag SMC3_PersistPositionDiag.SMC3_PPD_RESTORING_OK Diagnostic information about restoring
SMC3_PersistPositionLogical (FB) ¶ FUNCTION_BLOCK SMC3_PersistPositionLogical This function block serves to persist the axis position of a logical axis. InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_LOGICAL_SM3 PersistentData SMC3_PersistPositionLogical_Data Input bEnable BOOL FALSE TRUE: Activares FB, else inactive. Output bPositionRestored BOOL TRUE: The position has been restored during the last start- up of the axis. bPositionStored BOOL TRUE: The position has been stored during the last call. bBusy BOOL TRUE: FB is not idle. bError BOOL FALSE TRUE: Error has occured within the function block. eErrorID SMC_ERROR SMC_NO_ERROR Error identification eRestoringDiag SMC3_PersistPositionDiag SMC3_PersistPositionDiag.SMC3_PPD_RESTORING_OK Diagnostic information about restoring
SMC3_PersistPositionSingleturn (FB) ¶ FUNCTION_BLOCK SMC3_PersistPositionSingleturn This functionblock serves to persist the axis position of an absolute encoder that has a limited range with a real axis. Strictly speaking, this function block is not only for single-turn encoders but also for multi-turn encoders where the range of the encoder is a power of two and less than 2^32. Both encoders with a range -2^k .. 2^k - 1 and a range 0 .. 2^(k+1) are supported. InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 PersistentData SMC3_PersistPositionSingleturn_Data Input bEnable BOOL FALSE TRUE : Acrivates FB, else inactive. usiNumberOfAbsoluteBits USINT 16 Number of bits that are presistent (absolute encoded) [8..32]. Output bPositionRestored BOOL TRUE : The position has been restored during the last start-up of the axis. bPositionStored BOOL TRUE : The position has been stored during the last call. bBusy BOOL TRUE : FB is not idle. bError BOOL FALSE TRUE : Èrror has occured within the function bloc.k eErrorID SMC_ERROR SMC_NO_ERROR Error identification eRestoringDiag SMC3_PersistPositionDiag SMC3_PersistPositionDiag.SMC3_PPD_RESTORING_OK Diagnostic information about restoring
SMC_ChangeDynamicLimits (FB) ¶ FUNCTION_BLOCK SMC_ChangeDynamicLimits Sets the dynamic limits (maximum velocity, acceleration, jerk, torque) for an axis. May only be called if the axis is in state power_off or standstill . InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Input bExecute BOOL Rising edge: Changes the limits. fMaxVelocity LREAL The maximum velocity in u/s. Must be positive. fMaxAcceleration LREAL The maximum acceleration in u/s². Must be positive. fMaxDeceleration LREAL The maximum deceleration in u/s². Must be positive. fMaxJerk LREAL The maximum jerk in u/s³. Must be positive. fMaxTorque LREAL FPU.GetLRealSpecialVal(FPU.ESpecial_FP_Value.PosInf) The maximum torque or force in Nm or N. The torque limit is interpreted based on the gearbox output. Use SMC_SetAdditionalConversionFactors to take the gearbox into account. Output bDone BOOL TRUE : New limits have been set. bError BOOL TRUE : An error has occurred. bBusy BOOL TRUE : The function block is in operation. ErrorID SMC_ERROR Error identification
SMC_ChangeGearingRatio (FB) ¶ FUNCTION_BLOCK SMC_ChangeGearingRatio With help of this function block the gearing ratio and the type of the drive may be modified. After execution, the axis must be restarted by SMC3_ReinitDrive , in order to guarantee that all variables are initialized in a correct way. InOut: Scope Name Type Comment Inout Axis AXIS_REF_SM3 Input bExecute BOOL Rising edge: Starts the execution of the function block. dwRatioTechUnitsDenom DWORD Denominator of the conversion factor to convert drive increments into technical units. Units: [inc]. iRatioTechUnitsNum DINT Numerator of the conversion factor to convert drive increments into technical units. Units: [u]. fPositionPeriod LREAL Position period, modulo value (only for modulo axes) iMovementType SMC_MOVEMENTTYPE 0: Modulo axis, 1: Finite axis Output bDone BOOL TRUE : The gearing ratio / movement type / modulo period has been changed. bBusy BOOL TRUE : Execution of function block has not been finished yet. bError BOOL TRUE : An error has occurred within the function block. nErrorID SMC_ERROR Error identification
SMC_SetForecast (FB) ¶ FUNCTION_BLOCK SMC_SetForecast This function block sets a forecast for a given axis. The forecast is limited to a maximum of 512 task cycles. By setting a forecast, information about the status of the axis in the future can be retrieved. - The duration up to a certain axis position can be obtained using SMC_GetTravelTime . The axis dynamics at a certain point of time can be obtained using SMC_ReadSetValues . The current forecast duration can be read using SMC_GetForecast . InOut: Scope Name Type Comment Inout Axis AXIS_REF_SM3 Reference to the axis Input Execute BOOL Rising edge: sets the forecast duration ForecastDuration LREAL The duration of the trajectory forecast in seconds Output Done BOOL TRUE : The forecast is set successfully Error BOOL TRUE : Error has occurred during execution ErrorID SMC_ERROR Error identification
SMC_SetMovementType (FB) ¶ FUNCTION_BLOCK SMC_SetMovementType Sets the movement type of a virtual axis to linear or modulo. Can only be used when the axis is in state standstill or power_off . The FB executes synchronously on the rising edge of bExecute . After the call, either bDone or bError are set. InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Axis Input bExecute BOOL FALSE iMovementType INT 0 The new drive type, 0 for modulo, 1 for linear fPositionPeriod LREAL 1 The new position period for modulo movement, must be positive Output bDone BOOL FALSE TRUE : Success bError BOOL FALSE TRUE : Error has occured within function block. eErrorID SMC_ERROR SMC_NO_ERROR Error identification
SMC_SetRampType (FB) ¶ FUNCTION_BLOCK SMC_SetRampType Sets the ramp type of an axis to a new value. Can only be used when the axis is in state standstill or power_off . The FB executes synchronously on the rising edge of bExecute . After the call, either bDone or bError are set. InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Axis Input bExecute BOOL FALSE eRampType SMC_RAMPTYPE trapez Defines the new ramp type. Output bDone BOOL FALSE TRUE : Success bError BOOL FALSE TRUE : Error has occured within function block. eErrorID SMC_ERROR SMC_NO_ERROR Error identification
SMC_SetSoftwareLimits (FB) ¶ FUNCTION_BLOCK SMC_SetSoftwareLimits Sets the position limits and the corresponding error reaction of an axis. If the axis is used in the context of coordinated motion, the corresponding axis group has to be reenabled in order to take into account the new limits for coordinated motion computations. Note The effective error deceleration is the maximum of the configured maximum deceleration of the axis, the value of SWL_Error_Deceleration , and the value derived from SWL_Error_MaxDistance and the current velocity. ( SWL_Error_MaxDistance is only taken into account if the value is positive.) InOut: Scope Name Type Comment Inout Axis AXIS_REF_SM3 Axis to change Input bExecute BOOL Rising edge: Rising edge: Starts the execution of the function block. Applies the Changes. SWL_Activated BOOL TRUE : Activates the position limits. SWL_Positive LREAL The positive limit switch ([u]) SWL_Negative LREAL The negative limit switch ([u]) SWL_Error_Decelerate BOOL Deprecated, the axis decelerates always if a deceleration is configured ( `SWL_Error_Deceleration , SWL_Error_MaxDistance ) or in the maximum deceleration (see SMC_ChangeDynamicLimits .fMaxDeceleration or drive configuration). SWL_Error_Deceleration LREAL The (positive) deceleration in [u/s²] SWL_Error_MaxDistance LREAL The maximum braking distance in [u], only applied if positive. Output bDone BOOL TRUE : Success bError BOOL TRUE : Error has occured within the function block. ErrorID SMC_ERROR Error identification.