Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Python continuously log DAQmx IEPE vibration data

Solved!
Go to solution

I am trying to use Python API to continuously access/log the tri-channel IEPE vibration data. I was following this example code:

https://forums.ni.com/t5/Example-Code/Vibration-Continuous-Acquisition-with-Triggering-in-Python-wit...

 

However, such an example code is only for a single channel plus the IEPE sensor needs internal excitation source settings.

Does anyone know how to set the excitation for the IEPE sensors? Any example code would be appreciated.

0 Kudos
Message 1 of 9
(1,366 Views)

By the way, I am using NI-9234 on NI-9185 if it matters.

0 Kudos
Message 2 of 9
(1,365 Views)
Solution
Accepted by Liwenhu

From the example you found:

Line 2: 

from nidaqmx.constants import AcquisitionType, ExcitationSource
 
Line 18:
acceltask = task.ai_channels.add_ai_accel_chan(channel_name, units = units_g)
acceltask.ai_excit_src=ExcitationSource.INTERNAL
 
To add more channels, call add_ai_accel_chan a few more times (Easily Synchronize and Trigger NI-DAQmx with Channel Expansion), or use NI-DAQmx Syntax for Specifying Physical Channel Strings to add multiple channels.
-------------------------------------------------------
Control Lead | Intelline Inc
Message 3 of 9
(1,352 Views)

Thank you for the reply. Do you know what's the default excitation current? And how do we change that value?

0 Kudos
Message 4 of 9
(1,321 Views)

@Liwenhu wrote:

Thank you for the reply. Do you know what's the default excitation current? And how do we change that value?


You can find the default and supported excitation current from your instrument datasheet.

 

9234 supports only 2mA excitation current and you can ON/OFF from software

santo_13_0-1693444747940.png

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 5 of 9
(1,311 Views)

Thanks for the reply, but I don't think the default is 2mA, from the datasheet, it says a minimum of 2mA and there should be a way to adjust this value through python API rather than just on/off.

I used Labview to log the data, and it can be set as 4mA. I think there should be a way to adjust it.

0 Kudos
Message 6 of 9
(1,305 Views)

I can guarantee that the 9234 support only 2mA and if you try to set it to any other value from the DAQmx API, you will get an error.

 

There are other DSA modules that support 2mA or 4mA but your 9234 supports only 2mA. And yes, you can set the excitation current using DAQmx API.

 

For example, PXIe-4464 supports 4mA,10mA and 20mA as listed in the datasheet.

 

santo_13_0-1693445873936.png

 

Some related articles,

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YIWmCAO&l=en-US

https://forums.ni.com/t5/Multifunction-DAQ/Toggling-IEPE-on-off-for-9234-voltage/td-p/892349

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8uwSAC&l=en-US

 

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 7 of 9
(1,303 Views)

Thanks, I think it works.

0 Kudos
Message 8 of 9
(1,256 Views)

Hi, I tried to use the code to record and compare with the LabView recorded data, I found the python recorded some how is much smaller than LabVIEW data.

 

I guess even python did not give me any error but it did not really initiated the excitation. Any idea how to identify which step is wrong?

0 Kudos
Message 9 of 9
(1,248 Views)