From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN wrtie frequently causes the message to stop

I am having a problem with CAN. I have a PXI RT Controller with 2 CAN cards. I am trying to send out 1 message at 50Hz and another two messages that are single writes each time through a timed loop. My problem is that when I try to change the 50 Hz message with CAN write.vi it will frequently, but not always, lock up and stops transmitting with an error about bus configuration (wiring) but the other messages keep going.

0 Kudos
Message 1 of 4
(3,562 Views)

Hi Don, do you have terminating resistors on either end of the cable? We were having fickle communication because of that.

 

Sima

0 Kudos
Message 2 of 4
(3,552 Views)
Sima, Yes the bus is properly terminated at both ends. Other devices continue to work on the bus. I continue to write other messages from other ports but this message stops.
Thanks,
Don
0 Kudos
Message 3 of 4
(3,549 Views)

Hi DonD,

If i understand it right, you have 1 timed loop with three different CAN Write object functions and if you change the value to write of one object this object stops?

This should not happen. So i assume there is an mistake in your code.
Can you run the NI Spy from Start>Programs>National Instruments (Windows).
The Spy is able to log all API Calls, so i can get an idea what is going on with your application.
 
Start the Spy, Run the Logging and then run your application, try to reproduce the problem, stop your application and stop the logging.
save the Spy file and attache it to your answer.
 
Dirk W
Message 4 of 4
(3,525 Views)