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.
Note
If the axis is part of an axis group that is enabled, you have to call SMC_GroupUpdate from the SM3_Robotics library before calling this function block. Otherwise, the torque values are overwritten by the axis group.
- InOut:
Scope
Name
Type
Comment
Inout
AxisReference to axis
Input
bEnableBOOLTRUE: Enables the execution of the function block.fTorqueLREALTorque in Nm (for rotary motors) or N (for linear motors).
Output
bBusyBOOLTRUE: Execution of function block has not been finished yet.bErrorBOOLTRUE: Error has occurred within the function block.nErrorIDSMC_ERRORError identification