Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read data from server using Can Bus protocol

Hi everyone,

I start by saying that I have a base knowledge of LabView. I own LabView 2011 and a 6 month LabView 2014 trial. I also have the USB-8473 CAN Interface and NI CAN1400 drivers installed on my computer.

Through the interface I will be connected to a server to receive different pieces of information. The protocol used by the server is CAN-Bus protocol, which is a standard that I don’t know so much.

The server awaits CAN-Bus frames, that have a 11-bits identifier. To receive information from the server I need to send it a request like the one in the image attached.

To be precise I should be sending a frame made up of only one 11-bits ID and one value of RTR equal to 1.

So the server is supposed to answer me with a frame containing one 11-bits ID, a RTR value equal to 0, and 8 bytes of application data where I can read all the information I need to know.

 

I was wondering if you could help me giving me a working example for LabView with whom I can send a 11-bits ID to the server and receive a frame of answer from it. The 8 bytes received should be printed on screen one by one.

The only examples available after the installation of the drivers NI-CAN show me how to read/write not  simultaneously data from can bus  . Instead, I need to read data from can bus  , but to do this I have to send the server a frame of request.

 

Thank you very much for your attention. If could give me a working example I could start developing all the implementation I need.

0 Kudos
Message 1 of 3
(6,722 Views)

There is a shipped example called Transmit Receive same Port.  THis allows you to constantly be reading the CAN bus, but then when you click Write can send a frame with the ID and payload you want.  In this way you can send your data, and see the response in the table as it is read.

Message 2 of 3
(6,705 Views)

Thank you very much for your help. I've found the example and it's been really helpful. Just what I was looking for! 

0 Kudos
Message 3 of 3
(6,693 Views)