Move.StartTorqueCntrl Method

Initiates execution of torque control mode for one or more motors.

Move.StartTorqueCntrl (motor_mask, adc_mask, torques_array)

Prerequisites

Parameters

motor_mask

A required numeric expression that evaluates to a bit mask that specifies the motors to be placed into torque control mode. The least significant bit corresponds to the first motor for the attached robot.

adc_mask

A required numeric expression that evaluates to a bit mask that specifies the single motor whose torque is to be directly controlled by the first ADC input channel. This value should be zero if no motor is to be ADC controlled. A scaled ADC reading of +1.0 or –1.0 will drive the corresponding motor at its full positive or negative rated motor torque. Since the peak motor torque can usually be higher than the rated torque, ADC values greater than +- 1.0 are permitted.

torques_array

A required array of Doubles that contains a torque specification for each motor of the robot. The first array element (0) corresponds to the torque value for the robot’s first motor. Array elements for motors that are not torque controlled are ignored. Each array element is interpreted as a percentage, where a value of +100 or –100 indicates that the torque output should be equivalent to the full positive or negative rated motor torque. Since the peak motor torque can usually be higher than the rated torque, values greater than +- 100% are permitted.

Remarks

This method places the specified motors into torque control. Motors that are not placed into torque control mode continue to operate in position control mode and can be moved by the standard Move Class Methods. Thus, some axes of the robot can continue to follow a position-controlled path while others can exert a force or can move freely if their torque output is set to zero.

If a motor is specified in the adc_mask, that motor’s torque output level is the sum of the percentage of rated motor torque specified in the torques_array and the value defined by the ADC input.

When this method is executed, it first waits for any in-process motions to be completed. It then transitions the specified motors into torque control and sets their initial torque levels to the values specified in the torques_array. The torque levels can subsequently be changed by executing a Move.SetTorques method or by a change in the ADC signal.

Since torque control does not close the position loop around a motor, the torque applied is unaffected by the current setting of the "System Test Speed".  This is the speed value that can be set via the web Operator Control Panel or the "System wide test speed in %" (DataID 601) database parameter.

The specified motors will remain in torque control mode until one of the following occurs:

  1. The Move.StopSpecialModes method is executed to terminate torque control mode for all motors.
  2. A hardware error or hard E-stop or soft E-stop occurs.
  3. A RapidDecel is issued.
  4. The robot is detached by the user program either by issuing a detach command or by halting user program execution for any reason.

Torque control mode is compatible with both position and velocity control modes. However, torque control mode can only be initiated when in position control mode.

Examples

Dim torques(12) As Double              ' All Double torques will be 0
Dim ii, jj As Integer
Robot.Attached = 1 ' Get control of robot #1
Move.StartTorqueCntrl(1, 0, torques) ' Set motor 1 to torque mode
For jj = 1 To 10
For ii = 0 To 100
Controller.Sleeptick() ' Wait till next trajectory cycle
torques(0) = ii/10 ' New torque value
Move.SetTorques(torques) ' Ramp torque from 0% to 10%
Next ii
Next jj
Move.StopSpecialModes ' Terminate torque mode
Robot.Attached = 0 ' Release control of robot

See Also

Move Class | Move.SetTorques | Move.StopSpecialModes