07-12-2016 09:39 AM
I'm not certain, but I suspect your most recent config in "TimeStamping_v5.vi" isn't gonna work. I think that at least 2 if not all 3 of count reset, arm start triggering, and pause triggering will want to own access to the same counter input signal. I'd expect a conflict and a DAQmx error from that.
An alternative to edge counting with count reset is to do period measurement. In period measurement mode, the counter resets to 0 internally by itself at the end of each measurement interval. You can create timestamps from a cumulative sum of the periods. Once again, I'm not sure you can use both arm start and pause triggering simultaneously. What's the purpose of the pause triggering?
-Kevin P
07-12-2016 08:13 PM
Hi Kevin,
The purpose of the pause trigger is essentially to act as a gate for the counts from the APDs. I don't want them to count laser photons (so I pause the counter when the laser is on); I want them only to count photons emitted from the sample, after I shutdown the laser. I wonder whether the board can do this type of thing?
Regards,
Ricardo
07-13-2016 06:08 AM
Hi,
Please see this:
http://forums.ni.com/t5/Counter-Timer/Reset-Counter-using-DAQmx/m-p/258814
So, I think you can use some other method to reset you conter. If you knw the condition to reset the counter, you can make a condition structure to do that.
I get also an error from your new code " -201298", the error is from the property''CI.CompFronts.RéinitCompt.Activer''. If you have also this error, you can desactive this property.
kind regards,
Lily
07-13-2016 11:00 AM
I went back and reviewed the context of your questions more completely. I don't think you need pause triggering or resettable edge counting. I think you just need 2 buffered tasks that each do 2-edge separation measurements and are armed by the same "Arm Start" trigger signal.
Set task 1 to measure from Laser OFF edge to the Start APD first edge. Set task 2 to measure from Laser OFF edge to the Stop APD first edge. Each task is buffering up time measurements from Laser OFF until 1st APD pulse, one measurement per laser pulse. This will give you better data than trying to measure from Start APD until Stop APD in the event that Stop APD fires 1st or they are so nearly coincident that the interval is too small to be measured by the counter (which requires a minimum of 2 timebase.
The pause triggering isn't really needed b/c each measurement starts at the instant of Laser OFF. I presume you can control or at least know the laser pulse timing, so you can post-process to make sure none of the interval times put the APD edge in the midst of the next Laser ON time.
-Kevin P
07-14-2016 05:16 AM
Hi Kevin, Hi Lilly, Hi Forum,
I tried the suggestion of getting rid of the pause tigger and using two buffered tasks performe 2 edge seperation measurements, synchronized by an armstart trigger. It appears though that there is a conflict between the ArmStart trigger and another property node. Is there a work-around?
07-14-2016 05:16 AM
Ooops, forgot to attach the program
07-14-2016 09:49 AM
It's pretty subtle. Where you're configuring the Arm Start triggers, there's an input for 'ArmStart.TrigType'. What you need to wire to it is a 'Digital Edge' constant. The subtle thing is that 'Digital Edge' isn't one of the choices available in the 'Digital Level' constant you wired. I think your constant is a leftover from when you were trying to define a Pause Trigger. Usually these kinds of mismatches lead to a visible coercion dot to help alert you, but this particular one isn't helpful that way.
Delete your constant, right click on the ArmStart.TrigType property, and choose 'Create Constant'. That'll make the right kind of constant for an Arm Start Trigger. Set it to 'Digital Edge' and the error will go away there like it did here.
-Kevin P
07-14-2016 09:58 AM
Oh, a couple other little things I noted:
- you should probably explicitly configure the polarity of the 1st and 2nd edges in your measurement to be either rising or falling, depending on what's appropriate with your equipment
- you may not want to use the Laser signal as your Arm Start trigger. If the Laser is already pulsing at a high frequency when you start your program, it's extremely likely that the two tasks will trigger off of different pulses. One of the task starts will execute before the other, and a constant stream of available trigger signals makes it likely to trigger before the other task has started.
I'd trigger off of a signal I could control, either a DO bit or a pulse from another counter. Then I'd make sure both measurement tasks are started before issuing the triggering signal.
-Kevin P
07-19-2016 07:10 AM
Hi Kevin, Hello Forum,
Thanks for your tips. The program seems to work now and I've attached a copy if anyone would like to look it over.
Regards,
Ricardo