Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

C# .net DIChannel Filters

Hello,

 

I am trying to get the filters to work for the DIChannel objects, but I keep receiving the same error:

 

The specified property not supported by the device or is not applicable to the task.

 

I try using the "NationalInstruments.Examples.ReadDigChan_ChangeDetection_DigFilter" example and still get the same error.

 

Here is the code I am using:

myTask = new Task();

DIChannel filteredChannel;

filteredChannel = myTask.DIChannels.CreateChannel(filteredLinesComboBox.Text, "", ChannelLineGrouping.OneChannelForAllLines);

filteredChannel.DigitalFilterEnable = true; //IT ERRORS OUT HERE!!

filteredChannel.DigitalFilterMinimumPulseWidth = (double)pulseWidthNumeric.Value;

Is there something wrong or am I missing something??

Thanks in advance,

Mtonsager

0 Kudos
Message 1 of 4
(3,815 Views)
Mtonsager,

Thank you for posting to the NI forums.  Not all DAQ cards support enabling digital filters.  It doesn't seem like there is anything wrong with the code you included.  Likely the source of the problem is as the error describes: "The specified property is not supported by the device."  What DAQ product are you using for your acqusition?

Regards,

Neil S.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 4
(3,793 Views)

Hello,

Thanks for the help.

I guess I didn't think of that, but I am using the pci 6601 card.  I would imagine that the 6602 card is fairly similar except that it has 4 more counters on it, right?

Thanks,

Mtonsager

0 Kudos
Message 3 of 4
(3,792 Views)
Mtonsager,

The 6601 does not support digital filtering on digital input tasks.  660X devices only support digital filtering on counter input tasks.  You are correct that the 6602 is very similar to the 6601 except it have 8 counters.  Digital filtering is generally used for change detection.  Since the digital inputs on the 660X devices are software timed only this digital filter does not have the same significance.   Let me know if you have any further questions.

Regards,

Neil S.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,770 Views)