From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

updating time in an array

I am trying to update a time array continuously has anyone else done this?

 

example:

 

when I hit the submit button I want all the time array's to update the time

 

right now if I hit the submit button it will add it to the array because of the build array I want it to do this, but I also want it to update all of the indexes with the correct time.

 

thanks

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 1 of 32
(3,096 Views)
Simply do an Initialize Array with the current array size +1 and the current time as the value. Why do you have the Get Date/Time outside the event though?
Message 2 of 32
(3,090 Views)

where should I put that initialize array at?

 

thank you,

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 3 of 32
(3,077 Views)
Wherever you want but since you stated you wanted the submit event to do it, what's wrong with putting it in there?
Message 4 of 32
(3,072 Views)

Yes I see that now lol I geuss I just don't know what to connect the initialize array can you maybe put an example?

 

thank you,

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 5 of 32
(3,052 Views)
I figured it out thanks a bunch
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 6 of 32
(3,046 Views)

See below. The event is not correct and I only did one of the arrays.

 

Initialize Array.PNG

Message 7 of 32
(3,036 Views)
thank you thats exactly what I did
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 8 of 32
(3,033 Views)

I am trying to add another function to add time to the second set of arrays so it will update just as the first set of arrays did but when I hit the submit it dose not add the time to it instead it puts a generic date in

exp:

 

7:00PM 12/31/1903

 

so I want it to add to the initial time

 

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 9 of 32
(3,013 Views)

Your initial time record cluster is all zeroes.  Basically an invalid date.  You are doing some math on that (adding months, days, hours), but that isn't enough to generate a valid date.  (What about years?  What about minutes and seconds?)

 

It is really confusing what you are trying to do here.  It seems like a lot of crazy and unnecessary date manipulation.  Drop some probes or indicators along the different wires you have going through these calculations.  You'll probably find more specifically where your calculations are falling apart.

Message 10 of 32
(3,006 Views)