Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET Queued and Stream on single LIN Output

Using a single LIN output interface, created a very slow Queued Output session (4000ms), and a Stream Output sesstion...

The problem is the Stream Ouput frames will not write to the bus until the 4000ms is up, rather than immediately (they are first in the queue)...

Tried to change the order of the session creation, but no change...

Tried stopping the queued session, then send the stream output, then queued session back on, still same problem...

 

Simply want to have a master send a Queued Message every 4sec's to keep my slave alive, then at a none scheduled time give my slave a command...

Both using the same LIN output XNET interface

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

Hi jsietz,

 

Could you provide a copy or screenshot of the relevant part of your code?

0 Kudos
Message 2 of 5
(4,780 Views)

Thanks for looking, Bit messy, as trying different things, 2 attachments...

Download All
0 Kudos
Message 3 of 5
(4,774 Views)

Nothing is immediately popping out to me yet, but one resource that may be of help to you is the XNET Hardware and Software Manual:

 

http://www.ni.com/pdf/manuals/372840k.pdf

 

It is very thorough on the details of XNET, and a quick search may find you the information you're looking for.  Take a look and let me know!

0 Kudos
Message 4 of 5
(4,753 Views)

The main issue we run into when trying to interleave the Frame Output Stream with the Scheduled Frame Output Queued session is that the Stream session treats each stream output session as a seperate run-once schedule containing a single slot. So the application will wait for the normal 4 second schedule to stop, run the stream session once, and restart the 4 second schedule. The exact behavior is doucmented in the Special Considerations for LIN section of the manual on about page 4-162. 

 

There are a few ways to work around this. One way is to create a schedule with one 4 second slot and numerous other slots to hold the stream output. I have attached an example that shows how this could be done.

 

Another alternative would be to assign an event-triggered frame to each of the 39 dummy slots and not use a seperate stream session at all.

 

 

Jeff L
National Instruments
0 Kudos
Message 5 of 5
(4,631 Views)