LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Peak counter with level

Hello,

We are now working with a NI USB-6211. We are using it to measure the flow coming from a pomp we've created. The flowmeter gives a square signal between 4 and 0 volts. To measure the flow we have simply counted the number of square signals in our oscilloscope.

The point is that, when we use Labview, in addition of the normal peaks it counts also the noise at the top of the peak (if we introduce a perfect square signal from a signal generator it works perfectly). Is there a way to tell Labview to count only the peaks between, for example, 2 and 3 volts and avoid the noise counting?

Thanks in advance,

Eduardo

0 Kudos
Message 1 of 7
(3,205 Views)

I think I would use the Threshold  VI and make sure that the window size is wide enough so that you only catch the voltage changes

 

Untitled-2.png

Tim
GHSP
Message 2 of 7
(3,196 Views)

Do you have data that I can see so that I could tune something for you?

Tim
GHSP
0 Kudos
Message 3 of 7
(3,186 Views)

Hello,

I'm not quite sure if the Threshold VI will be useful because all the flutuations (noise) that labview counts are over a value. The Threshold VI counts every peak over the value or only counts one when we go over the threshold value?

Anyway I send you tomorrow what we have implemented so you can take a look.

Thanks,

Eduardo

0 Kudos
Message 4 of 7
(3,181 Views)

Hello,

I attach you what we have implemented to count the number of square signals. It works properly for perfectly clean signals but counts thousands and thousands when we have some noise. We have already tried to use the Threshold VI but it didn't really work...

Any advice would be really useful.

Thanks,

 

Eduardo

0 Kudos
Message 5 of 7
(3,171 Views)

Do you have data that I can use. Something that you have all ready collected so that I can see the noise. I believe that if you set the window width wide enough you should be able to ge tthe threshold vi to only count your peaks.

 

If this vi generates the data then we are missing the first vi.

Tim
GHSP
0 Kudos
Message 6 of 7
(3,163 Views)

Hi Dudu07,

 

First of all, you can activate a Digital Filters with a counter Task (use of PFI lines) on M series Boards. For that i encourage you to read this topic below:

Enabling the Digital Debounce Filters for TIO Devices in NI-DAQmx

http://digital.ni.com/public.nsf/allkb/220083B08217CFD686257131007E5D2C?OpenDocument

 

Also you can create a lowpass filter to block the transient effects (peak voltage or high frequency), before connecting your signal to the counter input. This allow you to performe better measurement, without counting the transient. You must implement your filter in accordance with the signal being measured. 

 

Best regards,

 

0 Kudos
Message 7 of 7
(3,152 Views)