NI-XNET API for LabVIEW and C

XNET Write.vi

  • Updated2023-11-11
  • 3 minute(s) read
 XNET Write.vi

XNET Write.vi

Purpose

Writes data to the network using an XNET session.

Description

The instances of this polymorphic VI specify the type of data provided.

The XNET Read and XNET Write VIs are optimized for real-time performance. The XNET Write VI executes quickly and avoids access to shared resources that can induce jitter on other VI priorities.

The XNET Write VIs are asynchronous, in that data is written to a hardware buffer, but the XNET Write VI returns before the corresponding frames are transmitted onto the network. If you need to wait for the data provided to the XNET Write VI to transmit onto the network, use the XNET Wait (Transmit Complete) VI.

There are two categories of XNET Write instance VIs:

  • Signal: Use when the session mode is Signal Output. The XNET Write VI instance must match the mode exactly (for example, the instance is Signal Waveform when the mode is Signal Output Waveform).
  • Frame: Use when the session mode is Frame Output. The XNET Write VI instance specifies the desired data type for frames and is not related to the mode. For an easy-to-use data type, use the CAN, FlexRay, or LIN instance.
  • State: Use to change the session's interface state. You can use these instances in addition to Signal or Frame instances, and they are not related to the mode. These instances are optimized for performance. Although property nodes may provide write access to similar runtime data, those properties are not necessarily optimized for real-time loops.

The XNET Write instance VIs are:

  • Signal Single-Point: The session mode is Signal Output Single-Point.
  • Signal Waveform: The session mode is Signal Output Waveform.
  • Signal XY: The session mode is Signal Output XY.
  • Frame CAN: The session uses a CAN interface, and the mode is Frame Output Stream, Frame Output Queued, or Frame Output Single-Point. Additionally, the XNET Write (Frame CAN) VI can be called on any signal or frame input session if it contains one or more Event Remote frames (refer to CAN:Timing Type). In this case, it signals an event to transmit those remote frames.
  • Frame Ethernet: Writes data to a session as an array of Ethernet frames. The session must use an Ethernet interface and a mode of Frame Output Stream.
  • Frame FlexRay: The session uses a FlexRay interface, and the mode is Frame Output Single-Point, Frame Output Queued, PDU Output Single-Point (similar to Frame Output Single-Point), or PDU Output Queued (similar to Frame Output Queued).
  • Frame LIN: The session uses a LIN interface, and the mode is Frame Output Stream, Frame Output Single-Point, or Frame Output Queued.
  • Frame Raw: A data type for frame output that is protocol independent and more efficient than the CAN, FlexRay, and LIN instances.
  • State LIN Diagnostic Schedule Change: Write a request for the LIN interface to change the diagnostic schedule.
  • State LIN Schedule Change: Submit a request for the LIN interface to change the running schedule.
  • State Ethernet Sleep: Writes a request for the local Ethernet interface and its remote link partner to sleep.
  • State Ethernet Wake: Writes a request for the local Ethernet interface and its remote link partner to wake up.
  • State FlexRay Symbol: Write a request for the FlexRay interface to transmit a symbol on the FlexRay bus.

Log in to get a better experience