From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

gated two edge counter -200452 error

Solved!
Go to solution

 

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

 

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 11 of 19
(2,289 Views)

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

0 Kudos
Message 12 of 19
(2,277 Views)

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

0 Kudos
Message 13 of 19
(2,264 Views)

 

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

 

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 14 of 19
(2,258 Views)

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?

 

 

0 Kudos
Message 15 of 19
(2,236 Views)

Ooops, forgot to attach the program

0 Kudos
Message 16 of 19
(2,235 Views)

 

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 17 of 19
(2,229 Views)

 

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 18 of 19
(2,227 Views)

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

0 Kudos
Message 19 of 19
(2,191 Views)