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

Enable

BOOL

FALSE

Enable the function block.

Torque

REAL

10.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.

VelocityLimit

REAL

100.0

Specify the maximum velocity.The unit is user units/s for E530 drive. The unit is RPM for ACS drive, range>=0.

TorqueRamp

REAL

5.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

Axis

MDI_AxisRef

Reference to the axis structure.

Output

InTorque

BOOL

Signals that commanded torque is reached feedback from drive.

Busy

BOOL

Sets to true while the function block is in progress.

CommandAborted

BOOL

Command is aborted by another command from other MDI function block.

Error

BOOL

Signals that an error has occurred within function block.

ErrorID

ERROR_ID

ERROR_ID.NO_ERROR

Contains the error code when there is an error.