NI-XNET API for LabVIEW and C

XNET Convert (Frame Raw to Byte Array).vi

  • Updated2023-11-11
  • 3 minute(s) read
 XNET Convert (Frame Raw to Byte Array).vi

XNET Convert (Frame Raw to Byte Array).vi

Purpose

Converts between NI-XNET raw frame data and a byte array signal.

Format

Inputs

session in is the session to read. This session is returned from the XNET Create Session VI. The session mode must be Conversion.
frame data provides the array of bytes, representing frames to transmit.

The raw bytes encode one or more frames using the Raw Frame Format.

This frame format is the same for read and write of raw data and also is used for log file examples.

For information about which elements of the raw frame are applicable, refer to the XNET Convert VI instance for the protocol in use (XNET Convert (Frame CAN to Signal) VI, XNET Convert (Frame FlexRay to Signal) VI, or XNET Convert (Frame LIN to Signal) VI).

For an example of how this data applies, refer to Conversion Mode.

error in is the error cluster input (refer to Error Handling).

Outputs

session out is the same as session in, provided for use with subsequent VIs.
signal data returns a byte array representation of the single signal in the conversion session.

If there is more than one signal in the session, or the signal cannot be represented as a byte array, an error will be returned.

The data returns the most recent converted value for each signal. If multiple frames for a signal are input, only signal data from the most recent frame is returned. Here, most recent is defined by the order of the frames in the frame data array, not the timestamp.

If no frame is input for the corresponding signals, the XNET Signal Default Value is returned.

error out is the error cluster output (refer to Error Handling).

Log in to get a better experience