AUGUST 2011: The PC industry continues to grow in India. By the end of this year, it is forecast that laptop sales will exceed desktop sales. While the portability of computers has always been a key factor, the cost of laptops compared to an equivalent desktop computer has traditionally been the biggest deterrent. With a growing Indian economy and the overall decline of PC prices, the choice between laptops, desktops and other computing platforms has become less clear.
When it comes to PC-based measurement and automation, you might find yourself wondering, what to choose? When you have hundreds of different data acquisition devices to choose from on a wide variety of buses, it can be difficult to select the right bus for your application needs.
Here are 5 basic questions to ask yourself when choosing a measurement bus:
1. How much data will I be streaming across this bus?
2. What are my single-point input/output (I/O) requirements?
3. Do I need to synchronise multiple devices?
4. How portable should this system be?
5. How far will the measurements be from my computer?
How much data will I be streaming across this bus?
All PC buses have a limit to the amount of data that can be transferred in a certain period of time. Known as the bus bandwidth, this is often specified in megabytes per second (MB/s). If continuous waveform measurements are important in your application, be sure to consider a bus with enough bandwidth.
Depending on the bus that you choose, the total bandwidth can be shared among several devices or dedicated to certain devices. The PCI bus, for example, has a theoretical bandwidth of 132 MB/s that is shared among all PCI boards in the computer. Gigabit Ethernet offers 125 MB/s shared across devices on a subnet or network. Buses that offer dedicated bandwidth—such as PCI Express and PXI Express—provide the maximum data throughput per device.
When taking waveform measurements, you have a certain sampling rate and resolution that need to be achieved based on how fast your signal is changing. You can calculate the minimum required bandwidth by taking the number of bytes per sample (rounded up to the next byte), multiplied by the sampling speed, and then multiplied by the number of channels.
For example, a 16-bit device (2 bytes) sampling at 4 MS/s on four channels would be
Your bus bandwidth needs to be able to support the speed at which data is being acquired. It is important to note that the actual system bandwidth will be lower than the theoretical bus limits. The actual observed bandwidth depends on the number of devices in a system and additional bus traffic caused from any overhead. If a lot of data needs to be streamed on a large number of channels, bandwidth may be the most important consideration while choosing the data acquisition bus.
What are my single-point I/O requirements?
Applications that require single-point reads and writes are often dependent on I/O values to be updated immediately and consistently. Based on how the bus architectures are implemented in both hardware and software, single-point I/O requirements could be the determining factor for the bus that you choose.
Bus latency is the responsiveness of I/O. It is the time delay between calling a driver software function and updating the actual hardware value of the I/O. Depending on the bus you choose, this delay could range from less than a microsecond to a few milliseconds. In a proportional integral derivative (PID) control system, for example, this bus latency can directly impact the maximum speed of the control loop.
Fig. 1 shows a common block diagram for a feedback control system where the compensator (or controller) sends an output signal to the system or plant, and reads back a single-point sensor value to calculate the error in the process. If there are many delays along the communication bus, the time between output updates and sensor measurements also increases, resulting in a higher amount of error in the control system.
• PXI • PXI Express • Ethernet • Wireless
Another important factor in single-point I/O applications is determinism, which is a measure of how consistently I/O can execute on time. Buses that always have the same latency while communicating with I/O are more deterministic than buses that can vary their responsiveness. Determinism is important for control applications because it directly impacts the reliability of the control loop, and many control algorithms are designed with the expectation that the control loop always executes at a constant rate. Any deviation from the expected rate makes the overall control system less effective and less reliable. Therefore buses that are high in latency with poor determinism—such as serial, Ethernet, or USB—should be avoided when implementing closed-loop control applications.
The software side of how a communication bus is implemented plays a big part in bus latency and determinism. Buses and software drivers that have support for real-time operating systems provide the best determinism and therefore give you the highest performance. In general, internal buses such as PCI Express and PXI Express are better for low-latency single-point I/O applications than external buses.
Do I need to synchronise multiple devices?
Many measurement systems have complex synchronisation needs, whether it is synchronising hundreds of input channels or multiple types of instruments. A stimulus-response system, for example, might require the output channels to share the same sample clocks and start triggers as the input channels to correlate the I/O, and better analyse the results. Data acquisition devices on different buses provide different ways of accomplishing this. Almost all NI data acquisition (DAQ) devices provide access to programmable function input (PFI) lines that can be used to route clocks and triggers between different devices, and software support in NI-DAQmx to easily configure these lines. Certain buses, however, have additional timing and triggering lines built-in to make multi-device synchronisation as easy as possible. PCI and PCI Express boards offer the real-time system integration (RTSI) bus, on which multiple boards in a desktop system can be cabled directly together inside the case. This removes the need for additional wiring through the front connector and simplifies I/O connectivity.
How portable should this system be?
The dramatic adoption of portable computing is undeniable and has offered engineers and scientists new ways to innovate with PC-based data acquisition. Portability is an important factor for many applications. It could easily be the primary reason to choose one bus over another. In-vehicle data acquisition applications, for example, benefit from hardware that is compact and easy to transport. External buses like USB and Ethernet are particularly good for portable data acquisition systems because of quick hardware installation and compatibility with laptop computers.
Bus-powered USB devices offer additional convenience because they do not require a separate power supply and are directly powered through the laptop’s USB port. Using wireless data transfer buses is another good option for portability because the measurement hardware itself becomes portable while the computer can remain stationary.
At the Indian Institute of Technology (IIT) Madras, Professor Krishnan Balasubramaniam developed a pipe inspection system for the oil and gas industry that detects corrosion using ultrasonic waves. He needed a system that was portable, to travel along the length of pipelines and perform analysis on the pipe-integrity. Using a laptop with LabVIEW software and USB-based measurements, he was able to develop a system that could detect pinhole defects, and could potentially avoid unexpected down time.
How far will the measurements be from my computer?
The distance between where the measurements are to be carried out and the computer’s location can drastically vary from application to application. To achieve the best signal integrity and measurement accuracy, you should place your data acquisition hardware as close to the signal source as possible.
This can be a challenge for large distributed measurements like those used for structural health monitoring or environmental monitoring. Running long cables across a bridge or factory-floor is costly and can result in noisy signals. One solution to this problem is to use a portable computing platform to move the entire system closer to the signal source. With wireless technology, the physical connection between the computer and the measurement hardware is removed altogether. You can take distributed measurements and send the data back to a central location.
Choose the bus that works best for you
By asking a few basic questions up front, you can easily decide on the bus or form factor that ideally suits your application. Considering factors like bus bandwidth, single-point requirements, synchronisation, portability and distributed needs can help to narrow down the list of hundreds of devices from different vendors.
The author is senior product manager at National Instruments. He holds a Bachelors of Science in electrical engineering from The Ohio State University