02-17-2015 01:55 PM
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.
02-18-2015 06:52 PM
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)
02-18-2015 11:55 PM
Frame LIN, indeed. I'm using a Frame Out Stream session for writing and Frame In Single-Point for reading.
02-19-2015 03:29 PM
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.