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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

counting ttl pulses

Hello Everyone,
 
I am attempting to continuously record (i.e. time stamp) only positive (i.e. 'Logic High' event) TTL pulses from a PMT using a PCI-6602 board via a BNC-2121.

From reading the LabVIEW tutorials/examples it seems that I should be able to get very high precision (15 digits) from the "Get Date/Time In Seconds" VI. I need to be able to record times to the microsecond (at least). Yet when I look at the data it appears that for every digit less than a millisecond either a 9 or a 0 is recorded, which leads me to believe that I can't get better time resolution than a millisecond. Is there anything I can do to change this?

Assuming that I can get this to work I would also like to simultaneously monitor and record a second PMT channel. Any hints or tips would be great!

I've attached my very basic VI below.

Cheers,

CJ

Message Edited by CJKS on 05-22-2006 11:53 AM

0 Kudos
Message 1 of 7
(3,366 Views)
are you trying to count time between photon events or are you trying to count the number of photons during a time interval?  the 6602 has a 80Mhz clock so you will be able to get time resolutions of 12.5ns not miliseconds.  The "Get Date/Time In Seconds" VI refers to the system clock and is not nearly as good as using the 6602 's clock.  what exactly  are you trying to do? I couldnt open you vi since I am using 7.0. I have written many programs using photon counting and the 6602 in both traditional and daqmx.
 
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 7
(3,359 Views)
Hello Paul,

Thanks very much for the reply. To answer your question, (in the broadest sense) I am trying to build a software correlator, more specifically I want to determine the time of every photon event.

Currently I have a DAQ Assistant VI in a while loop accquiring (1 sample on demand) Digital In. The output of the VI is then run through an "index array" where I wire the resulting boolean to a true-false case structure.

The idea being when I have a photon event (i.e. Boolean = True) it executes the code in Case = True, namely a "Format Date/Time String" that writes the time to a file via a "Get Time/Date In Seconds" VI.

I'll see if I can upload a pdf image of the diagram.

So if I understand you correctly, by using the "get time in seconds" VI  I am limited by the system clock....? What other options for counting time do I have?

I can see how I could get the information I need by counting time between photons too.

Thanks again,

CJ
0 Kudos
Message 3 of 7
(3,348 Views)
Hi Paul,

I screen grabbed the LabVIEW diagram and put it into a word file.


0 Kudos
Message 4 of 7
(3,343 Views)

Yes the simpliest way to do what you want is to count the time between rising edges using a counter (the 6602 has 8 80 Mhz 32-bit counters).  Yo will not use digital io but time counting.  The gate of your counter will be the TTL/Cmos pulse from your PMT and the source of the counter will be the 6602 master clock 80Mhz, so you can count clock ticks between photons, now you have a 12.5ns time resolution.  You can use the system clock to get a time zero if you would like to use absolute time.  The olny thing to keep in mind is that you will be limited to a maximum time between pulses of 2^32/80M or 53 seconds, you will get an overflow of your counter but usually this is not a problem with photon counting.  You will be also limited to a maximum photon rate of about 20Mphoton events.sec this is also not a problem since the interesting photon events seem to happen between these time scales.  if you want a longer time scale you cvan always casceds 2 counters to get 64bit resolution but this is probablu not necessary.  Look at the buffered period measurment examples.  You can easily scale this to 8 counters with 8 PMTs if desired with your curent hardware but this gets expensive.  Goodluck.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 7
(3,321 Views)
Hi Paul,

YES! You pointed me in the right direction and I think I got it! Thanks, for all the help.

CJ
0 Kudos
Message 6 of 7
(3,306 Views)
No problem. 
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 7 of 7
(3,292 Views)