Table Of Contents

XNET Write (Frame » FlexRay) (G Dataflow)

Last Modified: November 2, 2017

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.

connector_pane_image
datatype_icon

session in

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

datatype_icon

data

Provides the array of LabVIEW clusters. Each array element corresponds to a frame value to transmit.

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.

datatype_icon

Slot

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

datatype_icon

cycle count

A parameter that 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 to transmit the frame on channel A (true) or not (false).

datatype_icon

chB

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

datatype_icon

echo?

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

datatype_icon

type

The frame type.type is not used for transmit, so you must leave this element uninitialized. All frame values are assumed to be the FlexRay Data type. Frames of FlexRay Data type contain payload data.

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.

datatype_icon

timestamp

A parameter that represents absolute time using the LabVIEW absolute timestamp type. timestamp is not used for transmit. You must set this element to the default value, invalid (0).

The slot and cycle count specify when the frame transmits in FlexRay global time.

datatype_icon

payload

The array of data bytes for FlexRay frames of type FlexRay Data. The array size indicates the payload length of the frame value to transmit. According to the FlexRay protocol, the length range is 0-254.

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.

datatype_icon

timeout

The time to wait for the FlexRay frame data to be queued up for transmit. The timeout is a LabVIEW relative time, represented as 64-bit floating-point in units of seconds.

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.

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

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

session out

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

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

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.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics