Using CAN and CAN FD in same NI-XNET Interface

Updated Jul 29, 2022

Environment

Driver

  • NI-XNET

How can I use CAN and CAN FD in the same NI-XNET interface?

When using non stream modes (queued or single point), frames I/O type are defined in the database. You can define the I/O Mode of frames as CAN or CAN FD when the I/O Mode of the cluster is CAN FD.

When using stream mode in LabVIEW, you can specify the I/O type of the frame in the Data cluster of XNET Write VI

In ​LabWindows™/​CVI, you can specify the Type by assigning correct value to the 12th element of the array of bytes of the Raw Frame Format that you use in nxWriteFrame.
Note that you must use CAN 2.0 Data (8) to transmit non-FD CAN frame in CAN FD I/O Mode. Non-ISO mode is not supported.

Additional Information

Please refer to attachment for modified shipping examples for LabVIEW and LabWindows™/​CVI.
The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: https://ni.com/samplecodelicense.