Skip to content

Incorrect CAN ID or API ID for heartbeat #2241

@grnnja

Description

@grnnja

The roboRIO provides a universal CAN heartbeat that any device on the bus can listen and react to. This heartbeat is sent every 20ms. The heartbeat has a full CAN ID of ``0x01011840`` (which is the NI Manufacturer ID, RobotController type, Device ID 0 and API ID ``0x062``). It is an 8 byte CAN packet. The important byte in here is byte 5 (index 4). The layout is the following bitfield.

Here it says the CAN ID for the heartbeat is: 0x01011840 and the api id is 0x062

if you convert the CAN ID to binary and pad to 29 bits you get: 00001000000010001100001000000

breaking up into device type(5 bits), manufacturer(8 bits), api id(10 bits) and device id(6 bits): 00001 00000001 0001100001 000000

So the api id is 0001100001

converting back to hex we get 0x061 which is not equal to 0x062.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions