FlexRay
- Updated2023-02-17
- 6 minute(s) read
FlexRay
Writes data to a session as an array of FlexRay frames. The session must use a FlexRay interface and a mode of Frame Output Queued or Frame Output Single-Point.
Inputs/Outputs

session in
The session to write.

data
Provides the array of LabVIEW clusters.
For a Frame Input Single-Point session mode, the order of frames in the array corresponds to the order in the session list.
The data you write is queued up for transmit on the network. Using the default queue configuration for this mode, and assuming frames with 8 bytes of payload, you can safely write 64 frames if you have a sufficiently long timeout. To write more data, refer to the XNET Session Number of Values Unused property to determine the actual amount of queue space available for write.
The elements of each cluster are specific to the FlexRay protocol.

Slot
A parameter that specifies the slot number within the FlexRay cycle.

cycle count
A parameter that specifies the cycle number.

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

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

preamble?
A Boolean value that specifies the value of the payload preamble indicator in the frame header.
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.

chA
A Boolean value that specifies whether to transmit the frame on channel A (true) or not (false).

chB
A Boolean value that specifies whether to transmit the frame on channel B (true) or not (false).

echo?
A parameter not used for transmit. You must set this element to false.

type
The frame type.
The FlexRay Null type is not transmitted based on this type. As specified in the XNET Frame FlexRay:Timing Type property, the FlexRay null frame is transmitted when a cyclically timed frame does not have new data.

timestamp
A parameter that represents absolute time using the LabVIEW absolute timestamp type.
The slot and cycle count specify when the frame transmits in FlexRay global time.

payload
The array of data bytes for FlexRay frames of type FlexRay Data.
For PDU output session mode, the payload is the array of data bytes for the specific PDU, not the entire frame.
When the session mode is Frame Output Single-Point, Frame Output Queued, PDU Output Single-Point, or PDU Output Queued, the number of bytes in the payload array must match the Payload Length property of the corresponding frame. You can leave all other FlexRay frame cluster elements uninitialized. For more information, refer to the section for each mode.

timeout
The time to wait for the FlexRay frame data to be queued up for transmit.
If timeout is positive, XNET Write (Frame FlexRay) waits up to that timeout for space to become available in queues. If the space is not available prior to the timeout, a timeout error is returned.
If timeout is negative, XNET Write (Frame FlexRay) waits indefinitely for space to become available in queues.
If timeout is 0, XNET Write (Frame FlexRay) does not wait and immediately returns with a timeout error if all data cannot be queued. Regardless of the timeout used, if a timeout error occurs, none of the data is queued, so you can attempt to call XNET Write (Frame FlexRay) again at a later time with the same data.
This input is optional. The default value is 10.0 (10 seconds).
If the session mode is Frame Output Single-Point, you must set timeout to 0.0. Because this mode writes the most recent value of each frame, timeout does not apply.

error in
Error conditions that occur before this node runs.
The node responds to this input according to standard error behavior.
Default value: No error

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

error out
Error information.
The node produces this output according to 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's list of frames as follows:
- Frame Output Queued: Array of frame values to transmit for the single frame specified in the list.
- Frame Output Single-Point: Array of single frame values, one for each frame specified in the list.
- PDU Output Queued: Array of frame (PDU payload) values to transmit for the single PDU specified in the list. This mode is similar to Frame Output Queued.
- PDU Output Single-Point: Array of single frame (PDU payload) values, one for each PDU specified in the list. This mode is similar to a Frame Output Single-Point.