adccommunitymod (AutomationDirect) asked a question.

Schedules for use in Building Automation

Created Date: May 09,2016

Created By: kelvin.proctor

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

Hi Folks, I'm going to be using a P2000 for a building automation system I'm creating. I'm wondering if there is anyone on the forums who has had to deal with daily / weekly schedules in a P2000 who would be prepared to share some advice on how this was done? My current thinking is to use arrays to represent each schedule. Luckily I don't think I'll need to schedule anything to come on or off with more than half hour granularity. I'm therefore looking at either a 1x48 array for a daily schedule or a 7x48 array for a weekly schedule. I'll then use index addressing to pull out the appropriate values. For digitals this will work nicely, for analogs I might apply a continuous running average block to implement some smoothing. To make the SCADA interface sane (and keep the point count down) I'm looking at just having a single set of tags to edit each type of schedule and another tag to identify which schedule is being edited and use appropriate array copy functions to copy to / from the memory area used for the SCADA interface depending on which schedule is selected for displaying / editing. Is this the best approach or are there other ways people would recommend? Regards, Kelvin


  • adccommunitymod (AutomationDirect)

    Created Date: May 09,2016

    Created by: kelvin.proctor

    Hi Folks,

    I'm going to be using a P2000 for a building automation system I'm creating.

    I'm wondering if there is anyone on the forums who has had to deal with daily / weekly schedules in a P2000 who would be prepared to share some advice on how this was done?

    My current thinking is to use arrays to represent each schedule. Luckily I don't think I'll need to schedule anything to come on or off with more than half hour granularity. I'm therefore looking at either a 1x48 array for a daily schedule or a 7x48 array for a weekly schedule. I'll then use index addressing to pull out the appropriate values. For digitals this will work nicely, for analogs I might apply a continuous running average block to implement some smoothing.

    To make the SCADA interface sane (and keep the point count down) I'm looking at just having a single set of tags to edit each type of schedule and another tag to identify which schedule is being edited and use appropriate array copy functions to copy to / from the memory area used for the SCADA interface depending on which schedule is selected for displaying / editing.

    Is this the best approach or are there other ways people would recommend?

    Regards,

    Kelvin

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: May 10,2016

    Created by: Lloyd M

    Hi Kelvin/All

    Firstly, I wish C-More have a time schedule function!

    I have implemented a time schedule function using C-More with Do-More. The customer was not interested in any kind of a SCADA implementation.

    So food for thought…. On Time Schedules….

    The design is based upon time intervals – START and END times.

    START and END time are really START HOUR (0-23) and START MINUTE (0-59), END HOUR (0-23) and END MINUTES (0-59).

    Convert the START and END time values to STARTMIN and ENDMIN values.

    START HOUR X 60 + START MINUTE = STARTMIN (0-1440)

    END HOURS X 60 + END MINUTE = ENDMIN (0-1440)

    Convert the current hour and minute values in Do-Mode to CURRMIN ( 0 -1440)

    Ladder Logic:

    ((STARTMIN to be EQUAL TO CURRMIN) OR (STARTMIN to be GREATER THEN CURRMIN))

    AND

    ((ENDMIN to be EQUAL TO CURRMIN) OR (ENDMIN to be LESS THEN CURRMIN))

    OUTPUT

    Interval Status flag (IntStat##)

    6. The Interval Status C Register Flag is then TRUE at the beginning of the first minute of the START time and remains TRUE until the end of the last minute of the END time.

    7. I programmed 64 intervals using indexed look-ups on the screen in C-More to allow programming of all intervals from one screen. I did allow the user a 30 character label for each interval.

    8. I force interval #00 to 00:00> 00:00 (always off) and interval #63 to 00:00> 23:59 (always on)

    9. I mapped the 64 single bit interval status registers to two 32 bit registers.

    10. The design has 16 time schedules. The time schedules have the standard seven days of the week cycle. Additionally, the user can preprogram 32 dates to override the standard day of the week (0-6) to one of three holiday days. So in reality the time schedules are a ten day cycle.

    11. The user can assign up to four intervals for each of the ten days. My customer has used the multiply cycle per day but only every two intervals…. So four may be over kill…

    12. My next generation of Time Schedules will have 16 days to the week. Allowing for 6 shift schedules, and increase the 32 override dates to 96.

    13. IF THE C-MORE DESIGN TEAM I S READING THIS …. It would be good if the schedule override dates could be logical… Not just a hard date… IE. 3 RD Monday of the Month, Last Monday of the Month …… To address worldwide requirements with this logic you need 1 st , 2 nd , 3 rd , 4 th , 5 th , Last, 2 nd Last, 3 RD Last, 4 th Last for M/T/W/T/F/S/S…. 63 options.

    14 I have also programmed additional inputs / C-More buttons to override the schedule statu

    Force On Trigger Pulse – Force Schedule ON until next ENDMIN

    Force Off Trigger Pulse – Force Schedule OFF until next STARTMIN

    Force On – Force Schedule ON when active

    Force Off – Force Schedule OFF when active

    You could likely skip the 0 to 63 interval function and just have two interval for each day of the schedule cycle.

    The 0-1440 logic did workout to be the simplest programming..... I think.

    Hope this helps....

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: May 14,2016

    Created by: kelvin.proctor

    Hi Lloyd,

    For digital signals such as lighting schedules I had been thinking of ON-OFF times, but had no thought of the tricking of having multiple 'named ' schedules and the facility to have a bitmask to add them together for a single end-use circuit that needed to be controlled. That's a really good trick and makes that approach much, much more flexible. If needed I could add more esoteric features such as blackout schedules where the user can't override etc...

    For analogs (such as temperature setupoints) I think I'll probably just stick to the array of half-hour values, but may use a indexing trick (as opposed to bitmasking) to assign the appropriate schedule to the appropriate heating zone etc...

    Thanks for the help.

    Cheers,

    Kelvin

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: May 14,2016

    Created by: Lloyd M

    I like the override blackout......