SMC3_BrakeControl (FB) ¶ FUNCTION_BLOCK SMC3_BrakeControl This function block, if supported by the drive and its SoftMotion driver, it determines the behaviour of a mechanical brake. By use of this function block in the application the brake can be closed or opened or it can be switched to automatic mode, in which the opening and closing is handled by the drive itself. The function can be used if it is not possible to use the automatic mode due to special requirements (i.e. manual move of a component) of the application where the brake must be controlled manually. The function block does not take on any further monitoring or other intelligent functions (i.e. time delayed opening of the brake). InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Input bExecute BOOL FALSE TRUE : Activates FB, else inactive. eSetBrake SMC3_BrakeSetState SMC_BRAKE_AUTO Sets the brake state. fTimeOut LREAL If the time since enabling the FB is larger than this value, bTimeOut is set; this mechanism is deactivated, if fTimeOut = 0. Output bDone BOOL TRUE : Signal has been sent to the drive bBusy BOOL TRUE : FB is not idle. bError BOOL FALSE TRUE : Error has occured within the function block. nErrorID SMC_ERROR 0 Error identification
Globals ¶ LibParams (ParamList) SMC_Basic_Ranges (GVL) SMC_DriveBasic_GlobalVariables (GVL) SM_PLCOpen_GlobalVariables (GVL)
LibParams (PARAMS) ¶ Attributes: qualified_only InOut: Scope Name Type Initial Comment Constant gc_SMC_FILE_MAXCAMEL INT 128 The maximum number of cam segments / points that can be read by SMC_ReadCam . gc_SMC_FILE_MAXCAMTAP INT 128 The maximum number of cam tappets that can be read by SMC_ReadCam .
SMC_Basic_Ranges (GVL) ¶ Attributes: qualified_only InOut: Scope Name Type Initial Constant UDINT_RANGE LREAL EXPT(2, 32) INT_MIN INT INT#-32768 INT_MAX INT INT#32767
SMC_DriveBasic_GlobalVariables (GVL) ¶ InOut: Name Type Initial g_bSMCMotorolaByteOrder BOOL FALSE
SM_PLCOpen_GlobalVariables (GVL) ¶ InOut: Scope Name Type Initial Comment Constant MAX_NUM_TAPPETS UINT 512 SMC_SUPPORTEDRAMPTYPES DWORD 2#111 quadratic, sinsquare, trapez SMC_MAX_NUM_TRIGGERS INT 8 The maximum number of triggers supported for |TRIGGER_REF.iTriggerNumber| g_fSMC_PLCOPEN_EPS LREAL 1E-06
POUs ¶ Additional MC_AbortTrigger (FunctionBlock) MC_DigitalCamSwitch (FunctionBlock) CheckHysteresis (Action) InitSwitch (Action) MC_TouchProbe (FunctionBlock) SMC_Logical_Axis (FunctionBlock) SMC_StartupDrive (FunctionBlock) SMC_VIRTUAL_AXIS (FunctionBlock) Administrative/Configuration MC_Power (FunctionBlock) MC_Reset (FunctionBlock) MC_SetPosition (FunctionBlock) SMC3_BrakeControl (FunctionBlock) SMC3_PersistPosition (FunctionBlock) SMC3_PersistPositionLogical (FunctionBlock) SMC3_PersistPositionSingleturn (FunctionBlock) SMC_ChangeDynamicLimits (FunctionBlock) SMC_ChangeGearingRatio (FunctionBlock) SMC_GetForecast (FunctionBlock) SMC_GetTravelTime (FunctionBlock) SMC_SetAdditionalConversionFactors (FunctionBlock) SMC_SetControllerMode (FunctionBlock) SMC_SetCustomRampType (FunctionBlock) SMC_SetForecast (FunctionBlock) SMC_SetMovementType (FunctionBlock) SMC_SetRampType (FunctionBlock) SMC_SetSoftwareLimits (FunctionBlock) CAM MC_CamTableSelect (FunctionBlock) SMC_CAMBounds (FunctionBlock) SMC_CAMBounds_Pos (FunctionBlock) SMC_CamEditor (FunctionBlock) DoBeforeLeave (Action) SMC_CamRegister (FunctionBlock) SMC_GetCamSlaveSetPosition (FunctionBlock) SMC_GetTappetValue (FunctionBlock) SMC_ReadCAM (FunctionBlock) CloseFile (Action) SMC_WriteCAM (FunctionBlock) CloseFile (Action) Diagnostics FBError SMC_ClearFBError (Function) SMC_ReadFBError (FunctionBlock) MC_ReadActualPosition (FunctionBlock) MC_ReadActualTorque (FunctionBlock) MC_ReadActualVelocity (FunctionBlock) MC_ReadAxisError (FunctionBlock) MC_ReadStatus (FunctionBlock) Performance SMC_PerfStat (FunctionBlock) SMC_PerfTimerSum (Function) SMC_SeriesStat (FunctionBlock) SMC3_BrakeStatus (FunctionBlock) SMC_AxisDiagnosticLog (FunctionBlock) WriteToFile (Action) SMC_CheckAxisCommunication (FunctionBlock) SMC_CheckLimits (FunctionBlock) SMC_GetMaxSetAccDec (FunctionBlock) SMC_GetMaxSetVelocity (FunctionBlock) SMC_GetTrackingError (FunctionBlock) SMC_InPosition (FunctionBlock) SMC_MeasureDistance (FunctionBlock) SMC_ReadSetPosition (FunctionBlock) SMC_ReadSetValues (FunctionBlock) Movement Direct SMC_FollowPosition (FunctionBlock) SMC_FollowPositionVelocity (FunctionBlock) SMC_FollowSetValues (FunctionBlock) SMC_FollowVelocity (FunctionBlock) SMC_SetTorque (FunctionBlock) SMC_TrackAxis (FunctionBlock) SMC_TrackSetValues (FunctionBlock) MC_AccelerationProfile (FunctionBlock) MC_Halt (FunctionBlock) MC_HaltSuperImposed (FunctionBlock) MC_Home (FunctionBlock) MC_Jog (FunctionBlock) MC_MoveAbsolute (FunctionBlock) MC_MoveAdditive (FunctionBlock) MC_MoveRelative (FunctionBlock) MC_MoveSuperImposed (FunctionBlock) MC_MoveVelocity (FunctionBlock) MC_PositionProfile (FunctionBlock) MC_SetOverride (FunctionBlock) MC_Stop (FunctionBlock) MC_VelocityProfile (FunctionBlock) Master/Slave MC_CamIn (FunctionBlock) MC_CamOut (FunctionBlock) MC_GearIn (FunctionBlock) MC_GearInPos (FunctionBlock) MC_GearOut (FunctionBlock) MC_Phasing (FunctionBlock) SMC_BacklashCompensation (FunctionBlock) SMC_GetOverride (FunctionBlock) SMC_Homing (FunctionBlock) SMC_Inch (FunctionBlock) SMC_MoveContinuousAbsolute (FunctionBlock) SMC_MoveContinuousRelative (FunctionBlock) Parameter access MC_ReadBoolParameter (FunctionBlock) MC_ReadParameter (FunctionBlock) MC_WriteBoolParameter (FunctionBlock) MC_WriteParameter (FunctionBlock) SMC_ParameterNumber_CoE (Function) SMC_ParameterNumber_SoE (Function) internal Buffered movement SMC_CamIn_EvalCam_EvalContext (Struct) SMC_CamIn_EvalContext (Struct) SMC_CamIn_ModuloHandling_EvalContext (Struct) SMC_CamIn_RampIn_DistanceBased_EvalContext (Struct) SMC_CamIn_RampIn_EvalContext (Union) SMC_CamIn_RampIn_LimitBased_EvalContext (Struct) SMC_CamOutPerformerImpl (FunctionBlock) Activate (Method) CanBlend (Method) GetStartInfoForBlendingInto (Method) GetStartVelocity (Method) Init (Method) OnOverrideChanged (Method) OwnerNumber (Property) PrepareTransition (Method) StartBuffering (Method) SMC_CamOut_EvalContext (Struct) SMC_GearInPos_EvalContext (Struct) SMC_GearIn_EvalContext (Struct) SMC_GearIn_RampInQuad_EvalContext (Struct) SMC_GearIn_RampInTrap_EvalContext (Struct) SMC_GearIn_RampIn_EvalContext (Union) SMC_Gearing_EvalContext (Struct) SMC_MoveContinuousPerformerImpl (FunctionBlock) Activate (Method) CanBlend (Method) GetStartInfoForBlendingInto (Method) GetStartVelocity (Method) OnOverrideChanged (Method) OwnerNumber (Property) PrepareTransition (Method) StartBuffering (Method) SMC_RampIn_DistanceBased_EvalContext (Struct) Divers SMC_AxisHasJerkLimit (Function) Trajectories SMC_AxisOverrideInterruptActive (Function) SMC_BrakingDistance (Function) SMC_CalculateProfile_VA (Function) SMC_DynLimits_Set (Function) Trajectory buffer SMC_AxisTrajectoryBuffer_ResetCounter (Struct) SMC_AxisTrajectoryBuffer_ResetCounter_Eq (Function) SMC_TrajectorySample_State (Union)
Additional ¶ MC_AbortTrigger (FunctionBlock) MC_DigitalCamSwitch (FunctionBlock) CheckHysteresis (Action) InitSwitch (Action) MC_TouchProbe (FunctionBlock) SMC_Logical_Axis (FunctionBlock) SMC_StartupDrive (FunctionBlock) SMC_VIRTUAL_AXIS (FunctionBlock)
MC_AbortTrigger (FB) ¶ FUNCTION_BLOCK MC_AbortTrigger This function block is designed for aborting function blocks that are connected to trigger events (e.g. MC_TouchProbe ). InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Reference to axis TriggerInput TRIGGER_REF Reference to trigger signal source Input Execute BOOL FALSE Rising edge: Starts the execution of the function block. Output Done BOOL FALSE TRUE : Latching has been aborted successfully. Busy BOOL FALSE TRUE : Execution of function block has not been finished yet. Error BOOL FALSE TRUE : Error has occurred within the function block. ErrorID SMC_ERROR 0 Error identification
MC_DigitalCamSwitch (FB) ¶ FUNCTION_BLOCK MC_DigitalCamSwitch This function block is analogous to switching on a motor shaft: The function block commands a group of discrete output bits to switch in analogy to a set of mechanical cam controlled switches connected to an axis. Forward and backward movements are allowed. Note Changing the VAR_IN_OUT -parameters requires a new rising edge of the Enable input. Hint This functionality is sometimes called PLS – Phase or Position or Programmable Limit Switch. Example Assume the following parameter values set: Parameter Type Switch01 Switch02 Switch03 Switch04 TrackNumber INT 1 1 1 2 FirstOnPosition [u] REAL 2000 2500 4000 3000 LastOnPosition [u] REAL 3000 3000 1000 - AxisDirection INT 1=Pos 2=Neg 0=Both 0=Both CamSwitchMode INT 0=Position 0=Position 0=Position 1=TIME Duration TIME - - - 1350 Assume further, that no on/off compensation nor hysteresis is employed. The figure demonstrates the behavior of the outputs, when the axis is moving continuously in positive direction. The axis is a modulo axis with a modulo length of 5000 u. Example of DigitalCamSwitch ¶ Now assume that on compensation (-125ms) and off compensation (+250ms) are employed. Detailed description of Switch01 ¶ The resulting behavior of the outputs, when the axis is moving continuously in negative direction without on/off compensation and without hysteresis. Example in negative direction ¶ InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Reference to axis the switches are connected to Switches MC_CAMSWITCH_REF Reference to switching actions Outputs MC_OUTPUT_REF Reference to signal outputs that are directly related to the referenced tracks TrackOptions MC_TRACK_REF Reference to structure containing track related properties, e.g. the on/off compensations per output/track. Input Enable BOOL FALSE TRUE : Enables execution of function block. EnableMask DWORD 16#FFFFFFFF 32 bits of BOOL enabling the different tracks. Least significant data is related to the lowest TrackNumber . TappetMode MC_TAPPETMODE tp_mode_auto Mode for position outputs Output InOperation BOOL FALSE TRUE : Commanded tracks have been enabled. Busy BOOL FALSE TRUE : Execution of function block has not been finished yet. Error BOOL FALSE TRUE : Error has occurred within the function block. ErrorID SMC_ERROR 0 Error identification SwitchCorrupted INT Signalizes potential problems that arise from compensation times: Compensation times may lead to the case that the extrapolated position passes one switching point several times before passing the other switching point again. As a consequence, a non-inverted switch may become inverted (and the other way around). In this case, this variable indicates the switch in concern. There are two possible reasons: noisy velocity-values, “big” difference between on- and off-compensation. -1 means that such behaviour hasn’t occured. Structure: CheckHysteresis (Action) InitSwitch (Action)