SMC_SetTorque (FB) ¶ FUNCTION_BLOCK SMC_SetTorque This function block applies the given torque to the axis. In controller mode SMC_torque , this is the set torque that the drive will produce. In controller mode SMC_velocity or SMC_position , the torque value can be used by the servo drive to improve the controller loop. The given torque should be the expected torque of the drive. This is also called torque feed forward control. In controller mode SMC_nocontrol , the function block has no effect, no error is reported. By default, the torque is expected to be provided at the motor shaft, not the gear box output. A conversion factor can be set using SMC_SetAdditionalConversionFactors .. Note This function block does not support forecasts that are set up by SMC_SetForecast . InOut: Scope Name Type Comment Inout Axis AXIS_REF_SM3 Reference to axis Input bEnable BOOL TRUE : Enables the execution of the function block. fTorque LREAL Torque in Nm (for rotary motors) or N (for linear motors). Output bBusy BOOL TRUE : Execution of function block has not been finished yet. bError BOOL TRUE : Error has occurred within the function block. nErrorID SMC_ERROR Error identification
SMC_TrackAxis (FB) ¶ FUNCTION_BLOCK SMC_TrackAxis This function block tracks a master axis. The slave axis will try to follow the master as closely as possible while repecting the given maximum velocity, acceleration, deceleration, and jerk. During execution, the axis is in state synchronized_motion . The function block will keep ownership of the axis until it is aborted by another movement. The ownership is kept even if the master is in standstill and the function block is in sync. Note This function block does not support forecasts that are set up by SMC_SetForecast . InOut: Scope Name Type Comment Inout Master AXIS_REF_SM3 Slave AXIS_REF_SM3 Input bExecute BOOL Rising edge: Starts the execution of the function block. Velocity LREAL Maximum velocity in technical units per second [u/s]. Must be positive. This input may change each call. Changes are taken into account continuously, not only on a rising edge of bExecute . Acceleration LREAL Maximum acceleration in [u/s²]. Must be positive. This input may change each call. Changes are taken into account continuously, not only on a rising edge of bExecute . Deceleration LREAL Maximum magnitude of deceleration in [u/s²]. Must be positive. This input may change each call. Changes are taken into account continuously, not only on a rising edge of bExecute . Jerk LREAL Maximum magnitude of jerk in [u/s³]. Must be positive if the axis has a jerk limited velocity profile. This input may change each call. Changes are taken into account continuously, not only on a rising edge of bExecute . Output bBusy BOOL TRUE : Execution of the function block has not been finished. bCommandAborted BOOL TRUE : Command has been aborted by another command. bError BOOL TRUE : Error has occurred within the function block. iErrorID SMC_ERROR Error identification bInSync BOOL Whether the axis is in sync with the given set values.
SMC_TrackSetValues (FB) ¶ FUNCTION_BLOCK SMC_TrackSetValues This function block tracks a given signal. The axis will try to follow the signal as closely as possible while repecting the given maximum velocity, acceleration, deceleration, and jerk. The tracked signal is given in form of the position, velocity, acceleration, and jerk at the end of each bus task cycle. In contrast to SMC_FollowPosition , SMC_FollowPositionVelocity , and SMC_FollowSetValues , the given set position, velocity, acceleration and jerk is not simply applied to the axis. Instead, the axis tries to reach the desired values in the shortest time. At the same time, it will respect the input Velocity, Acceleration, Deceleration, and Jerk. During execution, the axis is in state synchronized_motion . The function block will keep ownership of the axis until it is aborted by another movement. The ownership is kept even if the tracked signal is stationary and the function block is in sync. The position of the tracked signal ( fSetPosition ) may either be linear or modulo, with the modulo period given in input SignalModuloPeriod . Independently, the axis may either be finite or modulo. The modulo period of the signal and the axis may be different. Note This function block does not support forecasts that are set up by SMC_SetForecast . MC_SetPosition allows changing the coordinate system of an axis. The fSetPosition for this function block is expected to be provided in the coordinate system that was active when this function block was started. InOut: Scope Name Type Comment Inout Axis AXIS_REF_SM3 Input bExecute BOOL Rising edge: Starts the execution of the function block. fSetPosition LREAL Set position in [u] fSetVelocity LREAL Set velocity in [u/s] fSetAcceleration LREAL Set acceleration in [u/s²] fSetJerk LREAL Set jerk in [u/s³] Velocity LREAL Maximum velocity in technical units per second [u/s]. Must be positive. This input may change each call. Changes are taken into account continuously, not only on a rising edge of bExecute . Acceleration LREAL Maximum acceleration in [u/s²]. Must be positive. This input may change each call. Changes are taken into account continuously, not only on a rising edge of bExecute . Deceleration LREAL Maximum magnitude of deceleration in [u/s²]. Must be positive. This input may change each call. Changes are taken into account continuously, not only on a rising edge of bExecute . Jerk LREAL Maximum magnitude of jerk in [u/s³]. Must be positive if the axis has a jerk limited velocity profile. This input may change each call. Changes are taken into account continuously, not only on a rising edge of bExecute . SignalModuloPeriod LREAL The modulo period of the signal or 0 if the signal is linear. Must not be negative. Output bBusy BOOL TRUE : Execution of the function block is not finished. bCommandAborted BOOL TRUE : Command has been aborted by another command. bError BOOL TRUE : Error has occurred within the function block. iErrorID SMC_ERROR Error identification bInSync BOOL Whether the axis is in sync with the given set values.
AXIS_REF_SM3.GetActValuesForCycle (METH) ¶ METHOD FINAL GetActValuesForCycle : BOOL InOut: Scope Name Type Inout dynAct SMC_TG_DynState Input nCycle SMC_CycleCounter offsetPosition LREAL Return GetActValuesForCycle BOOL
AXIS_REF_SM3.GetSetValuesForCycle (METH) ¶ METHOD FINAL GetSetValuesForCycle : BOOL InOut: Scope Name Type Inout dynSet SMC_TG_DynState Input nCycle SMC_CycleCounter offsetPosition LREAL Return GetSetValuesForCycle BOOL Output cycleTimeSpent LREAL
Help functions ¶ SMC3_DetectDriveError (Action) SkipNextInputUpdate (Method) SkipNextOutputUpdate (Method)
AXIS_REF_SM3.SMC3_DetectDriveError (ACT) ¶
AXIS_REF_SM3.SkipNextInputUpdate (METH) ¶ METHOD PUBLIC SkipNextInputUpdate Sets a flag to skip the next call to AfterReadInputs . This can be used in a scenario where AfterReadInputs gets called from within the application, instead of from implicit code, e.g. in order to fake I/O values for debug or test purposes. Note For the CommunicationStateMachine to work correctly, AfterReadInputs must not be called more than once per cycle. This especially applies for the very first cycle, since the skip flag cannot be set for the first implicit call to AfterReadInputs .
AXIS_REF_SM3.SkipNextOutputUpdate (METH) ¶ METHOD PUBLIC SkipNextOutputUpdate Sets a flag to skip the next call to BeforeWriteOutputs . This can be used in a scenario where BeforeWriteOutputs gets called from within the application, instead of from implicit code, e.g. in order to fake I/O values for debug or test purposes. Note BeforeWriteOutputs should not be called more than once per cycle.
SMC_PerfTimerSum (FUN) ¶ FUNCTION SMC_PerfTimerSum : SMC_PerfTimers Returns the sum of two performance timers InOut: Scope Name Type Inout Const t1 SMC_PerfTimers t2 SMC_PerfTimers Return SMC_PerfTimerSum SMC_PerfTimers