Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I periodicaly get data from a CAN interface that works in "Transmit by response" mode??

Hello Again!
I am a very new user of LabView, and last week I got the order to implement a Comunication with  a CAN interface.
I am trying to get Information from a CAN interface, that works as a "slave", as it is said in the very short handbook. This means it only responds, when it is asked to.
As i want to get the 20 different datas periodicaly it would be fine to do this in a kind of loop. This means:
-tell the interface to send data1
-read data 1
-tell the interface to send  data 2
......

Are there any examples or ideas, how to create similar loops? 
As I am absolutely no expert in computing, it would be nice if you answer with very little technical terms...

Thanks RT

0 Kudos
Message 1 of 8
(5,721 Views)
Do you use a National Instruments CAN-Board to communicate with your CAN-Interface, or do you use an external hardware. If you are using an exterenal device, how is it connected to your PC (Serial interface, GPIB etc.). If you are using a NI-CAN board, which one do you use? Which version of LabVIEW are you using?
Message 2 of 8
(5,714 Views)

Hi RT,

 

Try the attached example, which writes a remote frame to your slave and reads the response. It is doing this 20 times in a for loop and a specified timing.

Hope that helps.

DirkW

0 Kudos
Message 3 of 8
(5,706 Views)
Hello Andre!
I am using a PCI CAN Highspeed card with one port....

thanks for your help
RT
0 Kudos
Message 4 of 8
(5,693 Views)
I forgot to write: ...Labview Version is 8.01...
0 Kudos
Message 5 of 8
(5,693 Views)
So if you are using a NI-CAN card, the example dirk posted should fit. Have you tried it? Maybe your device needs a special message sent in the frame, so that it answers, but this should be mentioned in the manual of your device.
Message 6 of 8
(5,688 Views)
Thanks a lot!
It  really helped... but 1 question is left...
i don´t really understand the meaning read/write queue length....
can someone describe it in easy word`s??

RT
0 Kudos
Message 7 of 8
(5,686 Views)

these queues are used to buffer the data on its way from the driver to the hardware (write queue) and vice versa (read queue). You only need to adjust these for fine-tuning your application. The default settings should be good for your application.

 

0 Kudos
Message 8 of 8
(5,680 Views)