06-08-2011 12:05 PM
Hi, I'm doing some research into how I can implement the below application. From what I've read, I'm 95% sure I can do what I want with a timer/counter card. But I figured I'd throw it out there to make sure. My application is as follows:
I have (or will have) a scanning head that rotates through 180 degrees across the sky. The scanning head has a mirror on it that directs light into a PMT (photon-multiplier-tube). The PMT outputs a TTL pulse every time a photon hits it (sometimes you get double hits, but we'll ignore those for now). The idea is that we want to count the number of pulses from the PMT for incremental portions of the scan.
The scanning head will have an incremental encoder on it, outputing a quadrature signal - which I believe can be put directly into the timer/counter card. I need it so that for say every 1 degree of motion, the PMT pulse counter resets and I get a value for the number of counts from the previous 1 degree increment. The speed of the head will NOT be constant (it will be moving slower at low elevations and faster overhead) so the counting of pulses must be synchronized to the encoder input signal. Actually, there is also the possibility that the speed will be constant, and the position increment to trigger will change. Is it possible to setup events to that it triggers at 1 degree, 2 degree, 5 degree, 11 degree, etc? Obviously this would actually be based on the encoder count (not degrees) and there would probably be ~500 events per 180 degrees.
So, is this doable? Can I link events to the encoder count value and have them trigger the system to capture the current count and then reset it? I don't know anything about how you setup these events, so any advice would be great!
Thanks!
06-08-2011 12:25 PM
1. What daq hardware do you have?
2. Do you have any budget for a different card (if needed)?
This sounds kinda challenging -- quite probably doable *somehow*, but not straightforward, especially considering
the variable encoder distance between resets.
The best chance at a 1-card solution is likely an X-series because it natively:
1. supports quadrature encoders
2. has 4 programmable counters
3. supports digital change detection, which may or may not be needed, hard to say at a first glance.
I don't think an M-series gives you enough counters and I know the dedicated 660x counter/timers don't
support change detection. A pairing of one of each would likely do the trick if you already have one and
just need to add the other. A 6602 may well suffice if change detection doesn't turn out to be necessary,
though I kinda sorta suspect it will be.
-Kevin P
06-08-2011 12:49 PM
Thanks for the quick reply Kevin!
1) I don't have any hardware yet! We're in the design stage so I figured I should ask before spending the big bucks.
2) As I don't have a card yet, anything goes!
When you say "digital change detection" ... is that simply detecting rising/falling edges of the signal? The 6602 is actually the card I was looking at so that may be what I go with.
-Devin
06-08-2011 04:29 PM
Actually, I should take a step or two back from the brink. I still do foresee some monkey wrenches
if you really need dead-on hardware sync of these signals and sampling times. However, maybe I'm
much too quick to assume the need for that kind of dead-on sync.
If you can approach the app by capturing "sufficient" data within and across all these position bins,
you can probably get a very good approximation with some fairly straightforward software post-
processing, and simple interpolation/curve fitting. Not sure how much "sufficient" is, but likely a
manageable amount.
And yes, "digital change detection" is simply the ability to detect TTL transitions. When a transition
is detected, a pulse is generated on the board, and tasks can be configured to use that pulse to
sync up triggers, sample clocks, or other timing signals. Both the M-series and X-series multifunction
boards support it. The 6602 doesn't. If you're going for true dead-on hardware sync, I still suspect
you'll end up wanting the change detection feature. If the software post-processing is good enough,
you probably won't need it.
One last thing: the ability to filter digital TTL signals has been improved on data acq boards over the
years. I suspect the X-series will give you better filtering options than the other boards but I can't
speak from direct experience.
-Kevin P
06-08-2011 06:20 PM - edited 06-08-2011 06:21 PM
Hi dwyatt,
You'll probably need to provide some more information about your requirements, but X Series will likely be your best bet. Two new features on X Series that should help make this possible are:
1. Buffered Counter Outputs
2. Hardware-triggered counter reset (may not be necessary).
And Kevin is correct, the digital filtering has been improved on X Series compared to previous revisions of DAQ Devices. X Series boards can set any minimum pulse width in 10 ns increments starting with 20 ns.
Sorry for the brief response, I'm on my way out the door at the moment but I can explain in more detail tomorrow as I'm sure you'll probably have some questions since this is not exactly a straightforward application if you haven't done something similar before.
Best Regards,