Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I count events during a given time with 2 counters (6025 E)

Hi, How can I count events during a given time (1 sec for example) with 2 counters:
what is the best way?
how should i configurate both counter?

i have done the 1st counter in ev_counter with the gate being the output of the 2nd; and how can i say to the 2nd to trig the first after 1 sec counting? (trig at start and at end) what are the functoins calls in NIDAQ. i am using Visual C++
0 Kudos
Message 1 of 2
(3,263 Views)
Greetings,

When you perform event counting a gate signal can be added such that if a low signal occurs on the gate, then the counter will pause. When a high signal is seen, the counter will continue counting edges. When you install the NI-DAQ driver you should have installed the examples for Visual C++. The counter examples are found in \Program Files\National Instruments\NI-DAQ\Examples\VisualC\Ctr. Take a look at STCeventCount.C. Be sure to only use STC examples with your hardware. The E-series boards contain the DAQ-STC chip.

Now, all you need is a gate signal with a width (high time) of 1 second. You could use an external frequency or pulse generator to do this. Or, you could just use the second counter found on your PCI-6025E board. In this
case you could configure the second counter to generate a single pulse. Take a look at the STCgenerateSinglePulse.C example. As long as the pulse is in a high state for one second you can use it to gate (or time) your counting of events.

Regards,
Justin Britten

Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,263 Views)