03-26-2010 11:39 AM
Try this on your VI, it is very easy to do. Put an "equal to" comparator on you block D. and wire the output to your stop terminal. Add a constant of 2 to one side of the comparator and the other comparator input to the itteration terminal of your VI.
Now start your VI and a Stop Watch (or just use your watch) . The itteration counter on your VI will hit 2 at exactly the 2 minute mark! the condition is clearly met to STOP your VI... BUT.......... It runs for one more minute! So the itteration term on your VI indicates the number of minutes minus one!
Try it, I just did.
Alan
03-26-2010 11:44 AM
Hi Alan,
why should I modify my VI? I don't want to. What are your answers for the questions I placed on the frontpanel of my VI?
03-26-2010 11:55 AM
Hi,
Well I thought I did answer it, but I thought you *might* want some proff?
The answer is clearly that your indicator indicates the number of minutes minus one and that the itteration terminal is one count behind the actuall number of itterations that occur.
My modification to your VI was one dramiticly clear way to demonstrate this, you actually see the stop condition being met by the loop counter yet the VI continues to RUN, one more time, loop counter =2 elapsed time =3 min.
Alan
03-26-2010 11:58 AM
03-26-2010 11:59 AM
Isn't that the amount of loop cycles minus one?
Alan
03-26-2010 12:00 PM
03-26-2010 12:02 PM
Hi Alan,
do you realy think it indicates the number of elapsed minutes minus one?
Take a look onto a stopwatch while starting the vi.
The value changes from 0 to 1 after one minute elapsed. So it counts the minutes.
03-26-2010 12:06 PM
03-26-2010 12:07 PM
The issue of time was relevent to answer the question though.... If one loop takes one minute , then 3 loops take 3 minutes. (in this VI)
So 3 loops, 3 minutes, itteration counter =2 ..... One less than the amount of minutes. Answer to question: the VI loop counter is the number of minutes minus 1.
It doesn't matter if it is minutes or drops of water. I was just trying to answer the questions posed on thee FP of the VI
Alan
03-26-2010 12:08 PM
what?
it returns a value every single cycle