Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Read & write on the same CAN bus

I would like to continuously read and write over the same CAN bus. I have used for this the "ncConfigCANNET.vi" and opened this with "ncOpen.vi". For reading I have used "ncReadNet.vi" and for writing "ncWriteNet.vi".
The problem is that whatever command (read or write) I use first this will functions well, but the second command will be ignored.
I have chosen for a network interface object because of the manny different ID's that must be send and will be recieved.

Do I have to work whit single objects or do I something wrong?
0 Kudos
Message 1 of 6
(7,155 Views)
Hi,

You shouldn't have any problems reading and writing using a CAN interface object. You can even read and write frames using the same arbitration ID, a restriction when using CAN objects.

I used the CAN received.vi shipping example and added a WriteNet.vi after the read VI.

Could you describe with more detail what you are doing in your program (VI)?.

DiegoF.
0 Kudos
Message 2 of 6
(7,155 Views)
Hi,

I have attached a piece of my program to show what I have done to read and write from and to the CAN bus. On the panel of the top VI I have placed some background information.

Pascal
0 Kudos
Message 3 of 6
(7,155 Views)
Hi,

I checked your VI, but it is difficult for me to go through it and try to determine what is going on. I'm attaching the examples I used to test this situation.

Basically, the zip file include two identical VIs with different names so you can open them at the same time. I ran the VIs on the same computer using a dual port CAN card.

Hope this helps.
DiegoF
0 Kudos
Message 4 of 6
(7,155 Views)
Hi,

Thank you very much for your programs. Because your programs should work and it didn't on my PC, I found out that the problem wasn't my application but the cable between the busses. I thought that only the Signal ground, CAN_L and CAN_H where necessarily, but also V+ and V- must be connected and V+ powered.

Pascal
0 Kudos
Message 5 of 6
(7,155 Views)
Hello,
i´m very interested in these examples, but i can´t open them because i use Labview 6.0.1 and they use Labview 6.1. How can i open them?.
thanks
e.c.
0 Kudos
Message 6 of 6
(7,155 Views)