NI-XNET API for LabVIEW and C

XNET Read.vi

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

XNET Read.vi

Purpose

Reads data from the network using an XNET session.

Description

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

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

There are three categories of XNET Read instance VIs:

  • Signal: Use when the session mode is Signal Input. The XNET Read VI instance must match the mode exactly (for example, the Signal Waveform instance when mode is Signal Input Waveform).
  • Frame: Use when the session mode is Frame Input. The XNET Read 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 read state, status, and time information for the session interface. You can use these instances in addition to Signal or Frame instances, and they are not related to the mode. The data these instances return is optimized for performance. Although property nodes may return similar runtime data, those properties are not necessarily optimized for real-time loops.

The XNET Read instance VIs are:

  • Signal Single-Point: The session mode is Signal Single-Point.
  • Signal Waveform: The session mode is Signal Waveform.
  • Signal XY: The session mode is Signal Input XY.
  • Frame CAN: The session uses a CAN interface, and the mode is Frame Input Stream, Frame Input Queued, or Frame Input Single-Point.
  • Frame Ethernet: Reads data from a session as an array of Ethernet frames. The session must use an Ethernet interface and a mode of Frame Input Stream.
  • Frame FlexRay: The session uses a FlexRay interface, and the mode is Frame Input Stream, Frame Input Queued, Frame Input Single-Point, PDU Input Queued (similar to Frame Input Queued), and PDU Input Single-Point (similar to Frame Input Single-Point).
  • Frame LIN: The session uses a LIN interface, and the mode is Frame Input Stream, Frame Input Queued, or Frame Input Single-Point.
  • Frame Raw: A data type for frame input that is protocol independent and more efficient than the protocol-specific instances.
  • State CAN Comm: Returns the CAN interface's communication state.
  • State FlexRay Comm: Returns the FlexRay interface's communication state.
  • State FlexRay Cycle Macrotick: Returns the current global time of the session FlexRay interface, represented as cycle and macrotick.
  • State FlexRay Statistics: Returns the communication statistics for the session FlexRay interface.
  • State LIN Comm: Returns the LIN interface's communication state.
  • State SAE J1939 Comm: Returns the state of J1939 communication.
  • State Time Comm: Returns the LabVIEW timestamp at which communication began for the session interface.
  • State Time Current: Returns the session interface current time as a LabVIEW timestamp.
  • State Time Start: Returns the LabVIEW timestamp at which communication started for the session interface. This time always precedes the Communication time.
  • State Time Trigger: Reads the captured timestamp for an imported Time Trigger.
  • State Session Info: Returns the current state for the session provided.
Note:  If an overflow error occurs while multiple input stream sessions are open on the same interface, all input stream sessions must be either stopped or flushed before new data can be received. For more information, refer to XNET Flush.vi.

Log in to get a better experience