1. I have two counters, A and B. A controls a conditioning waveform, and
B controls a test waveform. There needs to be _at least_ N cycles of A before
B can fire. Whether B fires after the N cycles of A have gone through, the
user can select. If the user desires, he/she can continue firing A for as
long as they want. However, once the user decides to fire B, and the necessary
cycles of A have finished, then A must stop at the next falling edge, and
B fires.
2. The way I've wired it together is to have the OUT of A wired to a T junction,
and one branch wired to its actuator and another wired to the SOURCE of another
counter(let's say C), which counts the cycles of A(on the falling edge).
When C counts the necessary cycles of A, and
the user decides to fire B,
A is stopped, and B is started. I read the count on C in a while loop.
3. This works ok for relatively low frequencies of A(~ <20 Hz). However,
when A gets above this, the while loop isn't as effective, and more cycles
of A than are desired get through. If you wanted 5 cycles, often times 7
to 10 will get through before A is stopped and B is started.
4. I've attempted to minimize as much overhead as possible by initializing
all the counters before hand, and simply using the .vi, to have
control passing through as few sub-vis as possible.
5. If someone can point out the errors I'm making in effeciency, that'd be
great.
6. To throw a monkey-wrench into the whole thing, there's also a call to
a DLL that runs in parallel to all this(it's a single processor machine).
p.s.: Much thanks to those who helped me out with previous questions.