Automotive and Embedded Networks

cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

How to read message of Can bus in LabVIEW

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).

0 Kudos
Mensagem 1 de 11
20.449Exibições

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,

 

0 Kudos
Mensagem 2 de 11
20.442Exibições

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.

0 Kudos
Mensagem 3 de 11
20.431Exibições

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?

0 Kudos
Mensagem 4 de 11
20.329Exibições

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.

0 Kudos
Mensagem 5 de 11
20.320Exibições

Did you look at any of the examples I mentioned earlier?  It demonstrates how to do basic frame and signal I/O.

0 Kudos
Mensagem 6 de 11
20.317Exibições

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

0 Kudos
Mensagem 7 de 11
20.284Exibições

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".

0 Kudos
Mensagem 8 de 11
20.270Exibições

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?

0 Kudos
Mensagem 9 de 11
19.287Exibições

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

0 Kudos
Mensagem 10 de 11
19.250Exibições