
6
RealTime Control
RealTime mode, also known as Loop-Control mode, is the second control method for the
BarrettHand™. This control mode allows you to send control data and receive feedback data
continuously, without waiting for the motors to stop moving. Any desired control law can be
implemented within the host computer by calculating the desired motor control reference, sending
the control block with the control reference to the hand, waiting for the requested feedback data,
and then repeating this update process. The control bandwidth is a function of the amount of
control data sent, the amount of feedback data requested, and how fast the communication is.
Control data from the host computer to the hand is grouped into control blocks; feedback data is
grouped into feedback blocks. The structure of the control and feedback blocks is set by various
finger and global properties. These are mostly Boolean flags but some are integer coefficients.
The structure can only be changed in Supervisory mode; it cannot be changed while in RealTime
mode. The BH8-280 hand operates similarly by setting a desired control reference and then
sending a batch Get property for each feedback property that is to be received.
6.1
Pucks in Hand API
RealTime mode for the BH8-280 hand is controlled by the host PC through the BarrettHand API
so this section focuses on documenting this. The API contains virtual properties that handle what
data is sent or requested from the hand. Virtual properties behave just like properties that are read
and written on the Pucks and include the Boolean flag properties “LCV”, “LCT”, “LCP”,
“LFAP”, “LFV”, and “LFS”. These are set during original RTSetFlags calls or motor Set property
calls. These flags control the sending of control references and feedback from the Hand. There
can only be a single control reference being sent in RealTime mode. Control references include
motor reference velocities, torques, and positions. There can be multiple feedback values
requested such as actual positions, velocities, and strain values. Presently, velocity feedback is
calculated on the host PC automatically when the “LFV” is set.
When the listed control and feedback flags are set, the RTStart method is called to begin RealTime
mode. RTStart accepts a second parameter to determine the desired levels of motor protection. A
positive value for the TSTOP property, in units of milliseconds, will terminate motors after
TSTOP milliseconds if they don't move. Motors will drop into idle mode if HOLD is false and
will servo to the present motor position if HOLD is true. This motor protection scheme is
excellent at protecting motors from stalls that would normally harm the motor. The drawback to
using it is that it also drops the motor mode to idle so the motor leaves RealTime control up to the
user afterwords meaning that they would need to manually set the Puck in the hand back to the
desired motor mode. The second motor protection scheme will exponentially filter the square of
each motor current and limit the maximum continuous motor current to presumably safe levels.
This seems to offer significant advantage in that motors will not give up trying to achieve their
desired motor references even with limited torque. The downside to this method is that torque is
limited by the host by setting the Puck's MT property and if the program does hang then motor
torque may not be limited. The user is advised to be cautious about protecting the hand motors.
RealTime method RTUpdate is called to send control data to the hand and/or receive the desired
feedback from the hand. Feedback is received during RTUpdate calls using a batch Get property
for higher efficiency. RTUpdate is also overloaded to provide a batch Get motor property method
that efficiently sends Get motor property messages to the desired Pucks in the hand and blocks
until property values are received. This is provided for reading additional Puck 2 sensors such as
inner link joint positions from the “JP” property or 12-bit strain values from the “SG” property.
The alternative RTUpdate method may also be used to get finger/spread positions or other Puck
properties while running Supervisory commands for 280 hands. This is possible by registering an
Page 41 of 89