Enable IEPE Excitation Programmatically Using LabVIEW

Updated Dec 29, 2023



  • 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


  • LabVIEW Full
  • LabVIEW Base
  • Measurement & Automation Explorer (MAX)


  • NI-DAQmx



  • I am using an NI DAQ device and need to programmatically enable IEPE excitation. How do I do this?
  • How do I change the coupling type for my IEPE excitation?
  • I am using NI 9234 module in FPGA mode. How to disable or change the IEPE excitation through a property node in FPGA mode?


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 using DAQmx Properties:

IEPE Excitation is enabled by either of the two following methods
  1. Using the 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 a 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. 
  • 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 - Specify the amount of excitation that the sensor requires. See Excitation & Compliance Voltage for IEPE Sensors in NI Cards  for more information.

Enabling Excitation in LabVIEW in FPGA mode:

IEPE excitation in cRIO is programatically enabled by the following method:
  • Using "Input Configuration" property node
Selecting "IEPE AC coupled" in the Input Configuration will enable IEPE current excitation. If you select "AC Coupled" or "DC Coupled", the excitation is disabled. 

Navigate to the LabVIEW example located in the path "C:\Program Files (x86)\National Instruments\LabVIEW 202x\examples\CompactRIO\Module Specific\NI 9234\NI 9234 Getting Started\NI 9234 Getting Started (FPGA).vi" to test the excitation mode programatically.

LV example SS

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",
DAQmxSetAIExcitSrc(taskHandle, "Dev1/ai0", DAQmx_Val_Internal)
DAQmxSetAIExcitVal(taskHandle, "Dev1/ai0", 0.021);

Create Task in NI MAX or SignalExpress

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.

Only certain devices are capable of providing excitation voltage. Make sure the hardware you are using is capable of providing an excitation voltage before using the methods described in this article.

Some DAQmx task types are only able to provide select voltages. For example, on a 9218 universal input module, a bridge or strain task can only provide voltage at 2 different levels, 2.5V and 3.3V, even though the module can provide up to 12V for a basic voltage task.