Dear all,
Some time ago, I asked regarding "Basic Buffered Edge Counting". Kevin_Price put me in the right path.
To put it in context: I need to time tag the arrival of photons from an ion in an RF trap.
However, I have now some issues...
First, I am using the Python NI-DAQmx library rather than LabVIEW (it should not change anything). A simplified version of my code is:
Everything is fine for a little way, but then:
DaqError: Multiple Sample Clock pulses were detected within one period of the input signal. Use a Sample Clock rate that is slower than the input signal. If you are using an external Sample Clock, ensure that clock signal is within the jitter and voltage level specifications and without glitches.
Task Name: _unnamedTask<1>
Status Code: -201314
I checked and the problem is that sometimes there are two pulses coming from the detector very close in time and the DaqError is triggered. The pulses themselves are quite "clean" (negligible jitter).
My question is, there is a way to ignore the error and keep with the acquisition? I mean, this issue is normal and represents very few cases, but currently, if it happens one single time, the acquisition gets stopped!
I tried using the Python mechanism to handle errors:
But although the loop keeps going, the acquisition is de-facto aborted, as the counter is no longing responding.
I could use the "except" to stop and start again, but this is too slow and it is not at all elegant!!!
Any ideas/suggestions?
Thanks in advance.
For the record:
I notice that when I used the simple acquisitions test that can be done using NI-MAX software, the simple counter was not giving any error so I found a way round that uses two counters: ctr1 generate time bins (going to sample clock of ctr0), and the photon counts connected at source of ctr0.
This it is working but monopolises two counters for a task that should need only one and probably leads to lower time resolution (I have not tested yet the limits of this approach) and the counter is getting once in a while two consecutive pulses without rising an error! So I though that what I would like to do it is maybe possible after all...