North Oakland County LabVIEW User Group

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN connection

Guys,

 

Do you know if USB powered XNET devices (i.e NI 8502) require CAN ground (COM) to be connected? Or just CAN_H and CAN_L? The reason I ask this is because I'm troubleshooting a system and I want to use an NI 8502 as a monitor but I only see CAN error frames in the XNET bus monitor. I know this is a LabVIEW forum, but I wanted to get your thoughts.

 

Thanks!

Luis CT
0 Kudos
Message 1 of 9
(4,981 Views)

not necessarily need ground. unless you are providing power over the db9.  

 

Error Frames, usually are with regards to:

  • CAN_h, CAN_l not connected
  • missing termination character
  • invalid baud
  • I usually make sure the bus goes off ( or transceiver is shutdown to clear bus error)

 

0 Kudos
Message 2 of 9
(4,971 Views)

I have received high speed and CAN FD frames on a 8502 that only had CAN-H and CAN-L connected.  Sorry, the problem must be some where else.  Is the CAN lines to the proper CAN 2.0 spec of two 120 Ohm resistors on the bus one at each end, and no node comes off of the bus by more than 15cm (or something)?  Does the sample point need to be adjusted?

0 Kudos
Message 3 of 9
(4,967 Views)

Found the issue!

 

Here’s what was going on: I got a system that is using CANoe and a CAN case (1640A) with a CAN FD transceiver. Systems settings: Baud rate 500K, FD data rate 2M. So, I set those parameters in the XNET bus monitor. But as I mentioned I only got error frames while reading the bus.

I read Sam’s reply (thank you Sam) and I checked all connections again, checked my impedance on both ends of the bus and all seem to be OK.

 

Solution:

Within CANoe if you open the settings of your hardware you will not see all the transceiver settings in the general page (that's what I missed), you must go to the full setup category:

 

Luis_CT_0-1580331526438.png

Inside the setup make sure to check out the Sample Point (%) setting. You need to match that parameters for both Baud Rate and Data Phase in the XNET monitor as well:

 

Luis_CT_1-1580331526441.png

And the only way to do that is by setting a custom Baud and Data date from the drop-down list (not by default). If you’re setting this via the XNET driver then make sure to check this KB:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LvUSAU&l=en-US

 

That's it! Hope you find this useful if you ever want to match CAN settings with Vector tools.

 

Luis CT
0 Kudos
Message 4 of 9
(4,952 Views)

Hey Brian,

 

I hoped your message had arrived earlier. That was my issue. The Sample Point %.

 

Luis CT
0 Kudos
Message 5 of 9
(4,949 Views)

Yeah we recently had issues with that too.  I wanted a UI where a user could type in the baud and sample point and have XNet take care of it.  With the help from some at NI you can calculate that custom baud hex value given that information:

 

https://forums.ni.com/t5/Automotive-and-Embedded-Networks/Custom-Baud-Rate-Calculator-VI/td-p/397801...

0 Kudos
Message 6 of 9
(4,941 Views)

Another fun thing about NI and CAN FD is that for VeriStand you must use the decimal version of the Custom Baudrate to configure CAN FD.  Note:  These are not the same values but examples of where I am talking about for reference.

Not completely on the topic but another gotcha with NI and CAN FD. 

DavidWilt_0-1580332889274.png

DavidWilt_1-1580332920362.png

David Wilt
The New Standard LLC
0 Kudos
Message 7 of 9
(4,937 Views)

Good information guys.

 

Thanks. Hope to see you in our next UGM.

Luis CT
0 Kudos
Message 8 of 9
(4,901 Views)

The good news is that CAN FD is now natively supported in VeriStand 2019

 

 

0 Kudos
Message 9 of 9
(4,761 Views)