Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

logging data using usb 8473

Hello every one,

 

Iam trying to log the data,  received  on the CAN Bus. Iam using NI-USB8473 CAN device, when i select log after completion under operate tab it's only logging the data what is seen on the front pannel when i hit the stop button, but i want to record all the data right from the beginning to ending. To receive the data Iam using CAN Receive.vi in example finder. Is there any way to do this?

 

Thanks

Shanth

0 Kudos
Message 1 of 10
(8,568 Views)
Hey Shanth,

Have you looked at the logging examples that come with the NI-CAN driver? Net Interface Logging.VI is one example you may want to take a look at, and it should be able to ran concurrently with your CAN Receive code.
Justin E
National Instruments R&D
0 Kudos
Message 2 of 10
(8,540 Views)

Hello Justin,

 

Thanxs for your reply. This helped me out in logging the data. Justin I have stuck at one more point. My application requires logging the data from the CAN Bus and Converting the frames from the Logged data in to independent Channels.I have to take the frame from the Log file and parse it into different messages... Can you pls help me out at this point..

 

 

 

Thank you.

0 Kudos
Message 3 of 10
(8,509 Views)

You may want to look at the CAN Frame Channel Conversion Library that we provide.

You may want to also look at the Display Logfile as Frame.VI example in the same place the first example was found. This will show you how to parse the logfile into independent messages.

Justin E
National Instruments R&D
0 Kudos
Message 4 of 10
(8,489 Views)

Hello Justin,

 

                 I have looked at that example it's just displaying the log file contents i.e frames, Id, time stamp etc.. Justin can you pls help me out with any VI that splits the frame in to each channel it has in,  Iam very new to this lab view programming a part of my application requires this stuff so Iam fighting with it.

 

 

Thank you

 

Shanth.

0 Kudos
Message 5 of 10
(8,475 Views)

Hey Shanth,

 

There should be a couple examples within the Frame Channel Conversion Library I linked. In looking at the library, I saw three USB_CAN examples that convert frames to channels and vice versa. I would highly suggest you take a look at this library, and also the user's guide that comes with it.

 

If you're new to LabVIEW, you may also want to take a look at this document : LabVIEW Tutorial

This should hopefully get you familiar with LabVIEW programming. I'd suggest going through this training, then try to examine the Frame Channel Conversion Library.

 

 

Justin E
National Instruments R&D
0 Kudos
Message 6 of 10
(8,466 Views)

Hey Justin,

 

                Sorry for troubling you a lot..I had already gone through this example's. But this VI's are taking .ncd or .dbc extension file's but the log file has .ncl extensions. Can you pls help me out how to convert the frames to channels with .ncl files.

 

 

Thank you

 

Shanth

 

 

0 Kudos
Message 7 of 10
(8,463 Views)

Hey Shanth,

 

The .ncd and .dbc files are CAN Channel Configuration files. These files contain information on converting the raw CAN data into usable channel data. The .ncl file is a CAN Logfile. What you're going to have to do is extract the raw data from your .ncl file and use a .ncd or .dbc file to convert the raw data to channel data. This is where the CAN Frame Channel Conversion Library will help, but additional programming is going to be required to extract the appropriate data and convert it.

 

Additional Information on .ncl files can be found here : NI-CAN Logfile Specification

Justin E
National Instruments R&D
0 Kudos
Message 8 of 10
(8,433 Views)

Justin,

 

 Iam really new to Lab View programming, I have gone through your link  about the tutorial of labview in 3-6 hr's but couldnt reach up to the mark.  Iam badly in need of this conversion from frames to channels if you have any code to extract the appropraite data from .ncl files for conversions can you pls post that?

 

Thank you,

Shanth.

0 Kudos
Message 9 of 10
(8,427 Views)

Shanth,

 

Unfortunately I do not have any sample code available that extracts the data from the .ncl files besides the shipping examples that come with LabVIEWand the Frame Channel Conversion Library. Hopefully there is someone else on the discussion forum that can give you some sample code.

Justin E
National Instruments R&D
0 Kudos
Message 10 of 10
(8,390 Views)