MC_TouchProbe (FB) ¶ FUNCTION_BLOCK MC_TouchProbe This function block is designed for recording an axis position when a trigger event is raised. Note The function block is intended for single shot operation, that is, only the first event following on a rising edge of Execute is One function block instance should represent exactly one probing command. Example Timing and TouchProbe Example Defining a window, where trigger events are accepted (for modulo axes). InOut: Scope Name Type Comment Inout Axis AXIS_REF_SM3 Reference to axis, the position of which is to be recorded at a defined event at the trigger input. TriggerInput TRIGGER_REF Reference to trigger signal source Input Execute BOOL Rising edge: Starts the execution of the function block. WindowOnly BOOL TRUE : Trigger events will be accepted only within the specified window. FirstPosition LREAL Start position from whereon (in positive direction) trigger events will be accepted (in technical units [u]). Only used if WindowOnly = TRUE . LastPosition LREAL End position up to which trigger events will be accepted (in technical units [u]). Only used if WindowOnly = TRUE . Output Done BOOL TRUE : Trigger event has been recorded. Busy BOOL TRUE : Execution of function block has not been finished yet. Error BOOL TRUE : Error occurred within the function block. ErrorID SMC_ERROR Error identification RecordedPosition LREAL Position, where trigger event has occurred (in technical units [u]). CommandAborted BOOL TRUE : Command has been aborted by another command.
SMC_Logical_Axis (FB) ¶ FUNCTION_BLOCK SMC_Logical_Axis the need to add a logical axis to the device tree. Use the output variable Axis of type AXIS_REF_LOGICAL_SM3 instead of a logical axis. If the function block is restarted, the logical axis is reinitialized. The master axis can be changed by restarting the function block. InOut: Scope Name Type Initial Comment Input Execute BOOL Starts the execution of the function block. wDriveID WORD 1 Identifier of the logical drive. iMovementType SMC_AXIS_TYPE SMC_AXIS_TYPE.modulo The type (finite or modulo) of axis. fPositionPeriod LREAL 360.0 Length of period for modulo drives in technical units [u]. eValueReference SMC_ValueSelect actual Master reference value. usiFilterDepthPosition LREAL Number of cycles the position value is averaged over. usiFilterDepthVelocity LREAL Number of cycles the velocity value is averaged over. fTimeShiftCycles LREAL 3 Time shift relative to master values in cycles. RealAxis REFERENCE TO AXIS_REF_SM3 The real master axis. Output Initialized BOOL The logical axis is intialized and can be used. InSteadyState BOOL The filter of the logical axis is intialized. InSteadyState implies Initialized . Error BOOL There is an error. Axis AXIS_REF_LOGICAL_SM3 The logical axis.
SMC_StartupDrive (FB) ¶ FUNCTION_BLOCK SMC_StartupDrive This function block comprises a set of often used function blocks and is used for testing and commissioning an axis. Please note, that there is a compatible visualization template. InOut: Scope Name Type Inout Axis AXIS_REF_SM3
SMC_CamRegister (FB) ¶ FUNCTION_BLOCK SMC_CamRegister This function block represents a tappet control unit. Like MC_CamIn , it operates on a cam table represented as a structure of type a MC_CAM_REF . The slave movmement in the MC_CAM_REF structure is ignored, only the tappet information is evaluated. InOut: Scope Name Type Initial Comment Inout Master AXIS_REF_SM3 Reference to master axis CamTable MC_CAM_REF Description of a (possibly empty) cam containing the description of the tappets. bTappet ARRAY [1..MAX_NUM_TAPPETS] OF BOOL Tappet bits Input Enable BOOL FALSE TRUE : Starts execution of function block. MasterOffset LREAL 0 Offset to be added to master position MasterScaling LREAL 1 Scaling factor for master profile TappetHysteresis LREAL 0 Size of the hysteresis for tappets in [u]. A positive value means that the tappet cannot fire immediately after it has fired. The master position first needs to move away from the tappet by more than the value given for TappetHysteresis . For example, if the master is an encoder, the master position may oscillate by a few increments around the tappet position. Without a hysteresis, the tappet may fire all the time. DeadTimeCompensation LREAL 0 Dead time compensation in seconds. The position of the master axis to be expected will be calculated by linear extrapolation. Output Busy BOOL FALSE TRUE : Execution of function block has not been finished. Error BOOL FALSE TRUE : Error has occurred within the function block. ErrorID SMC_ERROR 0 Error identification EndOfProfile BOOL FALSE Pulsed output: Cyclic end of the cam profile.
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
SMC_GetTappetValue (FB) ¶ FUNCTION_BLOCK SMC_GetTappetValue This function block evaluates the output Tappets of function block MC_CamIn and contains the current tappet status. InOut: Scope Name Type Comment Inout Tappets SMC_TappetData Tappet signals to be evaluated by MC_GetTappetValue Input iID INT Group ID of the tappet to be evaluated. bInitValue BOOL Initial value of the tappet to be assigned at first call bSetInitValueAtReset BOOL TRUE : Sets the value of the tappet to bInitValue at a restart of the MC_CamIn` function block. FALSE : Retains the tappet value at a restart of the MC_CamIn function block. Output bTappet BOOL Tappet value
SMC_ReadCAM (FB) ¶ FUNCTION_BLOCK SMC_ReadCAM This function block is designed for loading a cam at runtime and making it available for the modules MC_CamTableSelect and MC_CamIn . The cam to be loaded has to be created within the cam editor before and saved in a “*.CAM” file (see SMC_WriteCAM ). The size of a loadable cam is limited by the library parameters LibParams.gc_SMC_FILE_MAXCAMEL (number of elements) and LibParams.gc_SMC_FILE_MAXCAMTAP (number of cam switch actions). InOut: Scope Name Type Initial Comment Input bExecute BOOL FALSE Rising edge: Starts the execution of the function block. sFileName STRING(255) Name of the file, which contains the cam description in the defined ASCII format. Output bDone BOOL FALSE TRUE : Cam has been read in. bBusy BOOL FALSE TRUE : Execution of the function block has not been finished. bError BOOL FALSE TRUE : Error has occurred within the function block. ErrorID SMC_ERROR 0 Error identification CAM MC_CAM_REF STRUCT(nElements := 0, nTappets := 0) Structure: CloseFile (Action)
SMC_WriteCAM (FB) ¶ FUNCTION_BLOCK SMC_WriteCAM This function block is designed for storing a cam table created within the Cam editor into a file at runtime. InOut: Scope Name Type Initial Comment Inout CAM MC_CAM_REF Input bExecute BOOL FALSE Rising edge: Starts the execution of the function block. sFileName STRING(255) Name of the file, which contains the cam description in the defined ASCII format. Output bDone BOOL FALSE TRUE : Cam has been written. bBusy BOOL FALSE TRUE Execution of function block has not been finished. bError BOOL FALSE TRUE : Error has occurred within the function block. ErrorID SMC_ERROR 0 Error identification Structure: 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)
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