MC_ReadParameter_SML (FB) ¶ FUNCTION_BLOCK FINAL MC_ReadParameter_SML Reads the value of a SoftMotion or axis specific parameter. For the list of all SoftMotion parameter numbers see Axis_REF_SML . The value of parameters is converted to LREAL . To read an axis specific parameter, the axis specific parameter number must be negated. For CANOpen based parameter, the axis specific parameter number is built from the object number 16#ABCD (2 Bytes) and the subindex 16#EF (1 Byte): 16#ABCDEF. Example: read object 16#6070, subindex 0: ParameterNumber:= -16#607000. Note Axis specific parameters are interpreted as unsigned values and converted to LREAL . InOut: Scope Name Type Comment Inout Axis AXIS_REF_SML Reference to the axis Input Enable BOOL Get value is updated continuously while enabled ParameterNumber DINT Number of the parameter Output Valid BOOL The value is valid Busy BOOL The FB is not finished and new output values are to be expected Error BOOL An error occurred ErrorID SML_ERROR The error number Value LREAL The value of the parameter, converted to LREAL
MC_ReadStatus_SML (FB) ¶ FUNCTION_BLOCK MC_ReadStatus_SML Returns the axis state according to the PLCopen the state diagram for a given axis. InOut: Scope Name Type Comment Inout Axis Axis_REF_SML Reference to the axis Input Enable BOOL The status is updated continuously while enabled Output Valid BOOL The status is valid Busy BOOL The FB is not finished and new output values are to be expected Error BOOL An error has occurred ErrorID SML_ERROR The error number ErrorStop BOOL The axis is in state ErrorStop Disabled BOOL The axis is in state Disabled Stopping BOOL The axis is in state Stopping Homing BOOL The axis is in state Homing Standstill BOOL The axis is in state Standstill DiscreteMotion BOOL The axis is in state DiscreteMotion ContinuousMotion BOOL The axis is in state ContinuousMotion
MC_Reset_SML (FB) ¶ FUNCTION_BLOCK FINAL MC_Reset_SML Forces the transition from the state ErrorStop to Standstill or PowerOff by resetting all internal axis-related errors. If the axis is not in state ErrorStop , the function block signals the error SML_R_NO_ERROR_TO_RESET . InOut: Scope Name Type Comment Inout Axis AXIS_REF_SML Reference to the axis Input Execute BOOL Rising edge: The reset is started Output Done BOOL State Standstill or PowerOff has been reached Busy BOOL The FB is not finished and new output values are to be expected Error BOOL An error has occurred ErrorID SML_ERROR The error number
MC_Stop_SML (FB) ¶ FUNCTION_BLOCK MC_Stop_SML Executes a (blocking) stop on the axis. As long as the Execute input is set or the stop is not finished, no other motion command is possible on the axis, and the axis state is Stopping . After both the stop is finished and Execute is reset, the axis status is set to Standstill . Note the deceleration ramp can be set using parameter 2090 ( fQuickStopDeceleration ). This diagram illustrates the behavior of MC_Stop_SML : The example below shows the behavior in combination with MC_MoveVelocity_SML . A rotating axis is ramped down with FB MC_Stop_SML . The axis rejects motion commands as long as MC_Stop_SML parameter Execute = TRUE . MC_MoveVelocity_SML reports an error indicating the busy MC_Stop_SML command. InOut: Scope Name Type Comment Inout Axis AXIS_REF_SML Reference to the axis Input Execute BOOL Rising edge: The stop is started Output Done BOOL Zero velocity reached Busy BOOL The FB is not finished and new output values are to be expected Error BOOL An error has occured ErrorID SML_ERROR Error number
MC_WriteBoolParameter_SML (FB) ¶ FUNCTION_BLOCK FINAL MC_WriteBoolParameter_SML Writes the value of a boolean SoftMotion or axis specific parameter. For the list of all SoftMotion parameter numbers see Axis_REF_SML . See MC_WriteParameter_SML for a description of axis specific parameters. Note If the parameter is not of type BOOL , the behavior is undefined. InOut: Scope Name Type Comment Inout Axis AXIS_REF_SML Reference to the axis Input Execute BOOL Rising edge: Writing is started ParameterNumber DINT Number of the parameter Value BOOL Value to be written Output Done BOOL The value was written successfully Busy BOOL The FB is not finished and new output values are to be expected Error BOOL An error occurred ErrorID SML_ERROR The error number
MC_WriteParameter_SML (FB) ¶ FUNCTION_BLOCK FINAL MC_WriteParameter_SML Writes the value of a SoftMotion or axis specific parameter. For the list of all SoftMotion parameter numbers see Axis_REF_SML . The value of parameters is converted from LREAL . To write an axis specific parameter, the axis specific parameter number must be negated. For CANOpen based parameter, the axis specific parameter number is built from the object length 16#UV (1 Byte), object number 16#ABCD (2 Bytes) and the subindex 16#EF (1 Byte): 16#UVABCDEF. Example: write object 16#6070, subindex 0: ParameterNumber:= -16#04607000. Note Axis specific parameters are interpreted as unsigned values and converted from LREAL . InOut: Scope Name Type Comment Inout Axis AXIS_REF_SML Reference to the axis Input Execute BOOL Rising edge: Writing is started ParameterNumber DINT Number of the parameter Value LREAL Value to be written Output Done BOOL The value was written successfully Busy BOOL The FB is not finished and new output values are to be expected Error BOOL An error occurred ErrorID SML_ERROR The error number
Visu_Templates ¶ Helpers TextListForCombobox_SML_MOVEMENTTYPE (TextList) TextListForCombobox_SML_OPMODE (TextList) StartupDrive
Helpers ¶ TextListForCombobox_SML_MOVEMENTTYPE (TextList) TextListForCombobox_SML_OPMODE (TextList)
Additional ¶ Additional functionality not covered by the PLCopen for MotionControl specification. SML_ChangeAxisConfig (FunctionBlock) SML_ReinitDrive (FunctionBlock) SML_SetOpmode (FunctionBlock) SML_StartupDrive (FunctionBlock)
SML_ChangeAxisConfig (FB) ¶ FUNCTION_BLOCK SML_ChangeAxisConfig Modifies the axis configuration. The gearing ratio, the movement type and the modulo period of the drive may be modified. After a change of the configuration, the axis is automatically restarted with SML_ReinitDrive in order to guarantee that all variables are initialized in a correct way. Note The axis must be in state PowerOff to change the configuration. InOut: Scope Name Type Comment Inout Axis AXIS_REF_SML Reference to the axis Input bExecute BOOL Rising edge: The action is started dwRatioTechUnitsDenom DWORD Conversion factor from [inc] to [u], denominator iRatioTechUnitsNum DINT Conversion factor from [inc] to [u], numerator fModuloPeriodU LREAL The modulo period in [u] iMovementType SML_MOVEMENTTYPE The new movement type of the axis Output bDone BOOL The reinitialization is finished bBusy BOOL The FB is not finished and new output values are to be expected bError BOOL An error has occured eError SML_ERROR Error number