Table Of Contents

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

Last Modified: November 2, 2017

Converts between NI-XNET CAN frame data and signals.

connector_pane_image
datatype_icon

session in

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

datatype_icon

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.

datatype_icon

identifier

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.

datatype_icon

extended?

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

datatype_icon

echo?

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

datatype_icon

type

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.
datatype_icon

timestamp

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).

datatype_icon

payload

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).

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

session out

An output that is the same as session in, provided for use with subsequent nodes.

datatype_icon

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.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics