CXS BACnet Application Generator namespace tutorial

Uncovering the secrets of using namespaces:

The CXS BACnet Application Generator is a tool to scan building automation BACnet networks and create the corresponding client side configuration automatically for these systems:

  • Wonderware System Platform
  • Wonderware InTouch
  • OPC
  • OPC UA

In this tutorial I will describe the different options and strategies on how to efficiently import the data and structure into the Wonderware System Platform Galaxy and how to leverage naming conventions to create a rich model.

Prerequisites:

  • CXS DASBACnet DI objects are imported into the Galaxy
  • Optional: ConneXSoft or your own BACnet application object base templates are imported into the Galaxy

The default namespace

Lets start with a simple example using the default setting of the CXS BACnet Application Generator with no custom namespace configuration. The custom namespace settings are found under Tools->Namespace Settings: 

The key definitions and maps don’t have any entries for the default namespace.

Let’s use a simple small BACnet scan to create the default model:

Example 1:

Click “Generate” and select the standard options for creating and updating.

 

This creates all required templates and the following simple model:

Adding a WinPlatform and AppEngine instance creates a complete application that can be deployed and executed. The default structure is:

MainBACnetArea->Device->Object

while the DI objects have their separate area.

Note:
You can now create a more adequate model by manually introducing additional areas and just uncheck the CXS BACnet Application Generator option: “Update hierarchical model” in the generate BACnet objects dialog to not move all your objects back when re-generating/updating with the CXS BACnet Application Generator.

But in this tutorial we intend to utilize the naming conventions.

Automatic Area Generation (Generic Mode)

When looking at the device and object names we see a simple pattern: L<no>B<no>DevName and F<no>R<no>ObjName. Obviously this is a very simple pattern representing L for location, B for building, F for floor and R for room. there are many naming conventions and each system integrator uses a different one. But let’s use this simple example to understand the logic. We create sections in the name of devices and objects representing areas:

Now our device namespace settings look like this:

and the objects namespace settings:

When generating the model for the Wonderware System Platform from the same namespace as before we get this result now:

As we can see the model is much more detailed with additional areas generated from defined template sections in the names of devices and objects. It is important to note that device templates need to be derived from the $Area template in order to be able to insert areas between devices and objects. If you are not using your own templates then the CXS BACnet Application Generator will create the correct type of device templates automatically for you.

Another important point is that all device and object descriptions for visualization and display purposes are set inside the object attributes. So the end user gets additional information and not only cryptic names.

This method of automatically generating area names from sections in the devices and objects names is called the generic mode in the CXS BACnet Application Generator terminology. In some cases it might be desirable to translate these abbreviations to more human readable names:

Automatic Area Generation (Explicit Mode)

The explicit mode allows mapping of sections in area or container names in the devices and objects names to descriptive names. We use the tables in the namespace configuration to create entries performing these mappings:

Devices area key map:

Objects area key map:

Generating the namespace with these settings creates this model:

Areas have explicit names now providing a much more intuitive model navigation. If you check:

  • Use mapped names in device names and/or
  • Use mapped names in object names

you also expand the device and model names. However, this requires rather short mapped names, since the mapped strings need to be concatenated just as the original section to preserve uniqueness.

Automatic Container Generation

Creating containers from namespace information is a very complex matter. The difficulty is that the container object doesn’t really exist as a separate entity in the BACnet namespace. So you  need a key in the name to identify the container and to group the contained objects under it The CXS BACnet Application Generator provides both modes generic and explicit modes for containers. In order to distinguish between these modes you can configure the default container template.

Generic container generation mode

If the default container template checkbox is checked an object namespace string like this:

<Area[3]><Area[3]>????<Container[4]> 

would create a container for any name with a minimum length of 14 characters and put all objects starting with these 14 characters into this object as contained objects. This is only practical if your naming convention has been defined to have longer names for containers and contained objects. This is a rather rare case but if it fits you have a very powerful container creation mechanism with minimal configuration effort.

Explicit container generation mode

In most cases only very specific keys should create containers. So we use the explicit generation mode. In this mode only containers with entries found in the container key map are created. In addition you can define which template is being use for each key to create the derived container instance.

Let’s take this new namespace example:

Example 2:

Here we see 3 new objects with a key HVAC at distinct positions (just a small example of a simple HVAC with a temperature set point, temperature sensor and fan).

Using this namespace definition (this also demonstrates using a global area):

We generate this model:

We see the F02R01AirCond container with the 3 contained objects …Fan, …TempIn, …TempSet. In this case the CXS BACnet Application Generator created the $HVAC_SE base template automatically but you certainly can use existing container templates.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *