Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I determine which frames are received by a LIN node using XNET?

I tried using the FrmsRx property of an ECU, but that misses some frames - based on inspection of the LDF checking which frames contain signals that the node subscribes to.

 

I am using XNET 1.7.

0 Kudos
Message 1 of 6
(6,385 Views)

Hi there,

 

Do you miss frames when you use the Bus Monitor? If not, then maybe you can use the "LIN Frame Input Stream.vi" shipping example and add the FrmsRx property to see if you're still missing some frames.

 

What do the frames that you miss have in common? A specific arbitration ID?

Regards,
Daniel REDS
RF Systems Engineer

Help us grow.
If a post solves your question, mark it as The Solution.
If a post helps, give Kudos to it.
0 Kudos
Message 2 of 6
(6,351 Views)

I don't use Bus Monitor.

 

I'm not sure what all the frames have in common, but I have found that if I comment out all of the unsubscribed signals that alphabetically come before the first subscribed signal, the frame is included in the FrmsRx array.

 

The code is used in a test for many nodes with many different LDFs, so editing the LDF before running the test is not a good solution.

 

-Jaime

0 Kudos
Message 3 of 6
(6,347 Views)

Hi Jaime,

 

The idea of using Bus Monitor was to rule out any code that might be filtering the packets (as oppossed to dropping them), which for the sound of things, you were.

 

It looks like you might be stuck reading a frame from an LDF you shouldn't be reading from. Do you have an array of databases that you index to an XNET Create Session VI, and then read?

 

Do you see the same behaviour if you use the XNET Read VI, as opposed to the FrmsRx? Is there a particular reason you choose the latter over the former?

 

Can you send a snippet of your code to take a better look at it?

Regards,
Daniel REDS
RF Systems Engineer

Help us grow.
If a post solves your question, mark it as The Solution.
If a post helps, give Kudos to it.
0 Kudos
Message 4 of 6
(6,340 Views)

I think we may be talking about two different scenarios.

 

Are referring to active bus traffic?

 

The problem I have is getting the "Frames Received" property from the LDF for node that I'm about to test.  There is no bus traffic involved at this point and I only have a single LDF open at a time.

 

I've attached the problem vi.

 

Thanks for looking into this.

0 Kudos
Message 5 of 6
(6,335 Views)

We were talking about two different things, I thought you meant there was bus traffic. Thanks for clarifying 🙂

 

So I ran your VI with a sample LDF file I found online, but I was able to get all of the Received frames from both ECUs. You can open the XNET Database Editor and check that "MB_LINMaster" ECU has the "ID_DATA" and "LIN_STATE" frames, and the "iStars_LINSlave" ECU has only one "LIN_CONTROL" frame. All three show up if you concatenate the RxFrms. Could you attach your LDF so I can reproduce it on my end?

Regards,
Daniel REDS
RF Systems Engineer

Help us grow.
If a post solves your question, mark it as The Solution.
If a post helps, give Kudos to it.
Download All
0 Kudos
Message 6 of 6
(6,325 Views)