XNET Read (Frame FlexRay) VI
- Updated2025-07-07
- 7 minute(s) read
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.

Inputs/Outputs
![]() session in is the session to read. This session is selected from the LabVIEW project or returned from the XNET Create Session VI. The session mode must be Frame Input Stream, Frame Input Queued, or Frame Input Single-Point. ![]() number to read is 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 session list. This ensures that the XNET Read (Frame FlexRay) VI can return the current value of all session frames. ![]() timeout is 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, the XNET Read (Frame FlexRay) VI 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, the XNET Read (Frame FlexRay) VI waits indefinitely for number to read frame values. If timeout is zero, the XNET Read (Frame FlexRay) VI 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. ![]() The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. ![]() session out is the same as session in, provided for use with subsequent VIs. ![]() data 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. The cluster elements are:
![]() The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. ![]() payload is 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.
|
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.
Due to issues with LabVIEW memory allocation for clusters with an array, this XNET Read VI instance can introduce jitter to a high-priority loop on LabVIEW Real-Time (RT). The XNET Read (Frame Raw) VI instance provides optimal performance for high-priority loops.