09-04-2012 11:47 PM
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.
Solved! Go to Solution.
09-05-2012 06:39 AM
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.
09-05-2012 07:08 AM - edited 09-05-2012 07:09 AM
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.
09-05-2012 07:17 AM
With NI-CAN, you could try the virtual ports (255/256, maybe 256/257).
09-05-2012 07:23 AM
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?
09-05-2012 07:28 AM
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.
09-05-2012 07:32 AM
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.