You copied the Doc URL to your clipboard.

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.

Note

National Instruments only distribute 32-bit versions of their libraries. Therefore only the 32-bit version of caiman works 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 caiman.

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:

  1. Extract the source.
  2. Open CMakeLists.txt.
  3. Modify the settings at the beginning of the file as required. If necessary, modify include_directories and target_link_libraries to add other dependencies, such as NI-DAQ.
  4. Use CMake to generate either a Makefile or a Visual Studio project.
  5. Build the project as normal.

Note

caiman uses 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:

  • SUPPORT_UDEV 0.
  • SUPPORT_DAQ 1.
  • NI_RUNTIME_LINK 0.

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:

Procedure

  1. Connect the Ai1 connections on the NI DAQ device to go across the shunt resistor on your target.
  2. Connect Ai0 negative to ground.
  3. Connect Ai GND to ground.
  4. 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

    Connections for NI USB-621x

  5. Repeat steps 1-3 using the other connectors on the NI DAQ device to measure additional channels.
  6. In the Streamline Data view, click Capture & Analysis Options.
  7. Select the NI DAQ option from the Energy Capture drop-down menu.
  8. 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.
  9. Click the Select the energy capture tool button in the Tool Path field.
  10. 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.
  11. Click Open.

    Note

    The 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.