Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use two counters to capture a ttl pulse for a set time

Solved!
Go to solution

Setup: PCI 6062 Counting card w/ BNC 2121 board running under LV 9.0 PerkinElmer Avanlance Photodiode (SPCM-AQRH-13)

 

I searched through the forums and came upon the topic of rastering an image while collecting signal from a source for a set time.

 

The example in words from falkpl back in 2005:

 

"

So you are trying to count TTL pulses for 4ms periods then raster scan an image of fluorescence image, pixel by pixel?  I had done something like this in the past it is not so hard, you will need 2 counters to do this.  Configure the first counter to count events while high (assuming the TTL pulse is not comming in too fast to count) and configure the source of the TTL to the PFI line attached to your PMT signal.  Now set the second to counter to put out a singal pulse (not a pulse train) of 4ms wide.  Configure your first counter to have its gate pin as the output of the secont counter.  Now everytime the second counter goesw high (configured for 4ms) the events will be counted.  Now for your image algorithm in 2D:
 
Configure Counters()
For each Pixel{
    Pulse_Counter_2
    Read_A_Point_Counter_1
    Move_Stage
}
 
Save the values of the counter1 in a 2d array and feed this to an intensity plot for a quick visualization.  Sorry I didnt have time to code this up for you.
 
Paul

 
Paul Falkenstein
Coleman Technologies Inc.
CLD, CPI
Labview 4.0- 2009, RT, Vision, FPGA"
I am at a loss as how to configure the two counters to do such a thing.  I am just starting out with labview so I would appreciate any help that could be afforded such as pertinent example VI's.  The VI's I examined seemed to have some of the functiality, counting, counting  pause trigger but I am currently unable to make headway. Regards,
Woeful
 

0 Kudos
Message 1 of 6
(3,344 Views)
Sorry I have minor dyslexia, seriously, my counter card is 6602
0 Kudos
Message 2 of 6
(3,342 Views)
Solution
Accepted by topic author Woeful

Hello Woeful,

 

I'll try to point you in the right direction to start coding this application, but keep in mind my suggestions will need to be modified to your specific application.

 

For the retriggerable finite counter output task that you will need from your second counter in this application, I would suggest taking a look at the Example Finder in LabVIEW (Help » Find Examples) and under Hardware Input & Output » DAQmx » Generating Digital Pulses.  Here, you will find Gen Dig Pulse-Retriggerable.vi.  You can use this to create your 4 ms gate pulse that is finite (not a pulse train) and retriggerable (for everytime you move to next measurement.

 

In regards to configuring the first counter, there are several things to consider, and I can offer some initial help to getting it set up.  You can internally route the CTR1 Internal Output (4ms pulse) to your CTR0 Gate to only measure during the high time.  Here is additional info to do this in LabVIEW.  The source of your CI Count Edges task will be the input TTL signal you are measuring/counting.  This will be on the PFI line that corresponds with CTR0 Source. 

 

When you do a finite measurement with CTR0, you will only take counts while the gate is high and your source has a rising edge.  You can set the finite measurement to start on a trigger, of which is not clear in this example you have identified.  Since you know you have a finite 4ms pulse measurement time, you can adjust the time of your measurement accordingly.

 

I found this forum that might help you out some, but the coding is all text-based.   Hopefully this can give you a good starting point for programming.
Kyle A.
National Instruments
Senior Applications Engineer
Message 3 of 6
(3,321 Views)
nvm I gots it east coast style!
0 Kudos
Message 4 of 6
(3,310 Views)

Kyle,

thanks for the info it was most informative.  :smileyvery-happy:

 

 

Kind Regards,

 

Woeful

0 Kudos
Message 5 of 6
(3,308 Views)
Message Edited by K.Daley on 06-10-2010 09:56 PM
0 Kudos
Message 6 of 6
(3,279 Views)