LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

elapsed time messing up

I am using the elapsed time feature in Labview 8.0 and sometime I have noticed after 1 minute it will resett back to 0, when it shouild just continue to count up untill I end the program.  I don't want to us the time subraction because I want the data to be read only at particular times.  I am attaching the Excel file of the data.  The implementation of the elapsed time only has the elapsed time text being exported.  The auto reset is unchecked. 
 
Attached is data sheet.
 
 
0 Kudos
Message 1 of 7
(5,967 Views)
Hi Blankie,
Could you please post a screenshot of your code? It will probably be easier to find the problem after that. Thanks!

Best regards,
Stephanie
0 Kudos
Message 2 of 7
(5,947 Views)

Attached is the relative screen shot of the program.  It is kinda crazy, but for one of my first programs works very well. 

Thanks in advance!

0 Kudos
Message 3 of 7
(5,944 Views)
I think one problem could be due to the fact that you don't initialize the shift register. This means that the array of times grows without limit and all the earlier times from previous iterations remain in the shift register.
 
Try this: right-click on the shift register and select "create constant" to initialize it with an empty array of the right type whenever the inner loop starts.
 
 
 
It is difficult to troubleshoot more from a simple image. If this does not help, consider attaching your code.

Message Edited by altenbach on 03-27-2007 09:11 AM

Message 4 of 7
(5,939 Views)
that doesn't work because the chart is then only updating it with the elapsed time and not actually creating an array.  I have attached the code, however the thermal couple reader and sub vi's may not work properly, but the do work properly here.  Thanks and good luck!
0 Kudos
Message 5 of 7
(5,921 Views)
You are right.  I think you could call it a bug. 

If you look inside of the Express VI, you will see that when they convert from a number to the string, they are not rounding correctly.  This makes it possible to have a number like 59.9 seconds convert to a text representation of 0 min and 60 sec.  It is something that NI should fix by rounding to the nearest integer before the string conversion.

In the mean time, you can take the elapsed time in seconds (number), round it properly, then convert it.  Open one up to see how to convert the number to a string.

Hope that this helps,
Bob Young

p.s.  Sorry!
Message 6 of 7
(5,892 Views)

I realize this is a very old thread, but someone brought this to my attention, and just for the records:

 

This was reported to R&D (# 53648) for further investigation.

0 Kudos
Message 7 of 7
(5,075 Views)