National Instruments offers two different categories of C Series modules for CAN: NI-XNET and NI 985x.
NI provides two 1-port, high-speed/FD and low-speed/fault-tolerant C Series CAN modules as part of the NI-XNET family: the NI-9862 and NI-9861. Like other NI-XNET devices, the modules offer key features that make them different from other NI C Series CAN modules:
Figure 1. You can use the NI 986x NI-XNET high-speed/FD and low-speed/fault-tolerant C Series CAN modules in both the NI CompactDAQ and NI CompactRIO modular platforms.
National Instruments also offers the NI-9852 and NI-9853, which are 2-port low-speed and high-speed C Series CAN modules, respectively. These modules' user programming experience and platform compatibility differ from that of the NI-986x modules. They provide
Figure 2. You can use the NI 9852 and NI 9853 C Series CAN modules in the CompactRIO platform with flexible, FPGA-level control.
With the NI 986x modules, you can implement basic CAN communication consisting of reading and writing frames and signals on the network. As NI-XNET modules, they use a high-level API that simplifies development and reduces development time by providing intuitive NI-XNET function calls. You can use this same API in USB, Ethernet, and Wi-Fi NI CompactDAQ systems as well as CompactRIO systems using the cRIO-911x or cRIO-908x chassis.
Figure 3. The NI-XNET API provides high-level function calls for the intuitive reading and writing of CAN frames and signals.
Because the NI 986x modules are NI-XNET modules, they are ideal for developing CAN applications and projects that need to be standardized for many different environments and settings. You can use the NI 986x modules for mobile USB-, Ethernet-, and Wi-Fi-based NI CompactDAQ systems as well as headless, embedded CompactRIO systems by applying the same NI-XNET API to both platforms. In addition, because the same API is used for PXI and PCI CAN interfaces, you can easily port the same code to any of the hardware platforms by copying and pasting. This can significantly reduce development time because you use a common API for everything from a lab test system using PXI to a mobile USB CAN communication system using NI CompactDAQ to a headless, CAN-based logger using CompactRIO.
Real-time testing involves the use of a real-time environment to implement a test application. Engineers use real-time testing techniques primarily to achieve greater reliability and/or determinism in a test system. These techniques also play a critical role in the development of many of today’s products and systems. Examples include durability, life-cycle, and other test systems that operate for long durations or with extended operator absence, requiring the superior reliability provided by real-time execution platforms. Superior reliability also is required by environmental test cells, dynamometers, hardware-in-the-loop (HIL) simulators, and similar test systems that use closed-loop control execution, which must feature the low-jitter determinism of real-time execution platforms.
NI offers a software product to help you implement real-time testing applications more efficiently. NI VeriStand is a configuration-based software environment that provides a ready-to-use yet customizable tool for creating real-time test systems. Many real-time testing applications involve CAN communication, and NI VeriStand features native support for all NI-XNET products, which means native support for the NI 986x modules. NI VeriStand exposes common functionality for CAN applications in addition to offering the flexibility you need to expand the software to meet your applications goals.
Figure 4. You can configure NI-XNET CAN interfaces in NI VeriStand for many typical CAN communication tasks and functions.
Just like the NI 986x interfaces, NI 985x C Series CAN modules can be used for basic CAN communication. The main difference is the user experience with the different modules. Instead of using the NI-XNET API to program modules like the NI 986x interfaces, you use a LabVIEW FPGA API that gives NI 985x modules a lower-level software API for programming the hardware. With this API, you have complete control over the timing of reading and writing CAN frames while applying the same LabVIEW FPGA API used with other C Series modules for CompactRIO.
Figure 5. The NI 985x CAN interfaces are programmed with the LabVIEW FPGA API that gives you lower-level control of the hardware, including frame transmit and receive times.
Because you program the NI 985x C Series CAN interfaces with the LabVIEW FPGA Module, you can program them with the same FPGA API as other C Series modules for general I/O and take advantage of the speed and flexibility of the FPGA backplane in the CompactRIO platform. By combining general data acquisition and CAN communication in the same FPGA application, you can achieve fast triggering and turnaround times with CAN hardware. For example, instead of passing data from a general analog input module’s FPGA application to the real-time host for making CAN function calls, you can call NI 985x CAN interfaces directly from the FPGA application.
Figure 6. You can achieve fast and flexible CAN triggering by using NI 985x CAN modules with other I/O modules in an FPGA application.
In addition, you can use the LabVIEW FPGA programming API for NI 985x CAN modules to perform fast byte-level manipulation of the CAN data that is sent and received by the hardware. The information in a CAN frame can be read and modified in the LabVIEW FPGA application without having to send any data to the real-time controller of the system, making these modules efficient and fast for this type of data manipulation.
Figure 7. You can quickly manipulate all of the data inside a CAN frame on a byte-by-byte level using the NI 985x CAN interfaces and LabVIEW FPGA.
Depending on your application needs, you can choose from a variety of NI modular platforms and CAN interfaces with key features and advantages that are ideal for certain environments and CAN-related projects. Understanding the strengths of each CAN interface as well as the NI C Series platform can help you select the right CAN module for your application and successfully meet your project goals.