MC_TorqueControl
This function block continuously exerts a torque or force of the specified magnitude. This magnitude is approached using a defined ramp (TorqueRamp), and the Function Block sets the InTorque output if the commanded Torque level is reached. Once the InTorque output is set true, it stays true even if the torque level on the axis goes below the torque input. This function block is applicable for force and torque. When there is no external load or the load is low, the Velocity limit may be reached before the specified Torque is achieved. In this case, the InTorque output will not be set. Positive torque is in the positive direction of velocity.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| B | Axis | AXIS_REF | Logical axis reference. This value can be located on the Configuration tab in the Hardware Configuration (logical axis number). | |
| VAR_INPUT | ||||
| B | Execute | BOOL | Upon the rising edge, all other function block inputs are read and the function is initiated. To modify an input, change the value and re-trigger the execute input. | FALSE |
| B | Torque | LREAL | Value of the torque (in percentage of rated torque). The Torque input ultimately specifies the maximum torque that can be applied. If the initial command torque is less than the Torque input, the command torque is increased according to the TorqueRamp input. Similarly, if the initial command torque is greater than the Torque input, the command torque is decreased according to the TorqueRamp input. Once the commanded torque equals the Torque input, the command torque will not change. | LREAL#0.0 |
| E | TorqueRamp | LREAL | The rate at which the set value of the torque or force is achieved (%/s). The ramp is implemented on the commanded torque and ramps from the actual torque (when this function block is executed) to the commanded torque input to the function block. Example: if current commanded torque (parameter 1014) is 1.0, Torque input on the FB is 4.0 , current actual torque value is 1.0 and TorqueRamp input is 1.0, it will take 3.0 seconds for the commanded torque value to be achieved. | LREAL#0.0 |
| E | Velocity | LREAL | Absolute value of the velocity in user units/second. The Velocity input along with the Acceleration and Deceleration inputs determines the velocity limit. If the initial velocity limit is less then the Velocity input, then the velocity limit is increased according to the Acceleration input. Similarly, if the initial velocity limit is greater than the Velocity input, then the velocity limit is decreased according to the Deceleration input. Once the velocity limit equals the Velocity input, the velocity limit will not change. | LREAL#0.0 |
| E | Acceleration | LREAL | Value of the acceleration in user units/second^2 (acceleration is applicable with same sign of torque and velocity) | LREAL#0.0 |
| E | Deceleration | LREAL | Value of the deceleration in user units/second^2 (deceleration is applicable with opposite signs of torque and velocity.) | LREAL#0.0 |
| E | Jerk | LREAL | Not supported; reserved for future use. Value of the jerk in [user units / second^3]. | LREAL#0.0 |
| E | Direction | MC_Direction | Specifies the direction of motion. Allowable modes are positive_direction, shortest_way, negative_direction, current_direction. MC_Direction#Positive_Direction MC_Direction#Shortest_Way MC_Direction#Negative_Direction MC_Direction#Current_Direction | MC_Direction#PositiveDirection |
| E | BufferMode | MC_BufferMode | Defines the behavior of the axis - allowable modes are Aborting, Buffered, BlendingLow, BlendingPrevious, BlendingNext, and BlendingHigh. MC_BufferMode#Aborting MC_BufferMode#Buffered MC_BufferMode#BlendingLow MC_BufferMode#BlendingPrevious MC_BufferMode#BlendingNext MC_BufferMode#BlendingHigh | MC_BufferMode#Aborting |
| VAR_OUTPUT | ||||
| B | InTorque | BOOL | Setpoint value of torque or force is reached for the first time. Output stays true after Torque input is reached. | |
| E | Busy | BOOL | Set high upon the rising edge of the Execute input, and reset when Done, CommandAborted, or Error is true. In the case of a function block with an Enable input, a Busy output indicates the function is operating, but not ready to provide Valid information. (No Error) | |
| E | Active | BOOL | For buffered modes, this output is set high at the moment the block takes control of the axis. For non buffered modes, the outputs Busy and Active have the same value. | |
| E | CommandAborted | BOOL | Set high if motion is aborted by another motion command or MC_Stop. This output is cleared with the same behavior as the Done output. | |
| B | Error | BOOL | Set high if an error has occurred during the execution of the function block. This output is cleared when 'Execute' or 'Enable' goes low. | |
| E | ErrorID | UINT | If Error is true, this output provides the Error ID. This output is reset when 'Execute' or 'Enable' goes low. | |
Notes
- Velocity is always a positive value. The direction is dependent on the torque and load.
- The axis ceases to be in torque control mode when any motion control (not administrative) Function Block is accepted on the same axis.
- The Y_MotionAxisDriver should be enabled in order to enable MC_TorqueControl.
- Sometimes it may be necessary to use Y_HoldPosition to cancel Torque mode. For example, in an E-Stop situation, the servo power may be removed before the controller can switch the ServoPack into position mode. Upon enabling MC_Power, if the axis is in Torque mode, use Y_HoldPosition to unconditionally switch the axis into position mode without any deceleration time.
- If the Velocity limit is reached, then the actual torque will often be much lower than the commanded Torque. Since the commanded Torque does not change after equaling the Torque input, the actual torque response due to sudden changes in loads is based on the servo drive characteristics, and the rate of change of the actual torque may exceed the TorqueRamp input.
- If the Torque input is positive, and the Direction input equals MC_Direction#negative_direction, then the Torque input is negated. However, for compatibility with previous versions, the Direction input is ignored if the Torque input is negative since the reverse direction is implied.
- When a soft position limit is exceeded, MC_TorqueControl will be aborted and the axis will be switched into position mode.
|
Torque Input |
Direction Input |
Axis Direction of Motion |
|---|---|---|
|
Positive |
Positive |
Positive |
|
Positive |
Negative |
Negative |
|
Negative |
Negative |
Negative |
|
Negative |
Positive |
Negative |
Related Function Blocks
Y_DirectControl: Y_DirectControl block available from the Y_Motion firmware library allows the user to specify a commanded torque every scan.
Y_HoldPosition: Useful when transitioning from Torque to Position mode.
Error Description
Example
The example below shows the behavior of the torque ramp of the MC_TorqueControl block.
The example below shows the behavior of a torque mode operation being brought to zero speed with a second MC_TorqueControl block. A Y_HoldPosition then brings the axis to position mode.
Example of MC_TorqueControl being applied to move an axis to a hard stop.