LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[Labview 8.2] set date/time front panel control?

I have been tossed into labview programming at my new job so please bear with me.

I need to make a scheduler to start a sequence of events at a set date and time.  I think I have a way to start it all using the ElapsedTime sub-VI, however I can't find an easy way to get the 'set start time (s)' value.  Is there a front panel object that will take a user input for a date and time and convert it to seconds?  All that I could find was the month calender object.  My only other idea is to use a string input and parse it to a timestamp and then convert that to seconds.  The problem I see with that is that one missed character in the string could give an inaccurate time.

Or am I going about this all wrong?

Thanks
Andy

P.S.  first post, sorry if it isn't up to par.
0 Kudos
Message 1 of 3
(3,005 Views)

If you have a timestamp control, you can click its browse button to select a specific date and time. You can then convert it to a DBL using the To DBL primitive (found in the Programming>>Numeric>>Conversion palette).

I didn't look at it carefully, but there are some other issues with your code, the one which stands out most being the ubiquitous use of the Value (Signaling) property. For most controls, there is usually no need to set their value anywhere else other than in the terminal, and in any case, a local variable is usually better than a value property.

To learn more about LabVIEW, I suggest you try looking at some of these tutorials.


___________________
Try to take over the world!
0 Kudos
Message 2 of 3
(2,992 Views)
Oops, I didn't realize that there were more controls than what showed up by default on the right click menu.  That is exactly what I have been looking for.

I inherited this program from someone who was not a programmer and it took me a couple days just to figure out what was going on.  There is about 5 screens worth of code that needed to be cleaned up just so that I could follow the wires.  I guess I've just started using his methods of programming, without checking to see if there was a better way.

Thank you so much for the tutorials.  That will give me something to do for the next few days while I'm supervising my rig.

Andy
0 Kudos
Message 3 of 3
(2,987 Views)