Automotive and Embedded Networks

Showing results for 
Search instead for 
Did you mean: 
Reply

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

Solved!
Go to Solution

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

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
Reply
0 Kudos

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

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

0 Kudos
Reply
0 Kudos

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

Thankes.

I work with:

 

  • Hardware: PCI-CAN Series 1,
  • Driver: NI-CAN 2.7.3
  • OS: Windows xp
  • Programing environment: QT C++.
0 Kudos
Reply
0 Kudos
Highlighted
Solution
Accepted by topic author aviadCielo
‎08-27-2015 06:09 PM

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

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
Reply
0 Kudos