Appendix D Pucks In Hand Protocol
The BH8-280 protocol with the Pucks in the Hand is partially listed in this appendix. It will give
users an idea of how new hand communication works.
When the pucks first power up, they are in Monitor mode (for downloading firmware). You must
issue a "Set STAT(5) = STATUS_READY(2)" to each puck to exit this mode and enter the Main
firmware (motor control). Newer firmware versions will automatically enter the Main firmware
after a 2 second delay.
The format for a typical CAN message is:
Get Property
•
MessageID = CAN ID of the puck you want the property from.
•
Payload = 1 byte = the property number you want.
•
Example: Data Length Code (DLC) = 1, MsgID = 1, Payload = 48 (Get encoder position
P(48) from puck 1)
Set property
•
MessageID = CAN ID of the puck you want the property from.
•
Payload = 4/6 bytes = 0x80 | property number, 0x00, Low byte, High byte, [Higher byte],
[Highest byte]
•
Example: DLC = 4, MsgID = 1, Payload = 0x85, 0x00, 0x02, 0x00 (Set STAT(5) of puck
ID 1 to STATUS_READY(2)).
Property to issue a command over CAN = CMD(29)
•
Commands: HOME = 7, HI = 13, IC = 14, IO = 15, C = 18, M = 19, O = 20, T = 21
•
Example: setProperty(bus = 0, canID = 1, property = 29, verify = FALSE, value = 18);
// Issue a "Close" command over CAN
Issue high-level command
•
MessageID = CAN ID of the puck you want the property from.
•
Payload = 4 bytes = 0x80 | CMD(29), 0x00, <command>, 0x00
•
Example: DLC = 4, MsgID = 1, Payload = 0x9D, 0x00, 0x13, 0x00 (Set Command(29)
to CMD_MOVE(19), Move to Default Position DP(50)).
The pucks have several motor control MODE(8)s:
•
MODE_IDLE(0) = Tie motor phases together for resistive braking effect.
•
MODE_TORQUE(2) = Apply T(42) input torque
•
MODE_PID(3) = Apply whatever torques are necessary to hold the present P(48)
position, using KP(79), KD(80) and KI(81)
•
MODE_VELOCITY(4) = Update the internal setpoint position by V(44) encoder cts per
millisecond (and go there).
•
MODE_TRAPEZIOD(5) = Follow a trapezoidal velocity profile between the present
P(48) position and the target E(52) endpoint position. If HOLD(94) != 0, then drop to
MODE(8) = MODE_PID(3) and hold position when move is complete, else drop to
MODE(8) = MODE_TORQUE(2) (free-spinning) when move is complete.
Page 86 of 89