Developing Data Acquisition Systems on the Mac with Virtualization Technology
Overview
“Virtualization” is a far-reaching term that covers a wide variety of server, network, and PC implementations. This document describes how virtualization can provide Mac users greater access to National Instruments software, drivers, and hardware. It also describes testing results using two popular virtualization products: VMware Fusion and Parallels Desktop for Mac.
Table of Contents
What Is Virtualization?
Virtualization refers to a software application that creates a “virtual machine” in addition to a computer’s native operating system. This virtual machine exists as an abstract software layer, allowing both operating systems independent use of hardware resources (CPU, memory, buses, drives, and more). You can switch between both operating systems and choose how you want to view both on the screen.
There are several ways to implement a virtual machine on a host computer. The most common method used by commercial virtualization products is to create a hypervisor layer that sits in between the computer hardware and the operating systems (see figures 1 and 2). Both operating systems can act independently of each other and access different hardware resources. There is the possibility that the two operating systems access the same resource simultaneously, but the hypervisor does its best to multitask both requests. In this situation, both processes may see performance decreases as the single hardware resource tries to complete both tasks.
The hypervisor layer affects the interaction between the operating system and the computer hardware, so NI LabVIEW modules, such as LabVIEW FPGA and LabVIEW Real-Time, and NI hardware drivers, such as NI-DAQmx, NI-DAQmx Base, NI-FieldPoint, and NI-RIO, do not notice the difference between native and virtualized Windows.
Figure 1. Standard Relationship between Hardware, Operating System, and Applications
Figure 2. Relationship with a Hypervisor Managing the OS/Hardware Relationship
With virtualization you now have access to NI hardware and software previously unavailable on the Mac. NI products As always, NI offers native Mac software, products, and drivers for USB data acquisition, M Series PCI data acquisition, instrument control, and PXI. Please visit ni.com/mac to learn more about NI products and support for the Mac.
Drawbacks of Virtualization
A virtualized operating system does pose some bandwidth and buffer limitations for data acquisition systems, especially if the system is working at the high end of its specifications or if the system has to share processing time with other user tasks. It also requires a single engineer to have licenses for both operating systems. Additionally, note that PCI products do not currently function on virtualized Windows on a Mac. The CPU determines the virtual machine’s access to hardware, and the current Intel chipset found in Macs does not include PCI compatibility.
Testing Results
Based on requests from the National Instruments Mac user base, NI R&D engineers performed benchmark tests using LabVIEW 8.5 and a variety of NI hardware and drivers on two different machines:
- A 2.0 GHz MacBook with 2 GB RAM running Mac OS X Version 10.5
- A 3.0 GHz quad-core Mac Pro with 8 GB RAM running Mac OS X Version 10.4
On both test computers, Windows XP SP2 served as the virtual machine’s operating system, and NI engineers chose VMware Fusion 1.1 and Parallels Desktop 3.0, two popular consumer virtualization applications, for the tests.
In general, all hardware and software tested (see Table 1) functioned to their listed specifications. Neither VMware Fusion nor Parallels Desktop crashed in any test, and buffer overflows occurred only when other user applications ran concurrently with data acquisition tasks.
Table 1. NI Software and Hardware Products that Function on Virtual Machines
Ethernet Hardware
Tests using a variety of NI CompactRIO and Compact FieldPoint controllers and devices showed full functionality on virtualized Windows XP. This makes sense, because the packet-based Ethernet protocol allows for processor interruptions. Additionally, LabVIEW for Windows, LabVIEW Real-Time, and LabVIEW FPGA behave identically in their native and virtual instances.
Hardware tested:
Controllers: NI cRIO-9012, NI cRIO-9103, NI cFP-2120, NI PXI-8186, NI PXI-8196
Modules: NI 9205, NI 9263, NI 9233, NI 9505
USB Hardware
NI USB DAQ, including M Series USB and NI CompactDAQ, worked to specification and only failed occasionally when other processes were executed during testing. This can be explained by the potential bottleneck created between the hypervisor’s additional software layer and the high-speed data transfer from the USB. One solution is to avoid other tasks while acquiring data. NI engineers used NI-DAQmx 8.6 successfully in the tests.
Hardware tested:
USB: NI USB-6008, NI USB-6009, NI USB-6251, NI USB-6259, NI USB-6211
Compact DAQ: NI cDAQ-9172 (chassis), NI 9215, NI 9219, NI 9263
Other Software
In addition to testing the hardware products mentioned in the preceding sections, NI R&D engineers found full functionality for LabVIEW MathScript and LabVIEW SignalExpress in virtualized Windows on the Mac.
Learn more information on NI products and support for the Mac at ni.com/mac.
Reader Comments | Submit a comment »
This is good news, but how do we replicate it?
I want to do the exact same thing. I have a
USB-6009, and a Macbook running OS X 10.5
with Parallels 3.0. I haven't been able to
get the device to appear in the Measurement
and Automation Explorer NI-DAQmx Ddevices
screen. Would it be possible to post a
step-by-step list of instructions for how the
engineers got this setup to work?
- cp98@cornell.edu - Apr 8, 2009
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
