04-16-2009 12:39 PM
Example:
This is how the program operates now:
If put in the expiration time as:
month: 1
Day: 2
Hour: 4
it will output these to the current and expiration arrays:
Index[0] = 4/16/09 1:29PM 5/18/09 5:29PM
and than I put the expiration time as:
month: 0
Day: 1
Hour: 2
it will output these to the current and epiration arrays:
Index[1] = 4/16/09 1:30PM 4/17/09 3:30PM
now what I want it to do is update all indexes of the array as needed so when it turns 4/16/09 4:00PM
the current and epiration arrays will read:
Index[0] =4/16/09 4:00PM 5/18/09 8:00PM
Index[1] =4/16/09 4:00PM 4/17/09 6:00PM
04-16-2009 12:41 PM
04-16-2009 12:57 PM
1... I don't know what you mean by "I have a program for expiration".
2... Hardwiring paths to files on your desktop (or anywhere else) is not the best plan you could have.
3...I don't know what you mean by "it is not continuous".
4... I haven't run it, but it looks like your program is designed to:
a... update the DATE and TIME indicators after every 200 mSec of inactivity.
b... update a shift reg with the current DATE/TIME record at the same time.
c... When the OK button is clicked, you convert string controls for MONTHS, DAYS, HOURS to integers (why not use integer controls?)
d... You ADD those offsets to the latest DAT/TIME record, convert it into a TIMESTAMP, and then into a DATE STRING and TIME STRING.
e... Append those two strings to the DATE and TIME arrays, read from the DATE and TIME files.
f... Append the DATE and TIME indicator values to the CDATE and CTIME arrays, read from the CDATE and CTIME files.
g... Stops if the STOP button is clicked.
h... Rewrites the files (using a completely different file path constant, no less).
You'll have to explain what it is that you expect.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-16-2009 01:07 PM
I have to append this data to a file so that it is not forgotten when I exit the program instead it is kept in a file and when the program starts it reads it and displays it.
the files should be reading and writing to the same file.
and what this program does is:
prints to the screen the current and expiration time it does not update it in real time I need it to update it in real time so that when I say the expiration is 2 days 5 hours it should print to screen under current and expiration 4/16/09 2:05PM 4/18/09 7:05.
this is good but I need the time to keep going so that when time is 4/16/09 9:00PM
it will print to screen:
4/16/09 9:00PM 4/19/09 12:05AM
04-16-2009 01:35 PM
I was wondering if you could put an example of this up?
thank you,
04-16-2009 01:41 PM
04-16-2009 01:49 PM
well for that program it does need to update the actual time it is not a count down to expiration.
thank you,
04-16-2009 02:25 PM
I think this is what you want, but your writing makes it very hard to understand what you are trying to accomplish.
I've removed the "Current Time" array since it seems that you always want the Current Time to be the actual, current time for every item in the array.
(Also, I modified the expiration time algorithm per my suggestion in your other thread since otherwise you'll eventually have a problem with year boundaries.)
04-16-2009 02:28 PM
I have tried to put a get time in seconds vi in the front and Of course a timestamp is not a cluster so that did not work what I figured may work is the replace array element vi but I can not figure out how to make this work.
are there example of this? using time as the object?
Thank you,
04-16-2009 02:33 PM