10-28-2010 06:15 PM
I have a huge vi performing many things and not written by me and I want to change it in the way I am going to explain.
The vi is a big while loop. The loop is executed at a rate decided by the hardware, more or less 10 hz.
Inside a loop I have a boolean variable used to select cases in a case structure. I would like that this variable is always false except once each a fixed interval of time, say once each 10 minutes.
The way it came to my mind to do that is to create a global variable and a new vi with a timed while loop which changes the value of the global each 10 minutes.
I ask experts if they suggest to me something better and easier: I think that mine is not a great idea.
Thanks
10-28-2010 09:08 PM
How is the boolean variable selected/changed now?
Use an elapsed time express VI in place of that boolean variable inside your loop.