Paul,
Hmmmm. I haven't thought of a method yet, but I'm also not sure I understand 100% exactly what you need. I sorta suspect that you won't be able to do it in hw on the 6602 alone, though I'm not ready to give up either.
1. How many of the 6602's counters are available for you to use in this solution?
2. What's special about the 1 Mhz rate you mention? Are you generating it with one of the counters? Could you use the internal 20 Mhz timebase instead?
3. Do you need the output to go high just once if the threshold freq is exceeded? Or does the output state need to track the input freq in real-time? I.e., do you want it to go high instantly when a high freq is detected then drop low instantly on the next low freq, and so on?
4. I'm not sure what you mean by "temporal bins running at 1 MHz." If you sample at 1 MHz, and your source signal is < 1MHz, all your bins would only hold values of 0 or 1. (Assuming that you had properly set the 'Duplicate Count Prevention' property. Otherwise, you'd store only the 1's and not the 0's.)
On the other hand, if 1 MHz is your source signal and sample #'s of these between your sensor pulses, then a high pulse rate will register as a small # in a particular bin.
Offhand, I've only got one sketchy idea that might help some.
Setup a counter for position measurement from an Up/Down encoder using Ticks for units. Set your counter's initial value as close to TC as possible, let's say 2. Configure the counter to toggle on TC and setup the output polarity so it'll be initially low. Wire your sensor signal to 2 PFI lines, one for UP and the other for DOWN. Configure digital filtering on the UP line only, at a frequency corresponding to your threshold.
The idea: On each pulse from your sensor, the DOWN line sees it immediately while the UP line sees it after a short delay, if at all. Internally, the count will sit at 2 waiting for a sensor pulse, then go 1-2 in quick succession when one arrives. If the sensor pulse frequency is too high however, the UP count won't happen and the count sits at 1. Then the next pulse sends the counter DOWN to TC (0). The counter output then toggles high on reaching TC. Assuming the pulse is low freq, the UP count will set the count back to 1. I
think the counter won't re-toggle the output on the next down count that sends the count to 0 again.
This method may let you generate a one-time state change from low-->high one sensor pulse after the high freq interval.
-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.