From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

How to distinguish between frames that comes from my TX CAN Object and frames that comes from the network?

Solved!
Go to solution

Hy,

 

I have a Can Object that transmit data to specific id.

I expect to get frame  from the network with similar id and data.

 

How would I know that the data arrived from the network?

(If I listen to the data from the CAN Interface, I can't distinguish between the data that I transmit and between the data that comes from the net) 

 

Thanks in advance,

Aviad

0 Kudos
Message 1 of 4
(6,308 Views)

Start with the simple things: Hardware, Driver, OS, Programming Environment...

0 Kudos
Message 2 of 4
(6,305 Views)

Thankes.

I work with:

 

  • Hardware: PCI-CAN Series 1,
  • Driver: NI-CAN 2.7.3
  • OS: Windows xp
  • Programing environment: QT C++.
0 Kudos
Message 3 of 4
(6,299 Views)
Solution
Accepted by topic author aviadCielo

Since you are using NI-CAN Series 1, which doesn't support any self-reception, I presume you are using two CAN ports... one to do your normal transmission and one to listen to the frames from the CAN bus?

 

If this is the case, the only option that I see for you would be to compare the received payload with the transmitted payload to detect the frames that you send. This will only work if you send and receive different payloads, but that is probably something that is generally true. If that is false, then you really don't have any good option with Series 1 (or even Series 2) and NI-CAN.

 

We do have a different product, NI-XNET, which provides a self-reception setting (like Series 2 NI-CAN), but when you receive the frame it contains a flag that indicates if it was received from the network or was received via self-reception. This would obviously be the simplest (and probably only guaranteed) way to achieve your goal.

0 Kudos
Message 4 of 4
(6,294 Views)