Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

lin receiving repetitive frames

Hello,

 

I am using XNET driver and I am sending simple requests (headers). After the request is sent I read the responses that come on lin. My main issue is that after I send a request, whenever I read an answer, I get the answer from the previous request. How can I fix this?

 

Another issue is that I have a while loop that handles my reading, basically, I read all the frames permanently. I noticed that even if I don't send a request, XNET driver receives information on the IDs read. I am always getting some kind of payload. Is there a way to only get just the responses to the requests when the requests are sent? I would like to get empty payloads rest of the time, except for when I send a header.

0 Kudos
Message 1 of 4
(5,019 Views)

I'm assuming for the read and writes, you are using the Frame LIN option, correct? What sort of XNET sessions are you creating? (Frame Stream, Queued, Single-point)

Daniel C.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(4,996 Views)

Frame LIN, indeed. I'm using a Frame Out Stream session for writing and Frame In Single-Point for reading.

0 Kudos
Message 3 of 4
(4,989 Views)

It sounds like you need to use a Frame In Queued session instead of Single-Point. A Single-Point session will read the most recent value for each Frame

 

When you create a Frame In Queue session, you can select a frame from your database and the session will only return values for that frame (your response frame). If there hasn't been a new frame written since the last call of XNET read, it should return blank values.

Daniel C.
Applications Engineer
National Instruments
Message 4 of 4
(4,979 Views)