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
- 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.
- 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.
Enabling Excitation in ANSI CIEPE excitation is enabled by either of the following methods:
- 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);
- 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 or SignalExpressBrowse 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.