LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why will a whileloop run without a millisecond timer in LV5.0 and not in 6.1?

We are using WIN XP and Lv 6.1. We have a large application with several hundred VI's that we are currently running in LV 5.0.1. We are trying to bring the program into 6.1 but, upon execution the CPU usage goes to 100%. I have found that adding the millisecond timer with a constant of 1 to each whileloop decreases the usage. Do I have to go through hundreds of VI's and add the timer or is there an easier solution?
0 Kudos
Message 1 of 4
(2,748 Views)
I'm not aware of an easy way to fix this problem other than putting in a timer. I'm surprised you didn't have this problem in 5.0 as well, I certainly did.

It's always been good practice to put a millisecond timer in a while loop anyway to keep from using all the CPU time anyway.

Sorry I wasn't any more help than that.

Mark
0 Kudos
Message 2 of 4
(2,748 Views)
You need to add delay only in loops that run contunuously for a long time, like UI loops. Loops that perform a finite calculation don't really need delays.


LabVIEW, C'est LabVIEW

Message 3 of 4
(2,748 Views)
"Fxec" wrote in message
news:506500000008000000AD780000-1042324653000@exchange.ni.com...
> We are using WIN XP and Lv 6.1. We have a large application with
> several hundred VI's that we are currently running in LV 5.0.1. We are
> trying to bring the program into 6.1 but, upon execution the CPU usage
> goes to 100%. I have found that adding the millisecond timer with a
> constant of 1 to each whileloop decreases the usage. Do I have to go
> through hundreds of VI's and add the timer or is there an easier
> solution?

I would run the loops as slow as possible, that will save more CPU.
0 Kudos
Message 4 of 4
(2,748 Views)