NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
luciana
Posts: 4
0 Kudos

Why While Loop has a "Wait Until Next ms Multiple" inside?

 
Active Participant
AlessioD
Posts: 714
0 Kudos

Re: Why While Loop has a "Wait Until Next ms Multiple" inside?

The timer inside a While loop is used to free CPU resources when they are not needed.
If you run a while loop without any sort of timing, this would use all the CPU time and it will try to run as fast as possible, never allowing other processes to take up CPU resources. This is very undesirable since it may become really hard to just interact with a button on the Front Panel when a While loop is running free.
If you put a timer in it, the code inside the loop will execute. The execution will take some time to complete. Since there is a timer in there, the next iteration will start after a certain amount of time, thus allowing other processes to access the CPU.

These are concepts that are very well explained during a LabVIEW Basics 1 Course.

You can also refer to this Knowledge Base for more details

Regards,

AlessioD
National Instruments
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page