FlexRay

Reads data from a session as an array of FlexRay frames. The session must use a FlexRay interface and a mode of Frame Input Stream, Frame Input Queued, or Frame Input Single-Point.

1378

Inputs/Outputs

datatype_icon

session in

The session to read.

This session is selected from the LabVIEW project or returned from XNET Create Session. The session mode must be Frame Input Stream, Frame Input Queued, or Frame Input Single-Point.
datatype_icon

number to read

The number of frame values desired.

If number to read is positive (or 0), the data array size is no greater than this number.

If number to read is negative (typically -1), all available frame values are returned. If number to read is negative, you must use a timeout of 0.

This input is optional. The default value is -1.

If the session mode is Frame Input Single-Point, set number to read to either -1 or the number of frames in the sessions list. This ensures that XNET Read (Frame FlexRay) can return the current value of all session frames.

datatype_icon

timeout

The time to wait for number to read frame values to become available.

The timeout is a LabVIEW relative time, represented as 64-bit floating-point in units of seconds.

If timeout is positive, XNET Read (Frame FlexRay) waits for number to read frame values, then returns that number. If the values do not arrive prior to the timeout, an error is returned.

If timeout is negative, XNET Read (Frame FlexRay) waits indefinitely for number to read frame values.

If timeout is zero, XNET Read (Frame FlexRay) does not wait and immediately returns all available frame values up to the limit number to read specifies.

This input is optional. The default value is 0.0.

If the session mode is Frame Input Single-Point, you must leave timeout unwired (0.0). Because this mode reads the most recent value of each frame, timeout does not apply.

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Default value: No error

datatype_icon

session out

An output that is the same as session in, provided for use with subsequent nodes.

datatype_icon

data

This output returns an array of LabVIEW clusters.

Each array element corresponds to a frame the session receives.

For the Frame Input Single-Point and PDU Input Single-Point session modes, the order of frames/payload in the array corresponds to the order in the session list.

The elements of each cluster are specific to the FlexRay protocol. For more information, refer to the FlexRay protocol specification.

datatype_icon

Slot

This element specifies the slot number within the FlexRay cycle.

datatype_icon

cycle count

This parameter specifies the cycle number.

The FlexRay cycle count increments from 0 to 63, then rolls over back to 0.
datatype_icon

startup?

A Boolean value that specifies whether the frame is a startup frame (true) or not (false).

datatype_icon

sync?

A Boolean value that specifies whether the frame is a sync frame (true) or not (false).

datatype_icon

preamble?

A Boolean value that specifies the value of the payload preamble indicator in the frame header.

If the frame is in the static segment, preamble? being true indicates the presence of a network management vector at the beginning of the payload. The XNET Cluster FlexRay:Network Management Vector Length property specifies the number of bytes at the beginning.

If the frame is in the dynamic segment, preamble? being true indicates the presence of a message ID at the beginning of the payload. The message ID is always 2 bytes in length.

If preamble? is false, the payload does not contain a network management vector or a message ID.

datatype_icon

chA

A Boolean value that specifies whether the frame was received on channel A (true) or not (false).

datatype_icon

ChB

A Boolean value that specifies whether the frame was received on channel B (true) or not (false).

datatype_icon

echo?

A Boolean value that determines whether the frame was an echo of a successful transmit (true), or received from the network (false).

This value is true only when you enable echo of transmitted frames by setting the XNET Session Interface:Echo Transmit? property to True. Frames are echoed only to a session with the Frame Input Stream Mode.
datatype_icon

type

The frame type (decimal value in parentheses).

FlexRay Data (32) FlexRay data frame. The frame contains payload data. This is the most commonly used frame type for FlexRay. All elements in the frame are applicable.
FlexRay Null (33) FlexRay null frame. When a FlexRay null frame is received, it indicates that the transmitting ECU did not have new data for the current cycle.

Null frames occur in the static segment only. This frame type does not apply to frames in the dynamic segment.

This frame type occurs only when you set the XNET Session Interface:FlexRay:Null Frames To Input Stream? property to true. This property enables logging of received null frames to a session with the Frame Input Stream Mode. Other sessions are not affected.

For this frame type, the payload array is empty (size 0), and preamble? and echo? are false. The remaining elements in the frame reflect the data in the received null frame and the timestamp when it was received.

FlexRay Symbol (34) FlexRay symbol frame. The frame contains a symbol received on the FlexRay bus.

For this frame type, the first payload byte (offset 0) specifies the type of symbol: 0 for MTS, 1 for wakeup. The frame payload length is 1 or higher, with bytes beyond the first byte reserved for future use. The frame timestamp specifies when the symbol window occurred. The cycle count, channel A indicator, and channel B indicator are encoded the same as FlexRay data frames. All other fields in the frame are unused (0).

Log Trigger (225) A Log Trigger frame. This frame is generated when a trigger occurs on an external connection (for example, PXI_Trig0).
Start Trigger (226) A Start Trigger frame is generated when the interface is started .
datatype_icon

timestamp

This parameter represents the absolute time when the XNET interface received the frame (end of frame), accurate to microseconds.

The timestamp uses the LabVIEW absolute timestamp type.

While the NI-XNET FlexRay interface is communicating (integrated), this timestamp is normally derived from FlexRay global time, the FlexRay network timebase. Under this configuration, the timestamp does not drift as compared to the FlexRay global time (XNET Read (State FlexRay Cycle Macrotick).vi), but it may drift relative to other NI hardware products and the LabVIEW absolute timebase. If you prefer to synchronize this timestamp to other sources, you can use XNET Connect Terminals.vi to change the source of the Master Timebase terminal.

datatype_icon

payload

The array of data bytes for FlexRay frames of type FlexRay Data or FlexRay Null.

The array size indicates the received frame value payload length. According to the FlexRay protocol, this length range is 0-254.

For PDU session modes, only the payload for the particular PDU is returned, not the entire frame.

datatype_icon

unused payloads

This parameter is empty. No user input is needed.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Description

The data represents an array of FlexRay frames. Each FlexRay frame uses a LabVIEW cluster with FlexRay-specific elements.

The FlexRay frames are associated to the session list of frames as follows:

  • Frame Input Stream: Array of all frame values received (list ignored).
  • Frame Input Queued: Array of frame values received for the single frame specified in the list.
  • Frame Input Single-Point: Array of single frame values, one for each frame specified in the list.
  • PDU Input Queued: Array of frame (PDU payload) values received for the single PDU specified in the list. This mode is similar to Frame Input Queued.
  • PDU Input Single-Point: Array of single frame (PDU payload) values, one for each PDU specified in the list. This mode is similar to Frame Input Single-Point.