Table Of Contents

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

Last Modified: November 2, 2017

Converts between NI-XNET signals and CAN frame data.

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

signal data

An input 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 provides the value for the next conversion of each signal.

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

unused payloads

This parameter is empty. No user input is needed.

datatype_icon

frame data

An output that returns the array of LabVIEW clusters. Each array element corresponds to a frame the session converted.

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?

A Boolean value that determines whether the frame was an echo of a successful transmit (true), or received from the network (false). For conversion, it is always set to false.

datatype_icon

type

The frame type. The decimal value is in parentheses.

CAN Data (0) The CAN data frame contains payload data. This is the most commonly used frame type for CAN. When the session is in ISO CAN FD mode, the CAN type is more specific according to the CAN I/O mode of the frame in the database (one of the types listed below).
CAN 2.0 Data (8) The frame contains payload data and has been transmitted in an ISO CAN FD session using the CAN 2.0 standard.
CAN FD Data (16) The frame contains payload data and has been transmitted in an ISO CAN FD session using the CAN FD standard.
CAN FD+BRS Data (24) The frame contains payload data and has been transmitted in an ISO CAN FD session using the CAN FD+BRS standard.
datatype_icon

timestamp

An element that represents the absolute time when the XNET interface received the frame (end of frame), accurate to microseconds. The timestamp returned by the conversion is always invalid (0).

datatype_icon

payload

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

For a received remote frame (type of CAN Remote), the payload length in the frame value specifies the number of payload bytes requested. This payload length is provided to your application by filling payload with the requested number of bytes. Your application can use the payload array size, but you must ignore the actual values in the payload bytes.

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