Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I send and receive can messages simultaneously in a single port?

We are using LabView to monitor messages on the CAN bus .and I got the sample code "CAN_SendandReceive_using_NICAN_Frames" from your website ,which could only do "send" or "receive" action at one time.so I`m puzzled that  could I send and receive can messages simultaneously in a single port? If possible ,could you please give me some instruction? thank you!!!
0 Kudos
Message 1 of 2
(3,244 Views)
I think you do not understand CAN correctly here, you are using 1 port to both Send and Receive CAN frames.  CAN works by sending and receiving data over the same 2 physical wires, so the CAN chip can not physically send a message at the exact instant it is receiving a message (this is a limitation of ALL CAN chips, it was intentionally designed this way). 
This VI is the closest you will come, with the example you are able to switch between sending and receving CAN traffic on one port with almost no delay. 
One other note, because you are using the same configuration for both sending and receiving, the CAN chip will be configured to read any CAN traffic and put it into a buffer whenever it is not actually sending a message, so you are not missing messages, you just nead to issue a CAN read command to get the messages in the buffer. 
 
Hope this helps
0 Kudos
Message 2 of 2
(3,235 Views)