Re: How can I set one loop's frequency as a slave of another loop ?

2004-02-10 Thread cariboo
instead of a case struture. How do you think about the event structure
? Would it be a better idea ?



Re: How can I set one loop's frequency as a slave of another loop ?

2004-02-09 Thread cariboo
Thanks for your answer.
I wanted to not use the wait function because it is not precise (I
think). If I put a 'case structure' in the second loop that waits for
an occurrence, it will be more precise, but the test of the 'case
structure' will use CPU time. Is there a better way to use the
occurrence ? Or am I wrong, to wait an occurence does not use CPU ?



How can I set one loop's frequency as a slave of another loop ?

2004-02-09 Thread cariboo
I have 2 loops in parallel. The first runs at 500Hz. The AIread
controls the frequency. How can I set the second one at 100Hz ? It is
very easy to set it with local variable, but really not clean. The
second loop must not use the CPU while waiting the next 100Hz tick. Is
it possible ? I am trying to use occurrence, but the second loop will
always (I think) use CPU while waiting next tick !
Is it possible to set one loop in one thread and the other one in
another thread ? Then set each thread to a CPU (I use a bi-xeon PC)
Thanks