LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

count analog pulses

Hi All,
 
I want to create an application that uses a variable signal (random rectified sinus pulses with various amplitudes: 1V, 2V, 3V, 4V) and counts all the pulses during a specified interval of time (1 second). I need four I32 counters that show how many pulses with an amplitude of 1V, 2V, 3V and 4V have been recorded during the interval of 1 second. Any ideas would be greatly appreciated. I already created sort of a virtual test signal that is able to generate pulses of various amplitudes. Later I will use signal captured from my ADC board (PCI 6251). I had a look through the examples provided by NI, but I've been unable to find what I need.
 
Regards,
Nick
0 Kudos
Message 1 of 6
(4,077 Views)
Hint: Upon acquiring,  maybe you can perform FFT on these sine signals at equal finite intevals, find its frequency ( number of cycles per second)
0 Kudos
Message 2 of 6
(4,074 Views)
Use the Peak Detector to locate the peaks. Then use Comparators or In Range and Coerce to identify the amplitudes. Put the count for each amplitude range into a separate shift register and increment the count corresponding to the detected amplitude.

Another possiblity: The Histogram functions.

Lynn
0 Kudos
Message 3 of 6
(4,062 Views)
Thank you Lynn, based on your advice I found "Threshold Peak Detector" that has an output named Count that does exactly what I need.
0 Kudos
Message 4 of 6
(4,046 Views)

I have a signal that is a counter for a speed of a wheel and gives me a square wave.

Can I simply count the number of peaks in the signal and calculate a moving average over the trace.

It lasts for 9 sec and the data was collected at 20khz.

I am processing the data in Diadem

Thanks

Jim

0 Kudos
Message 5 of 6
(3,917 Views)
Hi Jim,

I would be glad to help you with this question. It sounds like you are trying to convert a square wave (coming from your wheel) into a graph of speed (RPMs) vs time. You should be able to use the VBScript example located at (http://zone.ni.com/devzone/cda/tut/p/id/3549) to perform this task. Please follow the link at the bottom of the page to "Joint Time Frequency and Order Analysis Tool - Download."
 
Specifically, you will need to perform the following steps:
 
  1. Download the Joint Time Frequency and Order Analysis Tool using the link above
  2. Save two sets of data in your preferred file format (for import into DIAdem). You should have one data set for your square wave (obtained from your wheel), and another data set for the time data associated with your square wave samples.
  3. Drag the square wave and time data (two data sets) into the DIAdem data portal. Note the channel names that are associated with each data set.
  4. Select the "Script" window on the left, and click on File >> Open. Navigate to the directory where you saved the Joint Time Frequency and Order Analysis Tool files, and select the "Time Frequency Order Analysis" script.
  5. Click Run Script to execute this script. From the dialog page, navigate to the "Analysis Type" menu, and select "RPMs Channel from Tach Channel".
  6. Select your "Time Channel" and "Tach Channel" according to the channel names that you imported earlier. You can also choose the number of pulses per revolution for your wheel.
  7. Click on "Run Analysis" to obtain the velocity-time data that you are looking for.

I hope this information helps. Please let me know if you have any further questions and I would be glad to assist you in any way possible.

Regards,

Casey Weltzin
Applications Engineer
National Instruments

0 Kudos
Message 6 of 6
(3,883 Views)