Table Of Contents

XNET Write (Frame » LIN) (G Dataflow)

Last Modified: February 22, 2017

Writes data to a session as an array of LIN frames. The session must use a LIN interface and a mode of Frame Output Stream, Frame Output Queued, or Frame Output Single-Point.


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.



An input that 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.

For Frame Output Queued session mode, the data you write is queued up for transmit on the network. Using the default queue configuration for this mode, 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 LIN protocol.



A parameter not used for transmit. You must set this element to 0. Each frame is identified based on the list of frames or signals provided for the session. The actual identifier to transmit is taken from the database (frame and schedule properties). Therefore, this identifier in the frame value is ignored.


event slot?

A parameter not used for transmit. You must set this element to false. The currently running schedule is used to map the specific frame to a corresponding schedule entry (slot). The schedule entry itself determines whether the slot is unconditional, sporadic, or event triggered.


event ID

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



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



The frame type (decimal value in parentheses).

LIN Data (64) The LIN data frame contains payload data. This is currently the only frame type for LIN.


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 array of data bytes for a LIN data frame. The array size indicates the payload length of the frame value to transmit. According to the LIN protocol, the payload length range is 0-8.

The number of bytes in the payload array must match the Payload Length property of the corresponding frame. You can leave all other LIN frame cluster elements uninitialized. For more information, refer to the topic for each mode.

If you use the frame payload within an event-triggered schedule entry (slot), the first byte of data on the network is the frame’s payload identifier. The LIN standard requires this even if the frame transmits in an unconditional or sporadic slot. For this type of LIN frame, the actual data (for example, signal values) is limited to 7 bytes. For this type of frame, you must write the first byte (payload of 8 bytes even if only the last 7 are used), but NI-XNET ignores the value and fills in the first byte for you, using the known frame ID from the session’s configuration.



The time to wait for the LIN 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 LIN) 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 LIN) waits indefinitely for space to become available in queues.

If timeout is 0, XNET Write (Frame LIN) 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 LIN) 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: 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.


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

The LIN frames are associated to the session's list of frames as follows:

  • Frame Output Stream Mode: Array of all frame values for transmit (list ignored). If the payload is an empty array, only the header part of the LIN frame is transmitted. If the payload is not an empty array, the header and response parts of the LIN frame are transmitted.
  • 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.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Supported

Recently Viewed Topics