Hi!
I am trying to do a buffered gated event counting, i.e. I'd like to count photon pulses arriving in the high time of a gate signal. I'm using a PCI-6733 card with NI DAQmx 14.2 and Labview.
I'm relatively new to Labview, and I hope I'm just missing some details. I've attached two programme snippets tackling the question from two different points of view - in example1.vi a count-edges-task with a pause trigger is used, in examle2.vi I counted the pulse width of the gate signal in ticks, with the photon pulses as time source.
Unfortunately, neither of the two yields the desired results. I tried for a gate signal which is 10µs high and around 20µs low and the following photon pulse rates:
- 10MHz: example2 yields 100 counts/gate signal pulse as expected, example1 yields 300 counts/gate signal pulse -> the pause trigger does not seem to work. What am I missing here?
- 20kHz: example1 yields 0 or 1 count/gate signal pulse as expected, example2 gives out the Error -200140 "Two consecutive active edges of the input signal occurred without a counter timebase edge." -> A count of 0 causes the programme to fail. I'm aware of the problem of duplicate counting, but couldn't find any way to set "duplicate count prevention" to true or to otherwise make the programme work. Anyhow, it does not give me out the same values again but aborts, so I'm not sure if this is actually the source of the problem.
Is there any workaround for one of the two versions to obtain a gated event counting? Or is this not at all possible with the hardware I'm using?
I'd be glad if you could point me to any forum posts/examples dealing with the problem, I couldn't find any where there has been a solution which worked out for me.
Any help is highly appreciated!
Thanks a lot for your time,
Britta
example1
example2