Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • IF nowBlock + timeBlock add (use timeToTimeAdd block) to scheduleNextTime + timeBlock are inRange of min=0 and max=1 AND scheduleCurVal is UnOccupied, then set storedScheduleTime to scheduleNextTime + timeBlock. (We are getting the current time and schedule time from the dateTime format and adding them up. If they are within range and schedule curVal is Unoccupied, store the current schedules time. Reason we want to store the schedule time is because once the schedule time is reached, it changes to the next time, which would no longer be useful. So we capture the time before it changes.)

Heating and Cooling Degree Days with weatherRefs

Here is an example to evaluate Heating Degree Days (HDD) and Cooling Degree Days (CDD) using weather information base on the specific site.

Degree days are evaluates as the difference between the daily temperature mean and 65°F (18 °C). If the temperature mean is above 65°F, we subtract 65 from the mean and the result is Cooling Degree Days. If the temperature mean is below 65°F, we subtract the mean from 65 and the result is Heating Degree Days. , The daily temperature mean is calculated dividing by two the sum of high temperature and low temperature. 

  1. Firstly, the user will set the desired location using the Weather app, following this guide.
  2. Then the user has to set into the DB Builder the weatherReference tag on the site to which the equip that will be the target of the logic belongs.
    In the suggested refs he will find the locations previously set up in the Weather app.
    Image Added
  3. Download the below program file and upload it into your project
    View file
    nameheatingCoolingDegreeDays.zip
    height250
  4. Open the program into the Logic Builder, set the correct "programOn" and binding the variables based on your specific project. The logic looks like the image below:

           Image Added


N.B.

  • HDD and CDD in this example have been evaluated based on the today max temperature and today min temperature. The user can change this input replacing the blocks about weatherInfo into the logic.
  • Reference for HDD and CDD into the logic example is °F. If the user has temperatures given in °C, he has just to replace the value 65 in the "cmpG