LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

counter reset for two-edge separation task

Hello,

I’m elaborating a system of measurement of photon coincidence on a base of NI-6363 X series board using Labview 10.0. I have two signals from two photon detectors and I need to measure the difference between the time of photon detection. In order to do it I want to use two-edge separation counter input.

During detection there is a possibility to loose a photon (to loose one of the signals on counter input), so in this case two-edge separation will give a faulty result. This problem can be solved by doing the counter reset but X series boards provide the reset function only for « count edges » task. Is it possible to launch the both tasks (two-edge separation and count edges) for the same counter at the same time ? Or if there is no such possibility how can I reset the counter in this situation ?

0 Kudos
Message 1 of 5
(2,586 Views)

Hi,

 

Thank you for posting your question on National Instruments' Forums.

 

You won't be able to create two task executing simultaneously on the same counter. You will encounter a "reserved ressource" error in such a case.

 

What you do Is stop the task and then restart it using the control task vi to reserve the task in a particular configuration, effectively reducing the time taken by the task to restart.

 

You can also execute both task sequentialy if needed, but I think that stopping and restarting the task shoudl solve your problem, if I understood it correctly.

 

I hope my aswer will help you develop your application.

 

Best regards,

Guillaume H.
National Instruments France

0 Kudos
Message 2 of 5
(2,570 Views)

First concede this: if a photon is "lost" in the sense of not producing a useful response signal to be captured, there's

not gonna be a perfect magic solution.  Here's what I mean.

 

Since you're doing two-edge separation for distinct detectors, you are implicitly interested in the question, "once I

receive photon A, how much longer until I receive photon B?"    If an instance of photon A is lost, the two-edge task

will make no time measurement for the corresponding B photon.  This is your best scenario because you simply fail

to register any sample for that pair.  If an instance of photon B is lost, the two edge task will then "ignore" the next

photon A and record an *incorrect* time interval that extends to the second instance of photo B.   You'll get one

interval from A(i) to B(i+1) instead of two intervals from A(i) to B(i) and A(i+1) to B(i+1).

 

In general, you can't really know which photon might get lost or when, so it'll be hard to know where data is missing

and/or where it's corrupted & incorrect.

 

I think I would try to approach this as 2 separate tasks, each one timestamping the pulses from one detector.  I would

use an "arm-start" trigger to make sure the 2 tasks are referenced to the same t=0 point.  Then I'd do some software

post-processing to try to figure out where photons may have been missed, and to calculate intervals wherever I

determine I can validly do so.  I would still kinda suspect that there's gonna be some educated guesswork involved

trying to distinguish between valid and invalid intervals. 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 3 of 5
(2,558 Views)

Thanks, Guillaume,

The idea of making the task stop and restart works well, so the tasks are working in a quasi parallel mode. But now the problem is to find a condition of task switching appropriate for my application. I'm thinking of it now.

0 Kudos
Message 4 of 5
(2,549 Views)

Thanks, Kevin

You are right that two edge separation task will give a faulty result in case of photon lost but if I reset the task at least one time during the photon arrival "period" that is defined by the detector dead time it should restart measure from zero, shouldn't it?

As for the second approach, in fact, I've started my mission with the idea of time stamping that is exactly that you've proposed. I've made a programm for it but it doesn't work very well (please, find the VI attached): sometimes it gives an error (see the figure). Besides the "frequency" of photon arrival is too high so that Labview could treat it (100 kHz). Maybe could it work if I change while loops to timed loops with an external timing source to work in real time?

 

Download All
0 Kudos
Message 5 of 5
(2,548 Views)