Professional Documents
Culture Documents
Overview
National Instruments Real-Time hardware and software is used in a wide variety of application domains. As part of our
commitment to providing the best up-to-date information regarding the performance characteristics of our products, NI regularly
produces benchmarks that can assist existing and potential customers design the best hardware and software configurations for
their particular needs.
Table of Contents
1. CompactRIO
2. PXI
3. Single-Point Tests
4. Test Results
5. Comparative Graphs
6. Appendix A
7. Appendix B
8. Appendix C
This document provides results from a set of single-point benchmarks that NI R&D ran on two NI real-time controllers. The focus
of these benchmarks is to provide an indication of the performance of NI hardware and software in the area of single-point
performance. In isolation, these benchmarks cannot provide a guide to entire system performance, but they can assist in selecting
the appropriate platform for a particular application by comparing the different hardware/software combinations on a set of simple,
standard tests.
In this paper, we begin with a description of the two different hardware platforms tested, CompactRIO (cRIO) and PXI, follow with
a description of the single-point tests, and end with detailed benchmark numbers for each of the tests.
1. CompactRIO
The NI CompactRIO programmable automation controller (PAC) is a low-cost reconfigurable control and acquisition system
designed for applications that require high performance and reliability. The system combines an open embedded architecture with
small size, extreme ruggedness, and hot-swappable industrial I/O modules. CompactRIO is powered by reconfigurable I/O (RIO )
FPGA technology.
2. PXI
PCI eXtensions for Instrumentation (PXI) is the open, multivendor standard for measurement and automation with access to a
wide variety of I/O and communication modules, including data acquisition, modular instrumentation, reconfigurable I/O (RIO),
image acquisition, motion control, Ethernet, serial, CAN, DeviceNet, reflective memory, and more. With PXI, you automatically
benefit from the low cost, ease of use, modularity, and flexibility of PC technology. The PXI system is programmed using LabVIEW
1/8 www.ni.com
benefit from the low cost, ease of use, modularity, and flexibility of PC technology. The PXI system is programmed using LabVIEW
and the LabVIEW Real-Time Module, and in these tests we used NI DAQmx software and a data acquisition board for access to
single-point I/O.
3. Single-Point Tests
NI R&D designed a set of single-point tests to gauge the performance of the systems across a variety of program architectures.
The table below lists the tests along with a brief description. Each test used 1, 4, and 16 channels.
Table 1: Single-Point Tests
Testing For “Lateness”
We created tests to determine the fastest loop the systems could attain without losing data or being “late.” These loop rates are
reported later in this paper. A loop iteration is considered late if the software is unable to receive a sample from the I/O hardware,
process that sample, and output the result before the next input sample is ready.
The NI-DAQmx and NI-RIO drivers are capable of hardware-timed single-point operations, and they provide feedback to help
ensure that the software keeps up with the hardware clock. In the next three sections, we briefly review how lateness checking can
be accomplished with each of these drivers.
Polling can be used for I/O mode in the case where the system has no non-time-critical responsibilities, or, more realistically, the
system uses a state machine to schedule time-critical and non-time-critical tasks to operate sequentially. For most I/O drivers,
polling mode is faster than interrupt mode.
Although slower than polling mode, interrupt mode is the more common for real-time applications as most applications contain a
mix of time-critical and non-time-critical functions occurring simultaneously. Interrupts allow the I/O portion of a diagram to
suspend its operation and allow other code, such as communication and logging, to run while the hardware is in the process of
acquiring data. Once the hardware has finished its acquisition, it raises an interrupt to notify the software that it should resume with
it’s time-critical I/O processing.
As noted in the table, we ran the single-point tests using the appropriate I/O mode to highlight the differences between these two
2/8 www.ni.com
As noted in the table, we ran the single-point tests using the appropriate I/O mode to highlight the differences between these two
modes of operation.
Polling with Microsecond Wait
A variation on the polling mode architecture that we did not utilize is to use of the microsecond wait function in time-critical loop in
conjunction with the polling I/O mode. This methodology allows the programmer to reserve a pre-determined block of time for
concurrent non-time-critical code. The polling numbers presented in this paper establish the maximum rate for such a mode,
assuming a zero microsecond wait, and increasing the duration of the microsecond wait will reduce the loop rates in a linear
fashion.
Real-Time FIFOs
An additional consideration when building systems that require concurrent time-critical and non-time-critical function is how to
transfer data from the time-critical loop to the non-time-critical loop so that it can be logged or communicated back to the host.
Real-Time FIFOs, available as part of the LabVIEW Real-Time Module, provide this needed functionality. Figure 8: Use of
Real-Time FIFOs shows how tests T3 & T4 use the Real-Time FIFOs to provide jitter-free communication between the time-critical
code and communication/logging functions.
4. Test Results
3/8 www.ni.com
4. Test Results
Final tests results, along with the specific hardware and software versions, are provided in the following sections.
CompactRIO
Hardware
NI cRIO-9024: Real-Time Controller
800 MHz PowerPC processor
512 MB RAM
NI cRIO-9205: 32-Ch ±200 mV to ±10 V, 16-Bit, 250 kS/s Analog Input Module(s)
NI cRIO-9264: 16-Channel Analog Output Module
Software installed on controller
LabVIEW Real-Time 2011
NI-RIO 4.0.0
Results
4/8 www.ni.com
Figure 9. PXIe-8108 No SMP Benchmark Results
5/8 www.ni.com
Figure 13. T3 Test Results Comparison
6. Appendix A
Lateness checking in NI-DAQmx 7.4 & Higher
The DAQmx 9.3.5 driver provides feedback to guarantee that no input samples have been lost and that all output channels are
updated with their corresponding values before the Sample Clock signal. To achieve this, DAQmx 9.3.5 uses the “Wait For Next
Sample Clock” VI to force synchronization of the software I/O loop with the Sample Clock signal of one of its I/O tasks.
For more detailed information on DAQmx lateness detection please refer to the DAQmx Online Help or the following document on
the NI Developer Zone: DAQmx Hardware-Timed Single-point Lateness Checking (http://zone.ni.com/devzone/cda/tut/p/id/3215)
Lateness checking in NI-RIO
Lateness checking on RIO devices is implemented in the FPGA by using a handshaking mechanism to determine if the real-time
software VI is able to receive the input samples, process the data, and provide corresponding output values before the next
sample clock signal occurs. The handshaking mechanism can use interrupts, or it can poll a user-defined register to signal that a
new I/O cycle has begun.
The diagrams for the interrupt mechanism are depicted below in Figure 15 and Figure 16. The FPGA VI generates an interrupt
when new input data is available and then waits for the time-critical VI to acknowledge the interrupt.
6/8 www.ni.com
Figure 16: NI-RIO diagram (Real-Time)
The following diagram illustrates the interrupt-based handshaking employed on the NI-RIO benchmarking tests:
MISSION
NI equips engineers and scientists with systems that accelerate productivity, innovation, and discovery.
7/8 www.ni.com
(http://twitter.com/niglobal) (http://www.facebook.com/NationalInstruments)
Contact Us (http://www.ni.com/contact-us/)
(//privacy.truste.com/privacy-seal/National-Instruments-Corporation/validation?rid=bc6daa8f-7051-4eea-b7b5-fb24dcd96d95)
8/8 www.ni.com