Enable IEPE Excitation Programmatically Using LabVIEW

Updated Feb 26, 2018

Reported In

Hardware

  • USB-4431
  • USB-4432
  • PCI-4461
  • PXI-4461
  • PXI-4462
  • PCI-4462
  • PXIe-4464
  • PXIe-4480
  • PCI-4472
  • PXI-4472
  • PCI-4472B
  • PXI-4472B
  • PCI-4474
  • PXIe-4492
  • PXI-4496
  • PXIe-4496
  • PXIe-4497
  • PXI-4498
  • PXIe-4498
  • PXIe-4499
  • NI-9232
  • NI-9218
  • NI-9233
  • USB-9233
  • NI-9234
  • USB-9234

Software

  • LabVIEW Full
  • LabVIEW Base

Driver

  • NI-DAQmx

Other

  • ANSI C
  • NI Measurement and Automation Explorer (MAX)

Issue Details

How do I programmatically turn on IEPE excitation? For the follow situations:
  • I need to use hardware the needs IEPE excitation enabled
  • Error: AI Channel on this device not support DC coupling while using IEPE excitation
  • I have a pressure sensor that is IEPE based

 

Solution

IEPE excitation is typically used in piezoelectric sensors such as microphones or accelerometers; you can use the sound pressure or acceleration tasks to easily enable this excitation on your Dynamic Signal Acquisition (DSA) module. If you are reading with a voltage task instead of a scaled task then you can manually set the properties of the DAQmx Channel. 

Follow the steps below to enable excitation in LabVIEW, ANSI C, or NI MAX using both of these methods.

Enabling Excitation in LabVIEW
IEPE Excitation is enabled by either of the two following methods
  1. Using DAQmx Create Channel.vi 

Acceleration and Sound Pressure tasks have an input directly on the DAQmx Create Channel.vi that allows you to set excitation. 

  1. Using DAQmx Channel Property Node
There are five properties that you need to select to ensure proper operation of your DSA device when supplying IEPE excitation.
  • Active Chans - The channels you would like to enable IEPE excitation on. If left blank, this applies to all channels in the DAQmx task.
  • AI.Coupling - Select either AC or DC coupling. For all C series modules, this value must be AC.
  • AI.Excit.VoltageOrCurrent - IEPE excitation is a current excitation
  • AI.Excit.Src - Select Internal because the DSA module will be supplying the excitation directly
  • AI.Excit.Val - Select a value of excitation that your sensor requires. See IEPE Excitation Levels for NI DSA Devices for more information.
Enabling Excitation in ANSI C
IEPE excitation is enabled by either of the following methods:
  1. Create Channel
For tasks with sensors that commonly use IEPE excitation such as a sound pressure or acceleration task, you can use the following two functions to create a task with IEPE excitation enabled:
DAQmxCreateAIAccelChan(taskHandle, "Dev1/ai0", "", DAQmx_Val_PseudoDiff,
    -100.0, 100.0, DAQmx_Val_AccelUnit_g, 50, DAQmx_Val_mVoltsPerG,
    DAQmx_Val_Internal, 0.004, NULL);
DAQmxCreateAIMicrophoneChan(taskHandle, "PXI1Slot2/ai0", "",
    DAQmx_Val_PseudoDiff, DAQmx_Val_Pascals, 50, 120.0,
    DAQmx_Val_Internal, 0.004, NULL);
  1. Setting Attributes Manually
Similar to setting these properties in LabVIEW, you can set each attribute in ANSI C as well using the following functions: 
DAQmxSetAICoupling(taskHandle, "Dev1/ai0", DAQmx_Val_AC)
DAQmxSetAIExcitVoltageOrCurrent(taskHandle, "Dev1/ai0",
    DAQmx_Val_Current);
DAQmxSetAIExcitSrc(taskHandle, "Dev1/ai0", DAQmx_Val_Internal)
DAQmxSetAIExcitVal(taskHandle, "Dev1/ai0", 0.021);
Create Task in NI MAX

Browse to your IEPE capable device under Devices and Interfaces, right-click on it to bring up the drop-down menu shown below, and select the Create Task Option.
 
Once the Create New NI-DAQmx Task box pops up, browse to Acquire Signals >> Analog Input >> Acceleration and then choose the Physical Channels you want to monitor. You can name the task anything you want. After this is done, a configuration window should open in MAX. You can configure all the parameters for your acquisition. The excitation value is labeled Iex Value(A) and the value here will be the excitation value sent to your third party device. After this, save the task. You can now either run this task in MAX, or you can pass the task into LabVIEW. You pass the task into LabVIEW by creating a Task In Constant and you can wire this directly to the DAQmx Start Task.vi as shown below.
 

Additional Information

Once enabled, IEPE excitation will remain on until explicitly disabled by setting the excitation value (lex) to 0 mA. Clearing a DAQmx task will not disable excitation.

WAS THIS ARTICLE HELPFUL?

Not Helpful