11-19-2009 11:30 AM
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?
Solved! Go to Solution.
11-20-2009 06:26 PM
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?
11-23-2009 02:58 PM
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?
11-23-2009 03:48 PM
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.