Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Set CAN frame order for frames with same transmit time?

I'm trying to simulate a device that requires that a particular set of messages be sent in a specific order (all with the same transmit time).  Is something like this possible using a signal output single-point session or is the only option to write custom code to handle these periodic messages?

0 Kudos
Message 1 of 3
(2,594 Views)

I believe you want the Frame Out Queued session type for frames, and for Signals the XY Out, or Waveform Out both do what you want, where at the specified times, new values go out.  You can queue up a bunch of values and then at the specified rate the new frame or signal data goes out.  Once that queue is empty transmission stops so you'll want to keep writing to it if you want transmission to continue.  I cover some of this in the Part 6 of my CAN Blog but since I don't go into detail too much on these you might be better off reading up on the different XNet session types.

0 Kudos
Message 2 of 3
(2,585 Views)

You don't need custom code to do this. If you *want* them to be periodic and they have the same rate, there is a property for a frame session (IIRC) that lets you set the starting offset (if you don't set it, then they are pseud-randomly pushed into the transmit queue). Then, you can control the ordering of the messages. If they don't have the same rate, then you won't have much success as they will move around. If you give two message the same offset, they would transmit in ID order.

0 Kudos
Message 3 of 3
(2,567 Views)