LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I set the how much a VI use the CPU??

Hello!

I know that I can set the CPU priority of the VI. But I wonder if it is possible to slow down the VI by for example permit it to use only max 25 % of the CPU? Is is any other way to slow down the execution??

/ Krille
0 Kudos
Message 1 of 2
(2,297 Views)
You can't tell a program to use only 25% of the CPU time, as this is at least partly controlled by the OS. You CAN place a variable loop time in the program though, which may be able to achieve something similar.

By placing a "Wait until ms multiple" in a while loop, and attaching a control to this, you can essentially vary the execution speed of the VI WHILE it's running. If you look at the current processor usage, you might be able to set the VI to use a certain % of the processor power. Please note that the results will be variable, and you might not be able to reach exactly your target. Additionally, as far as I know, LV is listed as a process, not each individual VI, so this whole approach will set the LAbVIEW use to the required amount. I'm assuming this will be more or less the same as setting the VI itself.

hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 2 of 2
(2,293 Views)