CAN
- Updated2023-02-17
- 4 minute(s) read
CAN
Converts between NI-XNET signals and CAN frame data.
.gvi.png?_LANG=enus)
Inputs/Outputs

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

signal data
An input that returns a one-dimensional array of signal values. Each signal value is scaled, 64-bit floating point.
The data provides the value for the next conversion of each signal.

error in
Error conditions that occur before this node runs.
The node responds to this input according to standard error behavior.
Default value: No error

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

unused payloads
This parameter is empty. No user input is needed.

frame data
An output that returns the array of LabVIEW clusters.
The elements of each cluster are specific to the CAN protocol.

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

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

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.

type
The frame type.
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. |

timestamp
An element that represents the absolute time when the XNET interface received the frame (end of frame), accurate to microseconds.

payload
The array of data bytes for the CAN data frame.
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.

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