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 Transmit/Receive Same Port using USB-8473?

Solved!
Go to solution

Hi, I'm new to the CAN interface. I have a USB-8473 attached to my USB port using Labview 11. I'm writing some labview routines to use the CAN port, but since I don't have 2 of them, I thought I'd just transmit a frame of data and read it back on the same port for testing purposes. Currently I'm trying to use the Transmit Receive same Port.vi example just to see, if this will work, but when I execute the VI and transmit data then set the RTR bit to receive the frame back, nothing is ever reported. Is there extra setup I need to do before using the 8473 CAN device. I even tried setting the self reception attribute as well and nothing ever gets reported back. I'm using a Baud rate of 125K on CAN0. Can anyone help me understand why this doesn't work?

 

Thanks.

0 Kudos
Message 1 of 7
(7,711 Views)

You always need two physical CAN nodes for CAN communication. Self-reception only works if there is ALSO someone else on the network to acknowledge the transmission.

0 Kudos
Message 2 of 7
(7,707 Views)

Thanks for the response. The example name is little misleading then since it claims Transmit Receive same Port 😃 My problem is I need to debug some CAN commands without having to buy another CAN. So, I guess there is no way just using 1 CAN that I can transmit a frame and read it back using one 4873 on the bus, is that correct? It's seems like there should be some way for software developers to debug CAN code without having 2 of them, but maybe not.

0 Kudos
Message 3 of 7
(7,698 Views)

With NI-CAN, you could try the virtual ports (255/256, maybe 256/257).

0 Kudos
Message 4 of 7
(7,692 Views)

Would I just transmit a frame out on CAN 0 then receive it back using the CANReceive.vi example on one of the virtual ports on 256 or 257. If so, I tried this, but I never see any frame data returned. Any ideas on this?

0 Kudos
Message 5 of 7
(7,690 Views)
Solution
Accepted by topic author QRP

No... everything would have to be virtual (transmit on 256, receive on 257). NI-CAN ships with the two virtual ports internally connected together. They aren't exactly the same as a real port, but it may help you do some testing.

 

 

0 Kudos
Message 6 of 7
(7,687 Views)

Ah yes, that works. Thank you so much! I figured there must be way to do this since Labview is such a powerful tool.

Thanks again.

0 Kudos
Message 7 of 7
(7,684 Views)