In the BACnet (Building Automation and Control Networks) protocol, the Weekly Schedule object is used to define time-based schedules for controlling building automation systems. The Time Values within a Weekly Schedule are part of the schedule's data structure, and their datatypes are defined by the BACnet standard (ANSI/ASHRAE Standard 135).
BACnet Datatypes for Weekly Schedule Time Values
The Weekly Schedule object contains a property called Weekly_Schedule, which is an array of seven elements (one for each day of the week, starting with Monday). Each element in this array is a list of Time-Value pairs that define the schedule for that day. The datatypes for the Time Values are as follows:
-
Time:
- The "Time" part of the Time-Value pair is represented using the BACnetTime datatype.
- BACnetTime is a structured datatype that consists of four components:
- Hour (0–23, or 255 for "unspecified")
- Minute (0–59, or 255 for "unspecified")
- Second (0–59, or 255 for "unspecified")
- Hundredths of a Second (0–99, or 255 for "unspecified")
- This datatype allows precise specification of the time of day when a scheduled event occurs. The "unspecified" value (255) is used to indicate a wildcard or "don't care" condition for that component.
-
Value:
- The "Value" part of the Time-Value pair is represented using the BACnetPropertyValue datatype, which is a generic datatype that can hold values of various types depending on the context of the schedule.
- The actual datatype of the "Value" depends on the property being controlled by the schedule. For example:
- If the schedule controls a binary output (e.g., ON/OFF), the value might be a BACnetBinaryPV (Enumerated type with values
INACTIVE (0) or ACTIVE (1)).
- If the schedule controls an analog output (e.g., temperature setpoint), the value might be a REAL (floating-point number).
- If the schedule controls a multi-state output, the value might be an Unsigned Integer representing the state.
- The specific datatype is determined by the
Object_Property_Reference in the Schedule object, which links the schedule to the property it controls.
Example of a Weekly Schedule Time-Value Pair
For a Weekly Schedule controlling a binary output (e.g., turning a light ON or OFF), a Time-Value pair might look like this:
- Time: 08:00:00.00 (8:00 AM)
- Hour = 8
- Minute = 0
- Second = 0
- Hundredths = 0
- Value:
ACTIVE (1) (indicating the light should turn ON)
Another example for an analog output (e.g., setting a temperature setpoint) might look like this:
- Time: 18:00:00.00 (6:00 PM)
- Hour = 18
- Minute = 0
- Second = 0
- Hundredths = 0
- Value: 22.5 (indicating a setpoint of 22.5°C)
Summary of Datatypes
- Time:
BACnetTime (structured datatype with Hour, Minute, Second, Hundredths).
- Value: Depends on the property being controlled, but commonly includes:
BACnetBinaryPV (for binary properties).
REAL (for analog properties).
Unsigned Integer (for multi-state properties).
- Other BACnet datatypes as needed (e.g.,
Enumerated, BOOLEAN, etc.).
Reference in the BACnet Standard
The definitions for these datatypes and the Weekly Schedule object are found in the BACnet standard (ANSI/ASHRAE 135), specifically in the sections covering:
- Clause 12.25 (Schedule Object Type).
- Clause 19 (BACnet Application Services).
- Clause 21 (Formal Description of Application Protocol Data Units, including datatypes like
BACnetTime).
If you are implementing or working with BACnet schedules, ensure you refer to the latest version of the standard for any updates or additional details.