FlexRay Timing Type and Session Mode

For each XNET Frame FlexRay:Timing Type property value, this topic describes how the frame behaves for each XNET session mode.

An input session receives the FlexRay data frame from the network, and an output session transmits the FlexRay data frame. The FlexRay data frame data (payload) is mapped to/from signal values.

You use FlexRay null frames in the static segment to indicate that no new payload exists for the frame. In the dynamic segment, if no new payload exists for the frame, it simply does not transmit (no frame).

For NI-XNET input sessions, the Timing Type does not directly impact the representation of data from the appropriate nxRead function.

For NI-XNET output sessions, the Timing Type determines whether to transmit a data frame when no new payload data is available.

Cyclic Data

The data frame transmits in a cyclic (periodic) manner.

If the frame is in the static segment, the rate can be once per cycle ( FlexRay:Cycle Repetition 1), once every N cycles ( FlexRay:Cycle Repetition N), or multiple times per cycle (FlexRay:In Cycle Repetitions:Enabled?).

If the frame is in the dynamic segment, the rate is once per cycle.

If no new payload data is available when it is time to transmit, the payload data from the previous transmit is repeated.

Signal Input Single-Point, Signal Input Waveform, and Signal Input XY Modes

You specify the FlexRay signals when you create the session, and a specific FlexRay data frame contains each signal. When the FlexRay data frame is received, a subsequent call to the appropriate nxRead function returns its data. For information about how the data is represented for each mode, refer to Session Modes.

If a FlexRay null frame is received, it is ignored (no effect on the nxRead function). FlexRay null frames are not used to map signal values.

Frame Input Queued and Frame Input Single-Point Modes

You specify the FlexRay frame(s) when you create the session. When the FlexRay data frame is received, a subsequent call to the appropriate nxRead function returns its data. For information about how the data is represented for each mode, refer to Session Modes.

If a FlexRay null frame is received, it is ignored (not returned).

Frame Input Stream Mode

You specify the FlexRay cluster when you create the session, but not the specific FlexRay frames. When any FlexRay data frame is received, a subsequent call to the appropriate nxRead function returns it.

If the XNET Session Interface:FlexRay:Null Frames To Input Stream? property is true, and FlexRay null frames are received, a subsequent call to nxRead for the stream returns them. If Null Frames To Input Stream? is false (default), FlexRay null frames are ignored (not returned). You can determine whether each frame value is data or null by evaluating the type element (refer to the appropriate nxRead function).

Signal Output Single-Point, Signal Output Waveform, Signal Output XY, Frame Output Single-Point, and Frame Output Queued Modes

You specify the FlexRay frame (or its signals) when you create the session. When you write data using the appropriate nxWritefunction, the FlexRay data frame is transmitted onto the network. For information about how the data is represented for each mode, refer to Session Modes.

When the session and its associated interface are started, the FlexRay data frame transmits according to its rate. After that first transmit, the FlexRay data frame transmits according to its rate, regardless of whether the appropriate nxWrite function is called. If no new data is available for transmit, the next cycle transmits using the previous FlexRay data frame (repeats the payload).

If the frame is contained in the static segment, a FlexRay data frame transmits at all times. The FlexRay null frame is not transmitted. If you pass the FlexRay null frame to the appropriate nxWrite function, it is ignored.

If the frame is contained in the dynamic segment, a FlexRay data frame transmits every cycle. The dynamic frame minislot is always used.

Frame Output Stream Mode

This session mode is not supported for FlexRay.

Event Data

The data frame transmits in an event-driven manner. The event is the appropriate nxWrite function.

Because FlexRay is a time-driven protocol, the minimum interval between events is specified based on the FlexRay cycle. This minimum interval is configured in the same manner as a Cyclic frame.

If the frame is in the static segment, the interval can be once per cycle ( FlexRay:Cycle Repetition 1), once every N cycles ( FlexRay:Cycle Repetition N), or multiple times per cycle ( FlexRay:In Cycle Repetitions:Enabled?).

If the frame is in the dynamic segment, the interval is once per cycle.

If no new event (payload data) is available when it is time to transmit, no frame transmits. In the static segment, this lack of new data is represented as a null frame.

Signal Input Single-Point, Signal Input Waveform, Signal Input XY, Frame Input Single-Point, Frame Input Queued, and Frame Input Stream Modes

The behavior is the same as Cyclic Data.

Signal Output Single-Point, Signal Output Waveform, Signal Output XY, Frame Output Single-Point, and Frame Output Queued Modes

The behavior is similar to Cyclic Data, except that the FlexRay data frame does not continue to transmit cyclically after the data from the appropriate nxWrite function has transmitted. Because the database-specified timing for the frame is event based, after the FlexRay data frames for the appropriate nxWrite function have transmitted, the FlexRay data frame does not transmit again until a subsequent call to the appropriate nxWrite function.

If the frame is contained in the static segment, a FlexRay null frame transmits when no new data is available (no new call to the appropriate nxWrite function). If you pass the FlexRay null frame to the appropriate nxWrite function, it is ignored.

If the frame is contained in the dynamic segment, the frame does not transmit when no new data is available. The dynamic frame minislot is used only when new data is provided to the appropriate nxWrite function.

Frame Output Stream Mode

This session mode is not supported for FlexRay.