Move.SetTorques Method

Sets new target torque output levels for all motors in torque control mode.

Move.SetTorques (torques_array)

 

Prerequisites

 

Parameters

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

After selected motors of a robot have been placed into torque control mode, this method can be used to modify the target torque levels. This method can be executed at any time and as many times as desired. It simply posts the desired torque levels to the trajectory generator. The next time that the trajectory generator executes, the specified torque levels will be taken as the new target values. If this method is executed multiple times before the trajectory generator executes again, only the last values posted will have an effect.

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.StartTorqueCntrl | Move.StopSpecialModes