LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Elapsed Time

Solved!
Go to solution

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.

0 Kudos
Message 1 of 16
(3,102 Views)

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.

0 Kudos
Message 2 of 16
(3,090 Views)

hi sorry for the delay... attached there is the VI..

the problem is in the Max Hold&Peak table as shown in the immage:

 

Immagine.PNG

 

 

Download All
0 Kudos
Message 3 of 16
(3,047 Views)

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

Message 4 of 16
(3,037 Views)

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).

0 Kudos
Message 5 of 16
(3,033 Views)

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

 

 

Message 6 of 16
(3,021 Views)

Hi Tuitui, could you do a print? because my labview version is the 2012 and it gives me an error.

Thank you

0 Kudos
Message 7 of 16
(3,018 Views)
Solution
Accepted by topic author inuyasha84

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

Download All
Message 8 of 16
(3,015 Views)

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

0 Kudos
Message 9 of 16
(3,003 Views)

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

Message 10 of 16
(3,000 Views)