LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

continuous signal low pass filtering

Solved!
Go to solution

I'm getting continuous signals from the NI USB-6259 multifunctional DAQ device that is aquiring its signals at 1000Hz. The DAQ rate can be changed via the GUI, but that

is for a later discussion. The main question here is labwindows offers many filtering options. I was wondering if someone could recommend the best option for a LP

Filter at about a 50 or 60 Hz frequency. Is there an easy way to implement this. I basically want to filter the acquired data and then store it into the currently present file.

 

I was also wondering if the 6259 hardware offered filtering, if it is a better route then should I use the hardware filter to clean up the noise from the signals?

 

 

Monil Morar
Control System Engineer
Secure Drilling Services (SDS)
Weatherford │ 16430 Park Ten Place │ Suite 200 │ Houston │ Texas │ 77084
0 Kudos
Message 1 of 4
(4,963 Views)

mdmorar,

 

We have a document that descibes the differences between the filters, it will specifically reference using LabVIEW, but it gives good general advice for the different filter types. Hope this helps. Thanks!

 

How Do I Select the Correct Filter in LabVIEW for My Application? 

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 2 of 4
(4,937 Views)

I'm attempting to use the following to implement filtering using the M Series DAQ hardware filter build into the

M Series devices.

 

if((error=DAQmxCreateTask("",daqTask))==0)   //create the task
{             //create voltage channel  
     if((error=DAQmxCreateAIVoltageChan(*daqTask,chan,"DAQ1CHANS",DAQmx_Val_RSE,min,
         max,DAQmx_Val_Volts,NULL))==0)
    {            //config sample clock 
         if((error=DAQmxCfgSampClkTiming(*daqTask,"",rate,DAQmx_Val_Rising,DAQmx_Val_ContSamps,  
             sampsPerChan))==0)        
        {           //synchronize sample clock
                //register sample event 
             error = DAQmxRegisterEveryNSamplesEvent(*daqTask,DAQmx_Val_Acquired_Into_Buffer,  
                 sampsPerChan,0,daqSystem1Ready,data);
        }
    }
}

 

error = DAQmxSetChanAttribute(*daqTask,chan,DAQmx_AI_Lowpass_Enable,1); 

 

where the chan = "DAQ1/ai20, DAQ1/ai16, DAQ1/ai4, DAQ1/ai21, DAQ1/ai17, DAQ1/ai5, DAQ1/ai22, DAQ1/ai18, DAQ1/ai6, DAQ1/ai23, DAQ1/ai19, DAQ1/ai3"

 

After creating the AI voltage channel I want to enable the filter. It gives me this specific error code when I try to do this.

 

NON-FATAL RUN-TIME ERROR:   "daq6259Interface.c", line 114, col 15, thread id 0x00000CC4, function id 1:  

Function DAQmxSetChanAttribute: (return value == -200077 [0xfffcf273]). Measurements: Requested value is not a supported value for this property. Property: DAQmx_AI_Lowpass_Enable You Have Requested: 1 You Can Select: 0  Channel Name: DAQ1CHANS0  Task Name: _unnamedTask<0>  Status Code: -200077

 

Does anyone have any ideas on how I can fix this issue?

Monil Morar
Control System Engineer
Secure Drilling Services (SDS)
Weatherford │ 16430 Park Ten Place │ Suite 200 │ Houston │ Texas │ 77084
0 Kudos
Message 3 of 4
(4,909 Views)
Solution
Accepted by topic author mdmorar

mdmorar,

 

The reason you are getting that error is because the low-pass filter property is not supported on the USB-6259. You will need to use a software filter for you application as there is no low-pass filter in the hardware. If you look under the Libraries palette in CVI and select Signal Processing >> IIR Digital Filters >> One-Step Filter Functions it will give you the options for different low-pass filters. They have some low-pass filters there that should help you out. 

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 4 of 4
(4,905 Views)