Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN communication issue

Solved!
Go to solution

Hello,

 

I am using NI XNET USB 8502 and Bus monitor to communicate with microcontroller. I was able to send and receive messages but getting error frames now

 

Getting bus off stage when I try to send message from bus monitor. 

Getting error frames along with messages when I try to receive message

 

Receive messages on Bus monitor:

MM29_0-1727823543110.png

 

Bus statistics page for Transmitting message:

MM29_1-1727823577005.png

 

Bus statistics page for CAN transmit message:

MM29_2-1727823614073.png

 

0 Kudos
Message 1 of 5
(2,331 Views)

According to Special Frames, you are encountering with Stuff Error. This is usually caused by improper termination. My CAN Device is Failing to Communicate or is Inconsistent at High Baud Rates

Make sure your CAN network is terminated at both ends. Or you can enable the termination in USB-8502.

ZYOng_0-1727827775189.png

 

-------------------------------------------------------
Control Lead | Intelline Inc
Message 2 of 5
(2,317 Views)

I have 120ohm termination and also I have enabled termination in XNET bus monitor

MM29_0-1727883798206.png

 

From Bus monitor end, I am able to receive Data frame along with Error frame but getting bus off stage when I try to transmit. 

 

0 Kudos
Message 3 of 5
(2,283 Views)
Solution
Accepted by topic author MM29

It is odd to see stuff bit error with the slow baud rate of 125kBaud.

Do you have another CAN adapter like PCAN-USB or Kvaser USB CAN to test if the CAN communication of your microcontroller is working correctly?

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 4 of 5
(2,270 Views)

The problem was with my XNET 8502 device, and it was resolved after replacing the device. With the same settings, I'm now able to send and receive messages successfully.

 

It's surprising that the device failed so suddenly

Message 5 of 5
(2,260 Views)