11-14-2016 06:56 AM - edited 11-14-2016 06:59 AM
I'm trying to create a CAN database using the NI-XNET Database Editor.
In the CAN ID manual I have been given for a machine, it states it uses the chlorican definition maintained by CIS - using a 29 bit identifier for the CAN arbitration field.
28-26: faults, controls, warnings and status (eg 000b faults, 001b faults etc)
25: general or DSP communication
24-17: object ID
16-6: function id (owner & type - eg 05 parameter interface)
5-0: node no
Not all of these are defined in the ID manual, are they all required in the arbitration field for 29 bit ID?
Listed information is Function types and object IDs with CAN IDs and descriptions.
E.g.
Function type: 00: general information
Object ID: 000: identification request - CAN ID: 1C002000h
In the abritration field on the database editor the numeric system must be decimal, hex, octal, binary or SI notation. None of the formats accept the full CAN ID. Hex is the closest but it will only take 1C002000. or does the h define the id as hexadecimal?
Solved! Go to Solution.
11-14-2016 07:18 AM
Hi lisam,
Hex is the closest but it will only take 1C002000
With 29 bits you can define integers upto 1F'FF'FF'FF (hexadecimal number, using ' for grouping bytes/8 bits).
So when the control accepts your ID of 1'C0'02'00 I guess it's ok…
11-14-2016 09:29 AM - edited 11-14-2016 09:36 AM
Hi GerdW,
Thanks for your help.
Ok great, I think the h was just refering to the ID being hexadecimal.
So 1C002000 in hex is 29 bits?
I'm a little confused with what must be included in the arbitration id. Would it purely be 1C002000 or would it be something like 00001C0020000x80100 including the priority, DSP, function owner and type as suggested in the CAN ID definition attached. I've included an example of the information I have.
Also when I try to add CAN ID codes starting with a 0, the 0 disappears when I enter it.
Any help on formatting would be much appreciated.
Kind Regards,
Lisa
11-14-2016 10:07 AM
Yes, 1C002000 in hexadecimal contains data in 29 bits. You can easily see this by changing the radix of the numeric control from "x" (hex) to "b" (binary).
All of the fields are within these 29 bits as defined in your spec. With some bit shifting and masking, you can deconstruct the values from the Arbitration ID.
11-14-2016 10:43 AM
brilliant! Thanks so much for your clear explanation.