Choosing the Right CAN Interface for Your NI CompactDAQ or NI CompactRIO Application

Überblick

National Instruments offers two modular platforms featuring a small and compact form factor that are ideal for a variety of applications. Both of these platforms, NI CompactDAQ and NI CompactRIO, have modular CAN interfaces that you can integrate with a chassis and use with the more than 50 other NI C Series modules. Each module has distinct characteristics that make it ideal for some applications over others. This document covers the different NI C Series CAN modules as well as the applications they are ideal for and why.

Table of Contents

  1. NI C Series CAN Modules 
  2. Ideal NI-XNET C Series CAN Applications
  3. Ideal Applications for NI 985x C Series CAN Modules
  4. Conclusion

NI C Series CAN Modules 

National Instruments offers two different categories of C Series modules for CAN: NI-XNET and NI 985x. 

The NI-XNET C Series CAN Family

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:

  • Ability to interface with the hardware through a high-level, easy-to-use NI-XNET API that is common for CAN communication in many different form factors (PCI, PXI, NI CompactDAQ, NI CompactRIO)
  • Compatibility with USB, Ethernet, and Wi-Fi NI CompactDAQ chassis and controller systems

 

NI 9862.png

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.

The NI 985x C Series CAN Family

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

  • The ability to interface with the modules through a low-level, extremely flexible LabVIEW FPGA-based API
  • Compatibility in all National Instruments RIO platforms (CompactRIO, NI Single-Board RIO, and so on)
  • Communication and synchronization with other C Series modules through the same FPGA API

 

NI 9853 and 9852.png

Figure 2. You can use the NI 9852 and NI 9853 C Series CAN modules in the CompactRIO platform with flexible, FPGA-level control.

Back to top

Ideal NI-XNET C Series CAN Applications

Basic CAN Communication

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.

 

Multiple Sessions per Port.png

Figure 3. The NI-XNET API provides high-level function calls for the intuitive reading and writing of CAN frames and signals.

Standardizing CAN Communication for Different Settings and Environments

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 Applications

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.

 

CAN Communication.bmp

Figure 4. You can configure NI-XNET CAN interfaces in NI VeriStand for many typical CAN communication tasks and functions.

Back to top

Ideal Applications for NI 985x C Series CAN Modules

Basic CAN Communication

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.

985x FPGA API.png

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.

FPGA Triggering of CAN Communication

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.

CAN triggering from analog.png

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.

FPGA Byte-Level Manipulation of CAN Data

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. 

 

985x byte level info.png

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.

Back to top

Conclusion

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.

Back to top