--- title: "system.bacnet.writeWithPriority" description: "Write to the Present_Value attribute of an object with a custom priority level." --- # system.bacnet.writeWithPriority > Write to the Present_Value attribute of an object with a custom priority level. This function is used in **Python Scripting**. ## Description :::note To use this function, the [BACnet](ignition-modules\opc-ua\opc-ua-drivers\bacnet\bacnet.md) driver must be installed. ::: ## Client Permission Restrictions This scripting function has no [Client Permission](ignition-modules\vision\vision-project-properties\vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.bacnet.writeWithPriority(deviceName, objectType, objectId, value, priority)` ### Parameters Type | Parameter | Description ------- | ------- | ------- String |`deviceName` | The name of the configured BACnet/IP device instance to write from. Integer | `objectType` | The numeric id of the objectType of the object instance being written to. See the objectType Reference table below. Integer | `objectId` | The object instance number to write to. Object |`value` | The value to write. Clearing a value can be accomplished by writing a None value. Integer | `priority` | The priority level to write the value at. Must match a level in the standard BACnet priority array (a value from 1 to 16). See the Priority Reference table below. ### Returns Nothing ### Scope Gateway, Perspective Session ### objectType Reference |Object|ID| |---|---| |Analog Output|1| |Analog Value|2| |Binary Output|4| |Binary Value|5| |Device|8| |Large Analog Value|46| |Multi-State Output|14| |Multi-State Value|19| ### Priority Reference |Level|Application| |---|---| |1|Manual-Life Safety| |2|Automatic-Life Safety| |3|Available| |4|Available| |5|Critical Equipment Control| |6|Minimum On/Off| |7|Available| |8|Manual Operator| |9|Available| |10|Available| |11|Available| |12|Available| |13|Available| |14|Available| |15|Available| |16|Available| ## Code Example ```python title="Example" # Write a value of 'True' to Binary Value 1 with a Priority of 7. deviceName = 'BACnet Remote' objectType = 5 # Binary Value objectId = 1 value = True priority = 7 system.bacnet.writeWithPriority(deviceName, objectType, objectId, value, priority) ```