MDI_TorqueControl (FB)
FUNCTION_BLOCK MDI_TorqueControl
This function block is used to command a torque (current) reference on the axis. In this mode of operation, the position loop is not used on the drive (so no following error is recorded or acted upon). The axis will remain in torque control mode (as indicated by the status word bits for control mode) until motion of another control mode type is issued.
Note
1.Input variable VelocityLimit can’t be set to a negative value, TorqueRamp can’t be zero.
2.If you want to output torque in the positive direction of the axis, set the positive value for torque. If you want to output torque in the negative direction of the axis, set the negative value for torque.
3.The axis velocity increases faster during torque control. Make sure that you set velocity (VelocityLimit) for safety.
4.If you want to abort this command, you must use MDI_Stop.
- InOut:
Scope
Name
Type
Initial
Comment
Input
EnableBOOLFALSE
Enable the function block.
TorqueREAL10.0
Value for the torque reference the axis will use (in % of Motor Rated Current). Can be modified whilst Enable is True to change the torque produced.
VelocityLimitREAL100.0
Specify the maximum velocity.The unit is user units/s for E530 drive. The unit is RPM for ACS drive, range>=0.
TorqueRampREAL5.0
Sets the time taken for current to rise or fall from zero to DRIVEPEAKCURRENT for ACS drive. The unit is %/s^2 for E530, range>0.
Inout
AxisReference to the axis structure.
Output
InTorqueBOOLSignals that commanded torque is reached feedback from drive.
BusyBOOLSets to true while the function block is in progress.
CommandAbortedBOOLCommand is aborted by another command from other MDI function block.
ErrorBOOLSignals that an error has occurred within function block.
ErrorIDERROR_ID.NO_ERROR
Contains the error code when there is an error.