Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

CI Semi Period Digital Filter

Hello!

 

I'm having difficulty configuring my counter inputs.  Pretty new to Counter/Timer setups as well.

 

LabVIEW 8.5 and MAX 4.5.

 

The signals I am sampling are 200 Hz, PWM ranging from 5% to 95%, cycling back and forth.

I'm using 7 counters in a PCI-6602.  The code I'm including is an example from my setup.


We are requiring the use of the Rising Digital Edge, and I'd like to include CI.PulseWidth.DigFltr.Enable to enable debouncing.

All inputs are connected to the Gate terminals on each counter.

Is my programming for the Risin edge correct?  I am seeing the falling edge come through first on several occasions.

 

And for the debouncing programming, I always get error -200452.  None of my searches revealed anything applicable.

I have also tried setting my Min value on the Semi Period configure to 0.0002 instead of 1e-7 with same results.

 

This is a hot project, so thank you for your time in advance!

 

0 Kudos
Message 1 of 3
(5,706 Views)

Hi Oley,

 

It looks like there's two questions here:

1.  Programming for the Rising Edge:

 

I'm assuming that you want to start the task on the rising edge of your input signal.  It looks like you have set the 6602 to arm off of the rising edge of your 20 MHz timebase (which is independent of the input signal).  Rather than setting the Arm Start Trigger, you can use a DAQmx Channel Property Node to set the starting edge (see below).

 

 

2.  Error -200452 (Specified property is not supported by the device or is not applicable to the task.)

 

The property node that you have configured to enable the filter needs to be specific to the type of task that you are running (in your case, CI.SemiPeriod).  You have selected CI.PulseWidth which is a different task type.  The filtering is usable with a SemiPeriod task by simply changing the property node accordingly.

 

 

The property node that you configure should look like this:

DAQmx_Property.png

This will both enable the filtering and tell the device to begin measuring on the first rising edge.  Make sure that all the properties begin with CI.SemiPeriod--it can be easy to overlook at times since many of the different task types have identical properties available.

 

 

I hope this helps out, let me know if you have any questions or run into any issues implementing the above.

 

Best Regards,

 

 

John Passiak
Message 2 of 3
(5,699 Views)

Hi John!

 

Yes, those took care of many of my issues!  Thank you!

Digital filtering looks to be working the way it should.

I did exactly that, overlooked the correct settings.

 

However, I'm still getting flip-flopping data from a few channels.

Many seconds consecutively too.

 

 

0 Kudos
Message 3 of 3
(5,686 Views)