LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pulse counter

How can I generate a pulse counter in labview (square wave generated from "signal generator")?

basically, it should add 1 (+1) to the total for every pulse generated

0 Kudos
Message 1 of 6
(2,330 Views)

It depends...

 

...an what hardware you use to acquire the signal.

Is it DAQmx, LV FPGA or an instrument driver?

 

 

Christian

0 Kudos
Message 2 of 6
(2,310 Views)

DAQmx

0 Kudos
Message 3 of 6
(2,306 Views)

Use the LabVIEW Example Finder and either navigate to "Hardware Input and Output>DAQmx>Counter" or directly search for Edge Counting.

 

 

Christian

0 Kudos
Message 4 of 6
(2,303 Views)

nadle15

 

What exactly are you trying to do?   If you just want to count up at a specific rate you can put a timer in a while loop and wire an indicator to the iteration terminal. 

 

If you want to actually monitor the number of pulses generated by the signal generator, there are many ways to do this.   One option is to use "get waveform components.vi" to obtain the Y value of the wave form, monitor if it has changed from low to high and add one to the indicator which is monitoring this.

 

Hope this helps,

 

 

Pete

Peter C.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 6
(2,294 Views)

If you have a hardware timer you can use this

 

http://niweb.natinst.com/confluence/display/MIOPSE/Count+Digital+Events.vi

Peter C.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(2,290 Views)