BACnet WriteProperty Service

WriteProperty is BACnet's core write service (Clause 15.9): how a write works, priority for commandable objects, the error codes it returns

What WriteProperty Is

WriteProperty is the fundamental write operation in BACnet, defined in Clause 15.9 of ANSI/ASHRAE 135-2024 as one of the object-access services. A client uses it to change the value of one property of one BACnet object. It is a confirmed service: the device replies with a simple acknowledgment on success, or an error naming why the write was refused.

It is the counterpart to ReadProperty. Where reading is nearly universal, writing is selective: many properties are read-only by design, and a device is free to refuse a write it does not permit.

How It Works

The client sends the target object, the property, the new value, an optional array index for array properties, and an optional priority. The device validates the request and either applies the change and returns success, or returns an error. Priority matters only for commandable objects such as an Analog Output: the write lands in one of 16 priority slots rather than overwriting the value directly, and the highest active priority wins. A write with no priority defaults to 16, the lowest. Writing Null at a priority relinquishes that command. On a non-commandable property the priority is ignored.

Where You’ll See It

  • Setpoint and parameter changes. An operator adjusting a setpoint from the head end (the central BMS server), or a supervisory controller writing a reset value to a field controller.
  • Commands and overrides. Forcing an output on or off, then releasing it, is a WriteProperty of a value followed by a WriteProperty of Null at the same priority.
  • Configuration. Writing names, limits, or notification recipients during commissioning, where a refused write usually means the property is read-only on that device.

WriteProperty Error Codes

Clause 15.9 defines the error class and code a device returns for each failure. The general error model lives in Clause 18 of the standard.

SituationError classError code
Specified object does not existOBJECTUNKNOWN_OBJECT
Specified property does not existPROPERTYUNKNOWN_PROPERTY
Array index provided but the property is not an arrayPROPERTYPROPERTY_IS_NOT_AN_ARRAY
Array index greater than the current array lengthPROPERTYINVALID_ARRAY_INDEX
The value would resize the array to an unsupported sizePROPERTYINVALID_ARRAY_SIZE
The property is not currently writable by the requestorPROPERTYWRITE_ACCESS_DENIED
The value’s datatype is wrong for the propertyPROPERTYINVALID_DATATYPE
Writing Object_Name to a name already in usePROPERTYDUPLICATE_NAME
Writing Object_Identifier to an id already in usePROPERTYDUPLICATE_OBJECT_ID
The value is outside the range the property allowsPROPERTYVALUE_OUT_OF_RANGE
Not enough space to store the new valueRESOURCESNO_SPACE_TO_WRITE_PROPERTY
The datatype is not supported by the propertyPROPERTYDATATYPE_NOT_SUPPORTED
The encoding is not valid for the property’s datatypePROPERTYINVALID_DATA_ENCODING
The priority is not in the range 1..16SERVICESPARAMETER_OUT_OF_RANGE

Reading these in the field:

  • WRITE_ACCESS_DENIED is the most common: the property is read-only on that device (many Present_Value properties are, unless the object is commandable or Out_Of_Service is set). It is not a permissions bug to chase; the property simply cannot be written this way.
  • VALUE_OUT_OF_RANGE and INVALID_DATATYPE usually mean the client sent the wrong type or units, for example an integer where the property wants a Real.
  • No response at all is not a WriteProperty error. A timeout is a transport or addressing problem, not an object problem.

Profiles That Require It

WriteProperty is required by nearly every profile except the read-only ones. Answering writes (DS-WP-B) is required of controllers, actuators, and any device meant to be commanded or configured; sending writes (DS-WP-A) is required of operator and client profiles. The exceptions are pure-sensor profiles: B-SS (Smart Sensor) requires only ReadProperty and has no write requirement.

DirectionRequired byProfiles (examples)
Execute (accept a write)DS-WP-BB-BC, B-AAC, B-ASC, B-SA, and the advanced controllers
Initiate (send a write)DS-WP-AB-OD, B-OWS, B-AWS, and controllers acting as clients

What Chipkin Provides

The CAS BACnet Stack supports WriteProperty in both directions, including full priority-array handling for commandable objects. Talk to us about adding BACnet client or server support to your device.