LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure timed loop?

Hi,
 
I have built a VI to log mechanical tensile tests. At first I used while loops to make the reading and appended all values to an array that is written to a text file when user push STOP.
I realised that the array becomes very large very fast so I got the idea to use a timed loop that appends every value during operation, it will not fill up the memory as in the case above.
 
But I don't really understand how the timed loop works, so please take a look at the VI and tell me how to config it.
0 Kudos
Message 1 of 4
(2,784 Views)
Hello,

I don't think a timed loop is required for your application, a while loop would do the job.
A timed loop, as I understand it, is a while loop with "built in" check on the iteration rate (it tells you if it finishes late) and also you can set a priority for this loop (I admit I don't really know what this means and how priorities are managed Smiley Indifferent). To sum up, I would use only if I need to :
    - give priority to a certain task,
    - know if the task finishes latter than expected.

Of course, appending a line to your measurement file at each iteration is a lot better than filling and array and writting it at the end !! But this as nothing to see with the type of loop you use.

Hope this makes things clearer for you


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 2 of 4
(2,779 Views)
Ooops! Smiley Happy
 
Of course I don't need a timed loop... So now I have replaced it with a while loop.
 
And it works fine!
 
0 Kudos
Message 3 of 4
(2,770 Views)
Smiley Happy

If things are clearer for you now, we've reached the goal 😉






We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 4
(2,767 Views)