Table Of Contents

XNET Convert (Frame CAN to Signal) (G Dataflow)

Last Modified: February 22, 2017

Converts between NI-XNET CAN frame data and signals.


session in

The session to read. This session is returned from XNET Create Session. The session mode must be Conversion.


frame data

An input that provides the array of LabVIEW clusters. Each array element corresponds to a frame value to convert.

Each array element corresponds to a frame value to convert.

The data you write is converted to signal values in the order you provide them. Only the latest signal value is returned.

The elements of each cluster are specific to the CAN protocol.



The CAN frame arbitration identifier. If extended? is false, the identifier uses standard format, so 11 bits of this identifier are valid. If extended? is true, the identifier uses extended format, so 29 bits of this identifier are valid.



A Boolean value that determines whether the identifier uses extended format (true) or standard format (false).



An element not used for conversion. You must set this element to false.



The frame type (decimal value in parentheses).

CAN Data (0) The CAN data frame contains payload data. This is the most commonly used frame type for CAN.
CAN Remote (1) A CAN remote frame. Your application transmits a CAN remote frame to request data for the corresponding identifier. A remote ECU should respond with a CAN data frame for the identifier, which you can obtain using XNET Read. This value is not meaningful, as a remote frame does not contain any data to convert.


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



The array of data bytes for the CAN data frame. The array size indicates the payload length of the frame value to transmit. According to the CAN protocol, the payload length range is 0-8. For CAN FD, the range can be 0-8, 12, 16, 20, 24, 32, 48, or 64.

For more information, refer to the section for each mode.

For a transmitted remote frame (CAN Remote type), the payload length in the frame value specifies the number of payload bytes requested. Your application provides this payload length by filling payload with the requested number of bytes. This enables your application to specify the frame payload length, but the actual values in the payload bytes are ignored (not contained in the transmitted frame).


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.


signal data

An output that returns a one-dimensional array of signal values. Each signal value is scaled, 64-bit floating point. Each array element corresponds to a signal configured for the session. The order of signals in the array corresponds to the order in the session list.

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

Error information. The node produces this output according to standard error behavior.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Supported

Recently Viewed Topics