09-20-2013 10:07 AM
Hi guys I'm using the Elapsed Time to set a wait and to have, at the same time, the chance to stop the waiting.
The problem is that if for example I set wait for 1 minute the first time everything works fine, but when I repeat the same operation (my VI is a state machine so I can put it in an idle state) something goes wrong...I tried to debug but I'm sure that the problem is the Elapsed Time for two reasons: the first is that I have replaced it with Wait (ms) Function and it works properly everytime I want, the second is that I put an indicator on the Elapsed time (s) and the first time I see that it count/wait from 0 to 1sec while the second time in automatic it goes to 5,46 without any countdown.
I hope you can help me because this thing is driving me crazy.
Solved! Go to Solution.
09-20-2013 10:36 AM
please post your VI and not a image of it.....the problem might be in how to reset the timer input to count properly or to hold it.
09-23-2013 01:49 AM - edited 09-23-2013 01:51 AM
hi sorry for the delay... attached there is the VI..
the problem is in the Max Hold&Peak table as shown in the immage:
09-23-2013 02:13 AM
Hi inuyasha84,
I believe you need to reset the elapsed time express VI in order to make it start counting at 0 again.
If you hover the mouse over the VI, you can see that there is an input node for you to reset the function.
May i ask why you want to do this when you can use wait(ms) function or time delay function?
Hope this help
Best regards,
TuiTui
09-23-2013 02:18 AM
I tried already with the reset and the error is always there. When it iterates the second time it gives in exit a strange number... it doesn't count from 0 to the value that I set.
Bytheway I need to stop the VI because if for example I did an error in the setup and I have the wait (ms) function setted at 1h I must wait until it finishes (The idea is to do an .exe of this VI).
09-23-2013 02:58 AM
Hi inuyasha84,
May i know how you reset the express VI?
I attached here a simple VI to show how you can reset the elapsed time.
Best regards,
TuiTui
09-23-2013 03:09 AM
Hi Tuitui, could you do a print? because my labview version is the 2012 and it gives me an error.
Thank you
09-23-2013 03:13 AM
Hi,
I attached again the VI in 2012 version
I also attached the snapshot and the snippet in case you cannot open the VI
Best regards,
TuiTui
09-23-2013 03:27 AM
Hi again, I tried your method but it doesn't work. At this point I don't think that it is a problem of reset. In the meanwhile I was waiting for your reply, I tried a new approach on the problem. I did a new VI with less function and now it works properly... so there should be something in my main VI that creates problem....
attached there is the example I did... it is part of the code I use in the principal VI on which I'm working on.
I don't see where the error is....uff
09-23-2013 03:41 AM
Hi inuyasha84,
Atleast you know that the problem is not from the elapsed time.
I barely can help you in this case as this is more of logic wise and i hardly understand what you are trying to do.
If you could explain more on the whole application, i might be able to help you.
Hope you can find out where the problem is
TuiTui