In the last OptoNews we talked about using date and time in PAC Control. (If you haven't seen the post, be sure to check out its links to useful resources.)
Meanwhile, Opto 22 customer Philip Spigelmire was busy writing a scheduling subroutine for his HVAC system. His subroutine handles:
- Recurring events based on day & time
- Special events
- Events based on sunrise and sunset
One of the most interesting things Philip's subroutine does is to store all the data for one schedule in a string, rather than storing data points in separate integers. This way all his schedules are in one string table.
As he points out, this means the string must be strictly defined and parsed by the strategy. A subroutine makes the job easier.
Check out Philip's blog post for details of the string's construction and the subroutine. You can also download the subroutine, plus a second subroutine that gets sunrise and sunset times from an astronomical clock.