06-25-2016 05:12 PM
Hi. I'm a begginer with labview, so I have a few doutes. I'm trying to control various valves at the same time (same VI). I created a subvi responsable for modifing the position of a valve according to time. I'm using a array with "n" lines, and each line represents the time when the valve will changes its position. When the time present in the the line is reached, the VI stops automaticly the while loop and restart, so the second time time present in the second line might be counted. This operation will happens in a continious way.
The problem appears when I try to use two or more while loops at the same. Each loop has the same subvi. When I set the time present in each line in each while loop and beggin the vi, it seems they don't work independently of each other. For example, if I set 20 seconds for the first change in the first while, and set 30 seconds for the first change in the second while loop, the first will only continue if the the time setted in the second one finishes.
If anyone could help me.
06-25-2016 06:40 PM - edited 06-25-2016 06:41 PM
I would recommend that you start a new discussion instead of adding to a different discussion that is already marked as solved.
You did not attach your subVI. If the subVI is not reentrant, both loops will use the same subVI.
It is not really clear how your code is supposed to function. You don't need to restart the while loop, just reset the timer.
06-25-2016 10:55 PM
Thank you altenbach, I'll do that.
But how can I reset the tick count present in the while loop?
06-26-2016 11:46 AM - last edited on 10-09-2024 03:31 PM by Content Cleaner
There are the same VIs as before. Your tolevel VI is loking for a VI with speical portuguese(?) characters in the name. I guess I can replace with what you have attached.
You can use the "elapsed time express VI" or you can keep the reference time in a shift regsiter or feedback node and replace it whenever the time has elapsed.
Here is a very quick example for a resettable timer.
Now to your original problem. Your while loops don't restart when you stop them. What makes you think they do?