How do I make and event happen at a set time each day
julian
Junior Member
Hi i am looking to use the onboard clock to make an event happen at a set time ie. turn projector on a 8am and switch off again at 11pm.
Comments
-
NetLinx Keywords Help wrote:
TIME
This system variable holds the current time as a string in the form "hh:mm:ss".
The time is represented in 24-hour format.NetLinx Keywords Help wrote:
TIME_TO_HOUR
Returns an integer representing the hour portion of a time string.
TIME_TO_HOUR (TIME) will give you the current hour. -
An easy way to trigger the event is to use DEFINE_PROGRAM
DEFINE_PROGRAM IF (TIME == '23:59:59') { // do something } -
An easy way to trigger the event is to use DEFINE_PROGRAM
DEFINE_PROGRAM IF (TIME == '23:59:59') { // do something }
Another thing to remember that it will be 23:59:59 for several thousand program cycles.
It might be a good thing to put a trap in it as well.if(time=='23:59:59 and do_it_flag=0) { do_it_flag=1 // do something wait 15 { do_it_flag=0 } }
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums