Bacnet Write Object Property

You can utilize a bacnetWriteObjectProperty() function to write to any writable property on a BACnet point, not just strictly for actions but modifying other properties. FIN can write to any property in an Object, we just need to know which property you want to write to.

bacnetWriteObjectProperty

bacnetWriteObjectProperty(conn, obj, prop, value, priority: Number. <ctor>(16))

Write a BACnet property value

Parameters:

Examples:

// Write the present value
bacnetWriteObjectProperty(@connRef, @pointRef, 85, 1.0)                     //in this case 85 is present value and 1.0 is the value
bacnetWriteObjectProperty(@connRef, "AV1", "present_value", 1.0, 16)        //in this case 1.0 is the value and 16 is the priority array
bacnetWriteObjectProperty(@connRef, "2:1", 85, 1.0)                         //in this case "2:1" is AV1, look at the below functions on how we got this
//priority 16 is default so it can be omitted

Couple useful functions to find objects and properties below:


In the Actions Example 1 below, you have a bacnetWriteObjectProperty() being executed within the actions grid tag of a point where the first two parameters are using the point's own bacnetConnRef & bacnetWrite. See below for proper syntax.

  1. $self->bacnetConnRef = the point's own bacnetConnRef ID

  2. $self->bacnetWrite = the point's own bacnetWrite tag value (aka the point ID i.e.. "AV1")

  3. $val = the value the user will set once the "Set" action is selected

Escaping $

If editing the actions directly via the Point Essentials view, then you want to make sure you escape the dollar sign $ character if not already escaped.

If using the Actions Category Permission tool, don't escape the $ because the tool already does that.

If you do escape it in the tool, it'll add additional backslashes and break the actions. You would then need to edit and re-save to fix them.

Actions Example 1
ver:"2.0"
expr,dis
"bacnetWriteObjectProperty($self->bacnetConnRef, $self->bacnetWrite, toStr(`present_value`), $val)", "Set"
Actions Example 2 - Numeric (string value for present value property)
ver:"3.0"
dis,expr,hvac_finCat
"Emergency Set","bacnetWriteObjectProperty((\$self)->bacnetConnRef, (\$self)->bacnetWrite, toStr(`present_value`), \$val, 1)",9
"Emergency Auto","bacnetWriteObjectProperty((\$self)->bacnetConnRef, (\$self)->bacnetWrite, toStr(`present_value`), null, 1)",9
"Manual Set","bacnetWriteObjectProperty((\$self)->bacnetConnRef, (\$self)->bacnetWrite, toStr(`present_value`), \$val, 8)",6
"Manual Auto","bacnetWriteObjectProperty((\$self)->bacnetConnRef, (\$self)->bacnetWrite, toStr(`present_value`), null, 8)",6
"Set Default","bacnetWriteObjectProperty((\$self)->bacnetConnRef, (\$self)->bacnetWrite, toStr(`present_value`), \$val, 16)",3
"Set Null","bacnetWriteObjectProperty((\$self)->bacnetConnRef, (\$self)->bacnetWrite, toStr(`present_value`), null, 16)",3
Actions Example 3 - Boolean (numerical value for present value property)
ver:"3.0"
dis,expr,hvac_finCat
"Emergency Active","bacnetWriteObjectProperty((\$self)->bacnetConnRef, (\$self)->bacnetWrite, 85, true, 1)",9
"Emergency Inactive","bacnetWriteObjectProperty((\$self)->bacnetConnRef, (\$self)->bacnetWrite, 85, false, 1)",9
"Emergency Auto","bacnetWriteObjectProperty((\$self)->bacnetConnRef, (\$self)->bacnetWrite, 85, null, 1)",9
"Manual On","bacnetWriteObjectProperty((\$self)->bacnetConnRef, (\$self)->bacnetWrite, 85, true, 8)",6
"Manual Off","bacnetWriteObjectProperty((\$self)->bacnetConnRef, (\$self)->bacnetWrite, 85, false, 8)",6
"Manual Auto","bacnetWriteObjectProperty((\$self)->bacnetConnRef, (\$self)->bacnetWrite, 85, null, 8)",6
"Set Default","bacnetWriteObjectProperty((\$self)->bacnetConnRef, (\$self)->bacnetWrite, 85, $val, 16)",3

To execute a bacnetWriteObjectProperty within the actions grid on points, make sure not to have quotations within quotations. If you need to use toStr() instead like we did above IF using property name.

However, we recommend to use the numerical value of the property instead so that the actions appear where ever they may be called.

Writing to Relinquish Default property

The standard BACnet Relinquish Default property is 104. This property can be used to write to hardwired properties on proprietary devices like Johnson controllers. Some devices like Johnson can also utilize property 3113 that once it is written to is permanent (unlike an override). 

You can use a command similar to the above to write to Relinquish Default, see below for exact actions grid used to resolve issue. Its recommended to use 104 since that is the standard property for Relinquish Default. It can be 3113 or the property name "Relinquish_Default". It is also recommended to use the numerical value of the property so that the actions will appear any where the action is available in the build, else if using the name, the actions won't appear in the HTML UI.

Actions - By 104
ver:"2.0"
expr,dis
"bacnetWriteObjectProperty($self->bacnetConnRef, $self->bacnetWrite, 104, $val)", "Set"
Actions - By Name
ver:"2.0"
expr,dis
"bacnetWriteObjectProperty($self->bacnetConnRef, $self->bacnetWrite, toStr(`Relinquish_Default`), $val)", "Set"

Writing to Cov Increment property

If the user wants to be able to modify the Cov_Increment object property on a point, they can do so using the bacnetWriteObjectProperty() func. Use case would be if a customer doesn't want to flood the network on every value change and only see change of value if it exceeds a certain threshold. That is where Cov_Increment property comes into play. This is a property that needs to be configured on the device, not FIN. The device would also need to be able to support COV. However, below is example of how to modify and read this property from FIN in the event the user would want to modify.

Read Cov_Increment property to see current configuration:

  1. Go to folio and run query below with connector id and either point instance or point id.

    1. bacnetReadObjectProperty(@conn_id, "point_instance", "Cov_Increment")

    2. example 1: bacnetReadObjectProperty(@236b97c6-88cdae62, "AV52", "Cov_Increment")

    3. example 2: bacnetReadObjectProperty(@236b97c6-88cdae62, @236b9811-6943ab2a, "Cov_Increment")

Write to Cov_Increment property:

  1. Go to folio and run query below with connector id, either point instance or point id, and value for Cov_Increment.

    1. bacnetWriteObjectProperty(@conn_id, "point_instance", "Cov_Increment", 0.5)

    2. example 1: bacnetWriteObjectProperty(@236b97c6-88cdae62, "AV52", "Cov_Increment", 0.5)

    3. example 2: bacnetWriteObjectProperty(@236b97c6-88cdae62, @236b9811-6943ab2a, "Cov_Increment", 0.5)

To batch apply, the user can use a query below with their point tags of the points they want to modify:

If this doesn't work consider the below: