1. CompactRIO Waveform Reference Library
The CompactRIO Waveform Reference Library incorporates optimizations and best practices for the reconfigurable I/O (RIO) platform that you can easily modify to jump-start any application. Developed as a familiar data acquisition architecture for the NI CompactRIO real-time controller, this library offers an easy way to modify a field-programmable gate array (FPGA) diagram with all the error checking and optimization techniques already implemented.

Figure 1. Example Code Demonstrating the CompactRIO Waveform Reference Library for Use in LabVIEW Real-Time for Communicating With the FPGA
This allows for data to be read into the real-time target from the FPGA in a familiar waveform format in addition to arrays of singles or U32 numbers. All scaling of the data to engineering units and formatting into the IEEE 754 single floating-point format is written into the FPGA code, which frees up real-time resources for more advanced signal processing algorithms or faster streaming rates to disk.
| Stream to Disk [TDMS] | |
| Data Type | cRIO-9074 BW (MB/s) |
| 1D Wfm SGL | 6 channels (1.23) |
| 2D Array SGL | 7 channels (1.43) |
| 1D Encoded U32 | 8 channels (1.64) |
| Stream to Disk [Binary] | |
| Data Type | cRIO-9074 BW (MB/s) |
| 1D Encoded U32 | 8 channels (1.64) |
| Stream to Disk [TCP/IP] | |
| Data Type | cRIO-9074 BW (MB/s) |
| 1D Wfm SGL | 12 channels (2.46) |
| 2D Array SGL | 13 channels (2.66) |
| 1D Encoded U32 | 18 channels (3.69) |
Table 1. Streaming Bandwidths of a cRIO-9074 Module Acquiring at a Sample Rate of 51.2 kS/s With the CompactRIO Waveform Reference Library
2. Sound and Vibration Measurement Suite - Optimized for Embedded
To take full advantage of the processing power of the CompactRIO real-time controller, the NI Sound and Vibration Measurement Suite 2010 offers a host of "optimized for embedded" vibration monitoring VIs. This optimization ensures the efficient execution and real-time enforcement of the VIs while maintaining the level of accuracy required for industrial embedded monitoring applications.
These optimized vibration monitoring VIs take the more efficient 2D scaled single output of the waveform reference read VI and perform common vibration monitoring calculations such as spectrum, order tracking, envelope detection, limit testing, and even TDMS write functions complete with scaling information, sample rate, and time zero of the waveform segment. The use of the scaled array data type significantly reduces memory copies, allowing for an increase in efficiency as well as the removal of some unnecessary error checking. You can achieve further optimization by changing the data types from single to double as shown in Figure 2. In addition, you can move some of the signal processing to the FPGA.

Figure 2. LabVIEW Code Demonstrating the Use of Converting From the Scaled Single Data Type to Scaled Double for Improved Efficiency
Improvements in Execution Speed
By switching from the original data type to the new 2D array data type in Sound and Vibration Measurement Suite 2010, you can free up real-time CPU resources to analyze incoming data faster. With this faster analysis, the real-time controller can dedicate additional resources to analyzing even more channels. As noted in Table 2, all of the sound and vibration measurement tasks operate faster with the new 2D array data type, allowing for analysis of more channels at once. Note that even the most challenging computation, the Envelope Spectrum, has improved execution time by 50 percent, allowing for 50 percent more channels to be processed.
| Controller | NI 9074/9014 (400 MHz) |
NI 9022/9023 (533 MHz) |
NI 9024/9025 (800 MHz) |
|
| Data Type | Power Spectrum + Power in Band (sample rate of 25.6 kS/s) | |||
| 2D array | 18 channels | 21 channels | 30 channels | |
| Original | 10 channels | 13 channels | 19 channels | |
| Envelope Spectrum (sample rate of 25.6 kS/s, bandwidth of 2k) | ||||
| 2D array | 8 channels | 11 channels | 14 channels | |
| Original | 5 channels | 7 channels | 10 channels | |
| Resampling + 3 Orders Tracking (sample rate of 25.6 kS/s, max order of 10) | ||||
| 2D array | 18 channels | 25 channels | 32 channels | |
| Original | 4 channels | 8 channels | 11 channels | |
Table 2. Increased Analysis Capabilities of Using the 2D Array Data Type Featured in the Sound and Vibration Measurement Suite 2010
3. Data Recording
It is regularly not enough to simply acquire and analyze data. Often the raw data – in addition to any calculated results that have already been processed – needs to be stored for later use. To provide a starting point for data recording applications, a reference architecture has been built around the CompactRIO Waveform Reference Library called the CompactRIO Vibration Data Logger Reference Library.
To learn more about the reference architecture, see the related NI Developer Zone tutorial.
To explore how to further extend this data-logging reference architecture, read Condition Monitoring Example for Wind Turbines.

Figure 3. Example From the CompactRIO Vibration Data Logger Reference Design
4. CompactRIO for Signal Processing and Data Recording
With the use of reference libraries developed by NI systems engineers, you can easily get your applications off to a quick start. These libraries not only handle a lot of the more complex FPGA coding but also introduce optimizations in the code that free up real-time CPU resources. These newly available resources help you increase application complexity, whether that be more advanced signal processing or data recording for later analysis.
5. Related Links
Developer Zone Tutorial: Condition Monitoring Example for Wind Turbines
Developer Zone Tutorial: CompactRIO Waveform Reference Library
Developer Zone Tutorial: CompactRIO Vibration Data Logger Reference Design
Products and Services: CompactRIO
Products and Services: NI Distributed Machine Condition Monitoring System
