LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

triggering event by time of day

Solved!
Go to solution

Yes, this is how I have been trying to do it, however it seemed that the array was never empty - there is always some default value displayed on the front panel control, so I could not differentiate between user entered values and default ones. I have just discovered that this is not the case. Even though there are default values displayed on the front panel control, these are not put into the array until the user edits the control. This may make things simpler. I will battle on and see how it goes.

Thanks

 

Bradley Dawson

Science Engineering Workshop

University of New England

Armidale NSW 2351

Australia

 

0 Kudos
Message 11 of 25
(3,039 Views)

After processing each set of timing values, reinitialize the array so it only has default values in it.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 12 of 25
(3,037 Views)

would this work also?

 

0 Kudos
Message 13 of 25
(2,939 Views)

pstew wrote:

would this work also?

 

 


Are you trying to offer another solution to the question?  (It is 9 months old!)

 

I'm not sure what you are trying to do in your VI.  Your adding an elapsed time, which is since the VI started, to a very arbitrary time.  Why 7:14:29.917 pm on Nov 11, 2009?  And then throwing that into several in range and coerce functions where all the controls describing the range are empty.  Even if they did have times in them, they would be for specific dates as well.  So the comparisons are going to be meaningless.

0 Kudos
Message 14 of 25
(2,922 Views)
what I did was have the elapsed time start at the beginning of the event I would set the current time to the time started and the elapsed time would be added to the beginning time. When the day ended, the elapsed time would go back to zero, so the dates wouldn't matter. The four times acted as four different times during the day that the program would be running there was a start and end time. I was just wondering if this solution would work fine, or if it had any problems.
0 Kudos
Message 15 of 25
(2,899 Views)

i forgot to tell you the times would give off a true or false boolean if it was true the program would run if false it wouldn't
0 Kudos
Message 16 of 25
(2,891 Views)

what I did was have the elapsed time start at the beginning of the event I would set the current time to the time started and the elapsed time would be added to the beginning time. When the day ended, the elapsed time would go back to zero, so the dates wouldn't matter. The four times acted as four different times during the day that the program would be running there was a start and end time. I was just wondering if this solution would work fine, or if it had any problems.The program would give off a true or false boolean

 

0 Kudos
Message 17 of 25
(2,863 Views)
Given that you manually set the time constant and have the Elapsed Time function reset at the beginning of the day, yes, it would work.  As Ravens Fan pointed out though, it's not the most elegant solution as you have to manually set and control some of these values.  Look at the solution on the first page for a cleaner and more automatic way of handling the issue.
Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 18 of 25
(2,853 Views)
i am a little confused on how to make that could you send me it
0 Kudos
Message 19 of 25
(2,847 Views)

I realize this thread was solved a long time ago, but it might interest some to know that there's a new feature in LabVIEW 2009 that simplifies this. That's the notion of absolute timing sources for timed structures. For instance, the code below uses a Timed Sequence in a for loop to execute certain code at various absolute times. It's pretty neat stuff.

 

absolute.PNG

Jarrod S.
National Instruments
Message 20 of 25
(2,836 Views)