LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

24 hr timer

I've been trying to solve this problem for about a week. I know for some of you that this might be simple. Ok...here goes.

 

I can get the current time very easily. However, how do you make a timer that turns on the virtual LED at a specific time. Example: 8am. And Switches off at another specific time. Example: 11pm.

0 Kudos
Message 1 of 5
(2,625 Views)

paem,

 

This can be done in several ways.  The choice may depend on what else the program is to do and how the user will interact with it.

 

The basics consist of a loop which reads the current time and compares it to the specified time(s) to turn on or off.  It will also have a delay so that the program does not consume all available CPU resources.

 

Please post what you have tried so far along with an indication of what does not work about it.

 

Lynn

0 Kudos
Message 2 of 5
(2,618 Views)

Depending on what you want to do, you can probably use the in range and coerce function to take care of the comparison in one node, as long as you set up the upper and lower limits properly. As was suggested, post what you have and people can help you more easily.

0 Kudos
Message 3 of 5
(2,613 Views)

This is what i have currently.

0 Kudos
Message 4 of 5
(2,581 Views)

@paem wrote:

I've been trying to solve this problem for about a week. I know for some of you that this might be simple. Ok...here goes.

 

I can get the current time very easily. However, how do you make a timer that turns on the virtual LED at a specific time. Example: 8am. And Switches off at another specific time. Example: 11pm.


range your case structure to the 24 hour format...Example_VI_BD.png

 

also, "timer for lights"...sorry for reviving this post!

0 Kudos
Message 5 of 5
(2,544 Views)