Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

How to parse CAN DBC file through CVI

Hi ,

I would like to know if we can parse the CAN .dbc file through CVI, let me know if there is any other approach, We use Labwindows CVI for our testing and we would like to know if we can parse through the .dbc file to get the PGN and SPN information and use them in our testing process. We do not use NI CAN cards etc we use a Supercom to transmit and recieve the messages.

Thanks in Advance

Kishore

0 Kudos
Message 1 of 6
(11,467 Views)

Hi Kishore,

 

you can use the NI-CAN or NI-XNET functions to read data from .dbc files. XNET is more advanced, but so far you can't to frame to channel conversion without hardware (coming soon).

 

So I recommend using NI-CAN. There you can read the channel information fom the dbc file using CAN Get Names and CAN Get Property.

 

You can convert the CAN channels into frames using either the virtual CAN interfaces 256 and 257 (both c and LabVIEW) or using the CAN Channel to Frame conversion library (only LabVIEW). Then you just have to write the frame data on your CAN interface.

 

 

NI-CAN manual

NI-XNET manual

 

Regards,

Andreas Stark
LabVIEW Lead @ Rocket Factory Augsburg
0 Kudos
Message 2 of 6
(11,422 Views)

Hello

 

Is it possible to get the channel properties out of the .DBC database ? I manege to get the channel names but noth the information about the offset and the scaling. When I try it with get properties from the channel ap. I get an error that the USB 8473s doesn't support the channel api. I don't find how I have to do it with the frame api.

 

regards,

 

Florre

0 Kudos
Message 3 of 6
(11,255 Views)

Please have a look at http://forums.ni.com/ni/board/message?board.id=30&thread.id=4827&view=by_date_ascending&page=1 to get a starting for developing frame APIs.

You may use virtual CAN channel(CAN channel 254&255) in code to simulate a Channel API compliant device and can extract the information of dbc file. The extracted info should be useful to make your frame API drivers.





0 Kudos
Message 4 of 6
(11,249 Views)

 


AndreasS wrote:

Hi Kishore,

 

you can use the NI-CAN or NI-XNET functions to read data from .dbc files. XNET is more advanced, but so far you can't to frame to channel conversion without hardware (coming soon).

 

So I recommend using NI-CAN. There you can read the channel information fom the dbc file using CAN Get Names and CAN Get Property.

 

You can convert the CAN channels into frames using either the virtual CAN interfaces 256 and 257 (both c and LabVIEW) or using the CAN Channel to Frame conversion library (only LabVIEW). Then you just have to write the frame data on your CAN interface.

 

 

NI-CAN manual

NI-XNET manual


 

Regards,


 

 

When you say "coming soon", when is this anticipated to be out?  Also, can you use virtual CAN channels with XNET like you can with NI-CAN?

 

I'm trying to determine whether I should write all my new programs using XNET instead of NI-CAN, so anything you can contribute would be appreciated.  Also, is there a significant reason to use XNET instead of NI-CAN if I'm only using CAN and don't care about FlexRay or other protocols?

Message Edited by KavehV on 03-22-2010 05:48 PM
0 Kudos
Message 5 of 6
(11,124 Views)

Hi Kaveh,

 

I unfortunately cannot make promises when a specific feature will be out. For Frame to Channel conversion you had to use either the Virtual CAN interface or the frame2channel conversion library in NI-CAN. So far you can also use the library in XNET.

 

Generally I would recommend to program your new CAN applications in XNET as it is easier to use then NI-CAN. Also new things will only be added to XNET, not NI-CAN (just released LIN support for XNET). Another perspective is the improved performance of XNET hardware. Single-Point input and output is up to 27X faster because XNET uses Direct Memory Access (DMA) to transfer data between host memory and card whereas NI-CAN uses interrupts which are slower and require CPU usage.

 

Best Regards,

Andreas Stark
LabVIEW Lead @ Rocket Factory Augsburg
0 Kudos
Message 6 of 6
(10,909 Views)