Setting up National Instrument Multifunction Data Acquisition devices (NI DAQ) to capture energy data
As an alternative to the Energy Probe, you can use a NI DAQ device to gather energy data from your target and view the results in Arm Streamline.
To collect power statistics using a NI DAQ device, you must have the following:
- NI DAQ hardware.
- NI-DAQmx software installed on your host machine, so caiman can communicate with the NI DAQ device. This software package includes drivers for the NI DAQ device. You must use the NI-DAQmx Base software on Linux.
In addition, you must set the location of the appropriate caiman application using the Tool Path field in the Capture & Analysis Options dialog box.
NoteNational Instruments only distribute 32-bit versions of their libraries. Therefore only the 32-bit version of
caimanworks with the NI-DAQ device, even on 64-bit platforms. For example, a Windows 64-bit installation of Arm Development Studio contains a 32-bit version of
If the pre-built caiman executable that is distributed with Arm Streamline is insufficient, or you want to change some options, you can re-build caiman from source as follows:
- Extract the source.
- Open CMakeLists.txt.
- Modify the settings at the beginning of the file as required. If necessary, modify
target_link_librariesto add other dependencies, such as NI-DAQ.
- Use CMake to generate either a Makefile or a Visual Studio project.
- Build the project as normal.
caimanuses CMake so that one configuration can generate both Visual Studio and Makefile projects. See http://www.cmake.org for more information about CMake.
For example, to build a NI DAQ enabled version of caiman for Red Hat Enterprise Linux 6, set the following values in CMakeLists.txt:
Also, verify the NI DAQ install paths within CMakeLists.txt.
See the National Instruments website, http://www.ni.com for the list of operating systems that NI DAQ supports.
To set up your NI DAQ device, follow these steps:
- Connect the Ai1 connections on the NI DAQ device to go across the shunt resistor on your target.
- Connect Ai0 negative to ground.
- Connect Ai GND to ground.
Loop Ai0 positive to Ai1 negative.
The Ai0 connectors are measured across the load, which is used to derive the voltage.
Figure 11-6 Connections for NI USB-621x
- Repeat steps 1-3 using the other connectors on the NI DAQ device to measure additional channels.
- In the Streamline Data view, click Capture & Analysis Options.
- Select the NI DAQ option from the Energy Capture drop-down menu.
Enter a valid system name in the Device field.
To get the system name of your National Instruments device, you must run the NI-DAQmx Base List Devices application, which is installed as part of the NI-DAQmx software package.
- Click the Select the energy capture tool button in the Tool Path field.
- Locate either the pre-built caiman in your Arm Development Studio installation directory, or the modified version that you built from source, and select it.
NoteThe NI DAQ device takes a while to initialize with the NI-DAQmx Base drivers, therefore the first 3-8 seconds of power data is not captured.