> I have two indepent loops, one is add one ,start
> from 0. The other one is add one, start from 0 too.
> How can make loop1 run fast than loop2.
>
I'm not sure that you want to use priorities, and if you do use them,
you also need to use Wait MS calls or something else to regulate how
often your loop runs.
Priorities determine who gets to cut in line. If a lot of tasks are
lined up to get into the CPU, the high priority task gets to walk past
the normal ones and use the CPU as much as he likes, no matter how long
the others have been waiting.
So, first thing to do is determine how fast each should run and put
delays into the loops. If you then have several tasks that wake up
periodically and you'd like one to interrupt the others, make i
t a subVI
and give it a higher priority, otherwise leave priorites alone.
Someone else mentioned putting Waits of zero in every loop. Just to be
clear, this does cause finer grained execution, but at the expense of
efficiency. This finer grain causes more runs through the scheduler,
and there are certain loop types that are probably better off without
it. A quick measurement on my machine shows that 1,000,000 schedules
costs about 800ms.
Greg McKaskle