09-17-2014 12:38 PM
09-17-2014 12:41 PM
It completely depends. What is in the loop?
In short, a While Loop cannot iterate until EVERYTHING inside of it completes. So if you have a wait for 1 second inside of your loop, the loop will iterate at around 1 second.
3 Hour Introduction
6 Hour Introduction
LabVEW Basics
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Learning NI
Getting Started with NI Products
09-17-2014 12:44 PM
09-17-2014 01:16 PM - edited 09-17-2014 01:26 PM
09-18-2014 02:41 AM
Is the code for one iteration?
09-18-2014 02:47 AM - edited 09-18-2014 02:48 AM
09-18-2014 08:56 AM
@1085 wrote:
Is the code for one iteration?
It updates with each new iteration, measuring the time difference since the same code was called the last time, i.e. in the previous iteration.
I typically use a custom format of "%.2ps" or similar for the time display. (right-click...display format...advanced editing mode). This way it displays in nice si units (200.00ns, 12.40ms, 3.12s, etc)
09-18-2014 09:09 AM
Also note that execution times depend a lot on the system you use if you have no wait times included in the loop.
Long story short:
You cannot tell in advance how fast a single loop iteration is on your machine until you test it.
Norbert
09-18-2014 10:48 AM
In addition the loop time can change from iteration to iteration depending on what background processes are running on your PC. A virus scanner starting up or an OS auto-update can slow down your loop significantly in some cases. If you need deterministic operation you'll need a Real-Time PC/OS.
09-18-2014 11:03 AM
I think you guys are way overcomplicating the discussion. There was never a question on how to reliably keep a fixed loop time or how to run (or not run) the loop as fast as possible.
All he wanted is to measure the actual loop time (e.g. for benchmaking or validation, I guess).
It was a measurement question, not a control question and consisted of only eight words! 😄
Once the actual measurment results turn out to be puzzling (e.g. too much jitter, longer than expected, etc.) we can revisit this disucssion.