PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DAQmx Python to control NI 6281 filter

Solved!
Go to solution

Hi. I have a USB 6281 and a PXI 6281. I notice that they seem to have a 40kHz filter. I wonder how to turn on and use the filter in Python properly. The goal is to reduce the noise level in my data acquisition project with as little distortion as possible, i.e. no phase shifts, offsets, or magnitude changes.

0 Kudos
Message 1 of 4
(718 Views)
Solution
Accepted by topic author larctique
with nidaqmx.Task() as task:
    channel = task.ai_channels.add_ai_voltage_chan("Dev2/ai0")
    channel.ai_lowpass_enable = 1
 
-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 4
(680 Views)

Thank you.

If I'm using multiple input channels, should I set channel.ai_lowpass_enable = 1 for each channel or this is a global setting?

0 Kudos
Message 3 of 4
(665 Views)
Solution
Accepted by topic author larctique

You must enable the low pass filter on all channels, otherwise an error is thrown.

nidaqmx.errors.DaqError: Property must have the same value for all channels on this device.
Property: DAQmx_AI_Lowpass_Enable
Corresponding Value: 0
Channel Name: Dev2/ai1

Task Name: _unnamedTask<0>

Status Code: -200106

 

You can use NI-DAQmx Syntax for Specifying Physical Channel Strings to add multiple channels in a single API call.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 4 of 4
(656 Views)