09-29-2008 12:01 PM
It appears that a timed loop cannot run faster than 100 hz. In other words, the "period" input for a timed loop cannot be less than 10. Is this true? I am using the Elapsed Time VI to measure time increments. The time increments output from this VI are at least 0.01 secs regardless of how fast I attempt to run the time loop. Perhaps the limitation lies in the Elapsed Time VI, not in the Timed Loop. Should I try a different approach to measuring the delta time between iterations of a time loop? TIA.
-jlivermore
09-29-2008 12:57 PM
Hi, jlivermore,
Try to measure number of increments within one second instead of measure of the time difference between iterations...
Andrey.
09-29-2008 01:13 PM
09-29-2008 01:22 PM - edited 09-29-2008 01:22 PM
Here's the simple way to measure loop timing:
Actually, what else is running in your loop (e.g. property nodes, DAQ, etc.)? Can you show us your code? What is your LabVIEW version?
09-29-2008 01:47 PM
Even using "elapsed time", it can easily run at 1KHz here.
09-29-2008 02:33 PM
09-29-2008 04:24 PM
Alten-
I'm running WinXP SP2 on a Dell Precision 330 running at 1.4 GHz. I'm running LabVIEW 8.2.1. My script will eventually write data to a file. I will try your suggestion of using a tic count per your reply. I can also switch to a Dell Precision T7400 with a Xeon CPU running at 3.16 Ghz. Thanks.
-jlivermore
09-29-2008 04:50 PM
jlivermore wrote:My script will eventually write data to a file.
09-29-2008 05:35 PM
Alten-
Here is a copy of the block diagram. The file I/O is inside the loop so that it happens at a controlled rate. I've added some extra logic to measure performance. Some of this is redundant.
-jlivemrore
09-29-2008 06:58 PM
First, you don't want to open and close the file on every iteration of that loop 1000 times per second. Move the open file before the loop and the close file after the loop.
Use a path constant instead of using a string constant that you are converting to a path.
You may want to set this up as a producer/consumer architecture and pass the data to the consumer loop as a queue. Let the consumer loop do the writing to the file. Let it batch multiple items together and write them in larger groups to the file at a slower rate.