In article <39CF734C.262A5958@comm.mot.com>,
stepheb@comm.mot.com wrote:
> How can I do this better? :
>
> Say I have a while loop with a boolean in it called "Done?". It's
wired
> to the while loop's control boolean via a NOT gate, and of course the
> loop exits when the boolean is pressed.
>
> This eats up CPU cycles and so is very inefficient. Is there a way to
do
> this better?
>
> -- Stephen
>
As yet another method:
Place your boolean along with the invert in a Case structure, say in
the true case, place a false in the false case, wire the output of the
case to the done, and then use one of several types of triggers to
select the true case. As a possible trigger, read the count from the
iteration counter, divide it by 1000 using the quotient an
d remainder
function, and when the remainder = 0 read the boolean. This causes a
read every that is selectable between every 10, 100, 1000, 10000...
cycles, depending on your divisor. You could also set up a trigger
using the real time clock, this would give timing that was not
dependent on loop times.
Hope this gives you some help.
Marlin Rhea
Sent via Deja.com http://www.deja.com/
Before you buy.