01-25-2014 10:11 AM
My application involves a closed-loop system where I control current which heats a resistive load. I want to ramp up the current until a specifed temperature is measured, dwell at that temperature(within a tolerance) for a specified amount of time, and then terminate the VI. I have attached a VI which simulates the data I expect to see. How can I make the VI terminate 2 seconds after the data first reaches 10.0? Counting loop iterations doesn't seem like a good solution since there will be other things going on in my real application. Seems like I should use a timer. Any suggestions will be greatly appreciated.
Solved! Go to Solution.
01-26-2014 08:49 PM
Hi VI_Joe,
Perhaps it should be something like the below?:
First, you use the property nodes to initialize the value. Within the while loop, I have a ramp value taken from the number of iterations (based on your code). A boolean function "greater or equals" checked if the number of iterations has reached 10 or past 10. If so, it provides the true value to the "select" function which will switch its output from the number of iterations value to the random number value (based on your code as well).
When the "greater and equal" function is true, the "not" function will provide a false value to the Reset input of the Elapsed Time Express Vi which will then cause that express vi to start counting for 2 seconds. After 2 seconds has passed, the Timed Has Elapsed? output will provide the true value which then terminates the while loop and thus stops the VI.
Hope this helps
Warmest regards,
Lennard.C
01-26-2014 09:19 PM
Looks like a winner to me! Thanks so much for your help/
01-26-2014 09:21 PM - edited 01-26-2014 09:22 PM
Hi VI_Joe,
You're welcome. If this is your solution, do mark it as a solution. 🙂
Thank you
Warmest regards,
Lennard.C