View Single Post
  #1   Spotlight this post!  
Unread 20-01-2012, 19:10
craigboez's Avatar
craigboez craigboez is offline
Mechanical Engineer
AKA: Craig Boezwinkle
FRC #2811 (StormBots)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2009
Location: Chicago, IL
Posts: 217
craigboez is just really nicecraigboez is just really nicecraigboez is just really nicecraigboez is just really nicecraigboez is just really nice
Re: Black Jaguar CAN Message Identifier Help

Thanks David this helps a lot. As a quick example, if I want to send the Jag a series of CAN messages to run at a certain voltage I'm assuming I'll do the following:

1. Enable Voltage Mode by sending an "empty" message with the identifier 0x2020001.
2. Send a Voltage Set message with the identifier of 0x2020081 and 3 bytes of data. The first 16-bits will specify the setpoint and the next 8 will be 0 since I have no sync group.

Then, if I want the Jag to report back as to what it's voltage output is, I would:

3. Send an "empty" Status Output Voltage message with identifier 0x2021681.
4. When the motor gets this message, it will create a message of it's own and send it back along with 2 bytes of data. The response message will have the same identifier as the request, 0x2021681, and the first 8 bits of data will be the whole number and the next 8 bits will be the fractional part of the voltage.


As for the identifier format, I'm assuming the following:

Device type will always be motor controller, so Byte 3 will always mask to 0x02000000.
Mfg will always be TI, so Byte 2 will always mask to 0x00020000.
API will vary based on the message type.
I haven't adjusted the default Device Number for my Jag, so the last 5 bits of every message will be 000001.

Does this all sound correct?
Reply With Quote