09-17-2014 12:15 AM
Hi guys. I have a question here on how can i read the message of CAN bus in LabVIEW?
I am using DAQ usb-6251 together with the CAN modules NI usb-8473 (high speed) and NI-usb 8472 (low speed).
09-17-2014 03:50 AM
What error do you recieve?
CAN frames recieved need to be translated into signals based on database files.
You can use NI-mAX Bus monitor to read the frames that are being received. If there are no database files, you must decode the CAN frames.
Regards,
09-17-2014 07:33 AM
I don't know what error you are seeing but the source looks like it should work. Have you confirmed it is working using the bus monitor in MAX? If it doesn't work there, then there is something wrong with your setup. Also there is an example under Help >> Example Finder for reading and writing frames on the same port and that should also work.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-28-2014 11:33 PM
Basically i'm so new to all this bus system. also how do i decode the the CAN frames?
What should i do first in order to get the messages from the raw data?
09-29-2014 06:58 AM
You will need either the DBC or some sort of documentation that shows the format of each message. The messages and formats for each message will vary by network.
09-29-2014 07:26 AM
Did you look at any of the examples I mentioned earlier? It demonstrates how to do basic frame and signal I/O.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-30-2014 07:52 PM
i try to find the appropriate example but i dont know which one is the most relevant to my case? any suggestion?
Thanks in advance
10-01-2014 01:06 PM
I'd start with MAX. If you open MAX and right click your CAN device you should be able to open a bus montitor. This allows you to quickly read and write frames and log them to disk. If this doesn't work then there is no hope for your code.
For simple frame read write stuff check out the example named "Transmit Receive same Port.vi".
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-06-2015 04:28 AM - edited 04-06-2015 04:29 AM
Hi there,
I have the same problem about reading CAN messages.
My project consists of 2 CAN interfaces, CAN1 (NI XNET) and CAN0 (High Speed CAN 8473)
I'm using the Frame output Signal single point and I can already see the CAN messages and their cyclic timing in the BUS monitor by using CAN0.
Question:
Is there a way to programatically read and log the CAN messages from CAN0 into a Labview GUI just like how it behaves in the BUS monitor?
04-07-2015 04:04 PM
Hi Nino58
I apologize if I misunderstood your question. I found a "Channel Monitor.vi" example in the LabVIEW example finder, which seems to be similar to the bus monitor. Would this VI work for what you intend to do?
WenR