11-30-2011 05:07 PM
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
12-01-2011 01:02 PM
It depends...
...an what hardware you use to acquire the signal.
Is it DAQmx, LV FPGA or an instrument driver?
Christian
12-01-2011 01:30 PM
DAQmx
12-01-2011 01:36 PM
Use the LabVIEW Example Finder and either navigate to "Hardware Input and Output>DAQmx>Counter" or directly search for Edge Counting.
Christian
12-01-2011 03:13 PM
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
12-01-2011 03:24 PM
If you have a hardware timer you can use this
http://niweb.natinst.com/confluence/display/MIOPSE/Count+Digital+Events.vi