BACnet
This module requires the OPC UA module to be installed and enabled. If the OPC UA module is not installed or is disabled, this module will fault with a warning in the logs and display the state as "Faulted Missing Dependency" on the Platform > System > Modules page.
Ignition provides a driver for BACnet (a data communication protocol for building automation and control networks). The first step before setting up devices and using the driver is to download the module. Go to the Ignition downloads page, then refer to Installing or Upgrading a Module.
The driver implements BACnet/IP over UDP. Any access to devices on other network media types (Ethernet (ISO-8802-3), MSTP, ARCNET, etc.) must be done through a Gateway/router device.
Setup Process​
The process for setting up BACnet differs from other drivers in that you have to first set up a local device. After that you can configure a remote device.
- Set up a local device.
- Set up a remote device.
Creating Tags​
The BACnet driver offers browsing support, making tag creation as easy as dragging-and-dropping from the Tag Browser. However understanding how the OPC Item Path is read by the driver can be useful. Using the example below, there are three important parts of the item path we can identify:
ns=1;s=[MyRemoteDevice]AnalogInput100.Present_Value
- [MyRemoteDevice] is the Remote Device Name
- AnalogInput is the Object Type
- 100 is the Object Identifier
Remote Device Name​
The name of the Remote Device, as known by the OPC server.
Object Type​
The BACnet object type. Currently supported types are:
- Device
- AnalogInput
- AnalogOutput
- AnalogValue
- LargeAnalogValue
- BinaryInput
- BinaryOutput
- BinaryValue
- MultiStateInput
- MultiStateOutput
- MultiStateValue
Ignition supports Elapsed_Active_Time and Time_Of_Active_Time_Reset properties on BinaryInput, BinaryOutput, and BinaryValue objects. These tag types contain an ElapsedActiveTime folder with the properties described in the table below.
Name | Type | Read/Write |
---|---|---|
Elapsed_Active_Time | Long | Writable |
Time_Of_Active_Time_Reset | Document | Read Only |
Object Identifier​
The numerical identifier of the object.
Status_Flags and Document Tags​
The Status_Flags tags on each object return a JSON document, which requires parsing before you can see the values on the flags.
While the individual flags can be accessed by manually creating tags for each flag, in some cases you may want to handle the parsing with an expression instead of creating separate OPC tags. This can easily be done with the jsonGet functions. Assuming an Expression tag was created in the same directory as a Status_Flags tag, we could use the following expression to extract the first bit of Status_Flags (which represents In_Alarm):
getBit(jsonGet({[.]Status_Flags}, 'Value[0]'), 0)
Writing BACnet Null Values​
You can write a None value (via Python) to a tag that's subscribing to an address in a BACnet device.
Writing to Unsupported Objects​
The (system.bacnet.readRaw and system.bacnet.writeRaw) scripting functions allow users to read from or write to any BACnet object or property. Because the functions accept and return types used by the underlying BACnet4j library instead of translating to OPC UA and into types supported by tags, these functions provide access to objects not explicitly supported by the BACnet driver.
Please use caution when interacting directly with any BACnet device, as writing to an object may have unintended consequences and could result in data loss.