LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN with CompactRIO - How to utilize a dbc file?

I have created a basic dbc file using CANdb++ Editor software from Vector with just 2 signals and 1 message. And apart from that, I have sent a "raw" CAN message from my cRIO to CANalyzer and received the message just fine.

 

But from what I understand, for all my CAN nodes to be understanding of each other, they all need the same dbc file. That way when I send a message from CANalyzer, my cRIO will understand what the heck that data means.

 

Is there any literature or examples for this? I know about the example projects in the help, but from what I can tell none of them are based around dbc files. Although I could be wrong

 

 

0 Kudos
Message 1 of 2
(1,668 Views)

First I'd suggest checking out my CAN blog (I'm a bit biased).  In particular I'd say the first couple parts, and then Part 5 which deals with the Signal API.

 

As for if a DBC is required, it really isn't.  Without it you will get a raw array of frames every time you perform a read.  The frame will contain an ID, and data.  The ID should tell you what device sent it.  There isn't a requirement that only one device sends a unique ID, but in practice it is true.  

 

So lets say ID 0x101 is a set of temperature messages.  If you know how the temperatures are packed into the message you don't need a DBC.  You can just read the raw payload data, and convert it by applying the scaling you need.  The DBC just defines the scale, and data packing going on.  But if you do develop your system to use a DBC, then if the DBC scaling or data packing changes, you just need to use the new DBC, and your application might not need to be updated.

0 Kudos
Message 2 of 2
(1,645 Views)