MC_TorqueControl
The MC_TorqueControl function block switches an axis under NC control to the "Cyclic Synchronous Torque Mode" (CST) and sets a torque setpoint for it. In this operation mode, the NC also provides the parameterized "VelocityLimitHigh" & "VelocityLimitLow" as linkable objects to the drive controller (Axis->Drive->Outputs->nDataOut5/nDataOut6) in the cyclic interface.
To change the operation mode without jerking, the dead time compensation must be activated in the NC axis.
DANGER | |
Danger to life or risk of serious injury or damage to property due to unintentional movements of the axis When using the function block, the axis is switched to CST mode. After using the function block (especially after error situations), the axis may still be in CST mode. This can lead to sudden and unplanned movements (especially with lifting axes) when the axis is released.
|
In order for this module to be used sensibly, the drive controller must support switching of the operating modes on the fly, as well as speed limitation in torque mode.
The relevant parameters are available for scaling the actual and setpoint torque in the Drive area in the NC axis parameters.
Notes on parameterization for NC-guided position- and torque-based mixed operation are in preparation and will be published soon.
Inputs
VAR_INPUT
Execute : BOOL;
ContinuousUpdate : BOOL;
Relative : BOOL;
Torque : LREAL;
TorqueRamp : LREAL;
VelocityLimitHigh : LREAL;
VelocityLimitLow : LREAL;
BufferMode : MC_BufferMode;
Options : ST_TorqueControlOptions;
END_VAR
Name | Type | Description |
---|---|---|
Execute | BOOL | The command is executed with a rising edge. |
ContinuousUpdate | BOOL | If this input is TRUE on the rising edge at the "Execute" input, the "Torque", "TorqueRamp", "VelocityLimitHigh" and "VelocityLimitLow" inputs can be changed during the execution of the command and made effective as quickly as possible. |
Relative | BOOL | If this input is TRUE, the torque value is changed relatively by the specified value "Torque". |
Torque | LREAL | Torque setpoint with which the drive is operated ("Relative" = FALSE) or by which the torque is to be changed ("Relative" = TRUE). (e.g. %) Here, a positive torque setting means torque in a logically positive direction of movement. |
TorqueRamp | LREAL | Rate of change of the torque setpoint ( e.g. %/s) |
VelocityLimitHigh | LREAL | Upper velocity limit for limitation in CST mode (e.g. mm/s). This limitation must be configured accordingly in the process image. |
VelocityLimitLow | LREAL | Lower velocity limit for limitation in CST mode (e.g. mm/s). This limitation must be configured accordingly in the process image. |
BufferMode | Currently only "Aborting" is supported. | |
Options | Data structure containing additional, rarely used parameters. The input can normally remain open. |
See also: General rules for MC function blocks
Inputs/outputs
VAR_IN_OUT
Axis : AXIS_REF;
END_VAR
Name | Type | Description |
---|---|---|
Axis | Axis data structure that unambiguously addresses an axis in the system. Among other parameters it contains the current axis status, including position, velocity or error state. |
Outputs
VAR_OUTPUT
InTorque : BOOL;
Busy : BOOL;
Active : BOOL;
CommandAborted : BOOL;
Error : BOOL;
ErrorID : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
InTorque | BOOL | TRUE, if the axis has built up the set torque and no velocity limitation is active. |
Busy | BOOL | TRUE as soon as the command is started with Execute and as long as the command is processed. If "Busy" is FALSE, the function block is ready for a new order. |
Active | BOOL | Indicates that the function block controls the axis. |
CommandAborted | BOOL | TRUE if the command could not be executed completely. |
Error | BOOL | TRUE, if an error occurs. |
ErrorID | UDINT | If the error output is set, this parameter supplies the error number. |
See also: General rules for MC function blocks
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v3.1.4024 | PC or CX (x86) | Tc2_MC2 |