Archive for the 'BACnet' Category

CAS BACnet Explorer – What data type do I use to write to a binary output.

Normally a binary output will uses a BACnetBinaryPV(ENUMERATED) data type for the present value. The enumeration has one of two values 0=inactive, and 1=active.


BACnetBinaryPV ::= ENUMERATED {
inactive (0),
active (1)
}

In the CAS BACnet Explorer you will set the data type to “ENUMERATED” and the data value to either “0″ or “1″.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

CAS BACnet Explorer – Quick start video

http://www.youtube.com/watch?v=nQZPZ8bnm84

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

CAS BACnet Explorer – License FAQ

One License = 2 keys

1x USB Key

Simply move this key from computer to computer to use our software on a new computer. Customers who purchase our software are provided with a USB key. In some cases we provide USB keys for evaluation purposes – ask.

By the way, for those purchasing license packs, our current policy is to ship 1 extra USB key for each 5 licenses purchased. We intend the 6th USB key as a spare.

1x Soft Key

Exists for two reasons:

1) Allows you to use the software before the USB key arrives.

2) Provides a backup to you should you lose your USB key.

This key is tied to an email address because it is emailed to that email address.

When you do not have the USB key inserted, the software looks for the soft key. If it can’t find one then it asks you to activate the key. You complete a screen with the licensed email address (we are happy to change the email on record if you notify us). We email the key to that email address. You copy and paste the key and the software is activated.

If you want to use the software on a different computer and you don’t have the USB key then you have to re-activate the software on the 2nd computer.

Do Licenses Expire ?

No. Full / purchased licenses never expire. Demo and evaluation licenses do expire. Once purchased, you can continue to use the software as long as you like.

What is the Service Agreement ?

We add new features and improve our software all the time. You can download newer versions of the software and use the newer versions. When you purchase the software you can download newer versions for a limited time period of 1 year after the date of purchase. After that time has passed you cannot activate newer versions but you can continue to use the version you are using for an indefinite period. Some customers choose to extend this period of time by purchasing a Service Agreement. If you purchase a 1 year agreement you are extending the default period by a year. Thus you can download and activate any newer version that we release during the 24 months that start ticking on your purchase date.

Free Licenses

If you purchase a FieldServer (communications protocol gateway eg. Lonworks/Modbus to BACnet) and if the gateway is for a BACnet project we include a FREE full license as part of the deal.

What happens if I damage/lose my USB Key ?

Contact us. We look after our customers.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

How to change the default BACnet port (47808) in CAS BACnet Explorer

Question: How to change the default BACnet port (47808) in CAS BACnet Explorer?

Answer: You can change the default BACnet port for CAS BACnet Explorer in the settings dialog. The default BACnet port is  47808 or 0xBAC0 (HEX)

Note: You can change the default port that wireshark uses to detect and decode BACnet messages. See this artile for more information Monitor any port using any protocol with Wireshark

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

CAS BACnet Explorer USB/Software activation problems

Some common problems with activating CAS BACnet Explorer with the USB or Software product keys. This article is based off of CAS BACnet Explorer v2.01aH

Software product key

Err #3: invalid product key. Please request a new product key

The software key is long and complicated, do not try and type it in manually. Instead you should copy and past it in to the licence dialog from your email. It should be all capital letters and numbers. no spaces, no special characters, or line brakes. If you copied the product key incorrectly you will get an error message dialog like this.

Try again to copy the product key from your email, ensure that you copy it exactly with no spaces or line feeds.  If this error message continues then contact support.

Err #5: this Key is not for this user. check the email address and try again.

The software product key is tied to your email address. You must use the same email address that you use to request the product key from to activate the product key.

Err #8: Invalid product key. Please request a new product key

Check the date and time on your computer, if your current date/time incorrect it could cause this error.

Reset your date/time to the current time and try again.

Err #9: Invalid product key. Please request a new product key

Err #9: Invalid product key. Please request a new product key

This error message could be caused by a few different scenario.

  • If you are try to activate an old product key that you have already used.
  • If  you are try to activate an product key that has expired

Request a new product key from within CAS BACnet Explorer and attempt to activate CAS BACnet Explorer again.

Err #11: This key is not for this computer

Err #11: This key is not for this computer

The Software key is tied to the computers MAC address it was requested from. If you request a key from one computer and try to activate it on anther computer it will give you this error message.

You must request the key from within CAS BACnet explorer on the computer that you intended to use it on.

Hardware USB product key

The hardware USB product key resolves a lot of the problems and frustrations that are caused by the software product key.

Do you have the correct activation key for CAS BACnet explorer?

The product key should be semi transparent green with the words “ROCKEY4ND” written on the side of it. If your product key looks like something else it probably for a different product.

When the USB key is plugged in correctly,  a green LED should illuminate in the end of the USB key.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

How do I reset CAS BACnet Explorers settings to the defaults

Question: How do I reset CAS BACnet Explorers settings to the defaults

Answer:

Delete the settings.xml file found in your computers documents folder.

C:\Users\<user>\Documents\CAS BACnet Explorer\Settings.xml

The settings and debug files for CAS BACnet Explorer are saved in to your computers documents folder.

  • Settings.xml – This is the main settings file, Delete this file to reset CAS BACnet Explorer back to defaults.
  • Debuglog.txt - This files contains debug and running information that is useful when tracking down bugs in CAS BACnet Explorer. This file is cleared every time the CAS BACnet Explorer is launched.
  • mstp_log.txt – This file contains the most recent session of MSTP traffic. This file will only be available if the last session had BACnet MSTP enabled. This file is cleared every time the CAS BACnet Explorer is launched.
  • packets.pkt - This file contains the most recent session of Ethernet/IP traffic. This file will only be available if the last session had BACnet IP or BACnet MSTP enabled. This file is cleared every time the CAS BACnet Explorer is launched.
  • dump.txt – This file contains a TEXT version of the BACnet tree from your last session. This file is overwritten at the end of every session.
Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

Broadcast traffic is being blocked on my network, Can I still use CAS BACnet Explorer?

Question: Broadcast traffic is being blocked on my network, Can I still use CAS BACnet Explorer?

Answer:

Yes, but with some restrictions.

The BACnet discovery uses two services – called ‘Who-Is’ and ‘I-Am’ these messages rely on the use of broadcasts. Without the ability to send broadcast messages on a network, CAS BACnet Explorer will not be able to do the initial discovery of objects.

Once a device or objects has been added to CAS BACnet Explorer it no longer uses broadcasts messages to communicate with it. You should be able to poll a device for its object list and read/write its objects properties.

You can add BACnet objects and devices to CAS BACnet Explorer manually from the discover dialog.  You will need to know some of the devices settings. Network type, IP/MAC address, network, Device instance, Object type, Object identifier.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

Chipkin BACnet Explorer set the max master

To change the CAS BACnet explorer MSTP MaxMaster.

1) Open the settings file with notepad. The settings file is stored in of two places

C:\Users\<username>\Documents\CAS BACnet Explorer\Settings.xml
C:\Users\<username>\Documents\CAS BACnet Explorer (beta)\Settings.xml

2) Find the iMSTPNmaxMaster value

<key name=”iMSTPNmaxMaster” value=”127“/>

3) Change the value to a number between 1-254. Note: 255 (OxFF) is reserved for broadcasts.

From the BACnet Spec:

This parameter represents the value of the Max_Master property of the node’s Device object. The value of Max_Master specifies the highest allowable address for master nodes. The value of Max_Master shall be less than or equal to 127. If Max_Master is not writable in a node, its value shall be 127.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

Modbus/TCP to BACnet/IP Configuration Sample

This example FieldServer configuration illustrates a config which reads data from a Modbus/TCP device and makes the data available as BACnet data. A remote BACnet client can read and write points.

Relationship between a connection, node and Map Descriptor for a client

The name of the connection/adapter is used to form the relationship between the connection and the node. Here the name ‘N1’ is used in common. This means that when messages are sent to the node called PLC_01 (Node Address=1) they will be sent using connection N1.

As the FieldServer processes each task (Map Descriptor) it needs to know which device or node to send the message to. The name of the Node is used to form the relationship. For example, the task to read address 40001 is defined for Node=’PLC_01’. Now the FieldServer looks for a node with the same name. When it finds it, it then known which connection to send the message on. In this example, it also finds the IP address of the node. So now it knows to send a read holding register message to the device with device address = 1 at IP Adrdess 192.168.1.82 using Network connection N1.

img1

Relationship between a connection, node and Map Descriptor for a Server

For a server, it is not necessary to form a relationship between the connection and the node. What does it mean when a node is not related to a connection? Let’s say you define the same protocol on two connections (eg N1 and N2 – not all FieldServer’s have both) but you want to use the same server node to respond to messages that arrive on connection N1 or N2. By leaving the relationship between a connection and a node undefined (like this example), this becomes possible.

For a server, Map Descriptors may be thought of as server data object definitions. They must be related to a node. When a request for data from node 11 (like this example) is received, the driver must find a matching server node in the config. Once a matching node is found, the FieldServer must find a data object definition that matches the request. Thus, a relationship between the node and the Map Descriptor must be established. This is done by using a common Node_Name as illustrated by the green line.

img2

What connects two protocols together?

The Data Arrays connect protocols. The client reads data and stores it in a data array. The server serves data, extracting it from the Data Array and serving the data using a different protocol. Some data scaling or rearrangement may be required. FieldServer provides tools to move, reorganize, do arithmetic and scale Data Array data. In this example the relationship is direct.

In this diagram the pink and purple lines show how client side data read using Modbus is served as BACnet Data.

img3

The Client read 20 data items from register 30001 and stores the data in DA_Ana_Inputs starting at offset zero.

This means DA_Ana_Inputs[0] contains the value of register 30001.  DA_Ana_Inputs[1] contains the value of register 30002.  DA_Ana_Inputs[2] contains the value of register 30003.

The server Map Descriptor named ‘AnaInput01’ serves data extracted from the Data Array named ‘DA_Ana_Inputs’ offset 0. Thus the data it serves correlates to register 30001.

The server Map Descriptor named ‘AnaInput02’ serves data extracted from the Data Array named ‘DA_Ana_Inputs’ offset 1. Thus the data it serves correlates to register 30002.

The server Map Descriptor named ‘AnaInput03’ serves data extracted from the Data Array named ‘DA_Ana_Inputs’ offset 2. Thus the data it serves correlates to register 30003

A similar discussion applies to the other data.

If the client goes offline or the data cannot be read because of some error then the age of the data increases. At some point the data becomes too old to serve in which case the FieldServer marks the data as unreliable.

Data Arrays

Data Arrays are used to store data. Select Data_Formats that are suitable for the data. FieldServers can store 1,8,16 and 32 bit data, signed and unsigned as will as floating point data. A few other formats such as packed_bits and packed_bytes allow binary data to be easily packed/unpacked. In addition using special functions data can be moved from one location to another. During the move, data formats can be changed and arithmetic can be performed.

Data arrays use FieldServer memory but the length does not affect the point count.

img4

Scaling

A value can be scaled before it is served. In this example, the value served will be 100 times smaller than the value found in the Data Array. Read the config as follows; When a value of 0-10,000 is extracted from the Data Array it will be served to the remote node as a value between 0-100.

img5

Modbus Client

No more than once per second (Scan_Interval) read (Function=RDBC which means read continuously) 20 (Length) input registers starting at address 30001 (Address) and store the returned data in DA_Ana_Inputs[0..19]. For this protocol the Map_Descriptor_Name serves only a descriptive purpose – it is not used by the protocol.

There are three other similar tasks. Each reads a different data type and stores it in a different location.

img6

BACnet Server

The BACnet device instance has been set to 11. (Node_ID).

12 Data objects have been defined. Each is defined by a single map descriptor. The unstated length of each map descriptor is 1 (default value for this protocol.). That means each map descriptor defines a single BACnet data object. The object type and instance numbers are defined by Data_Type and Object_ID. They do not have to be sequential.

The MapDescriptor name is used as the BACnet Object Name. When a remote client reads from this server it will find objects named ‘AnaInput01’, ‘AnaInput02’, etc…

The Virtual BACNet device will be allocated to the Local Network. (Network zero). There are methods to change this default allocation.

A parameter called ‘Relinqush_Default’ tells the driver what value to set the object to if it is not being commanded by a remote device and if it is not being read from a remote device. It is required for output types and the typical value is zero.

The function is set to server meaning that these map descriptors are capabilities as opposed to tasks. The FieldServer does no active work based on these Map Descriptors. The server side waits passively until it receives a message from a remote BACnet device. When a message is received, the Fieldserver matches it against a server side node and then against the server side map descriptors. If there is a match data can be extracted and served. If there is no match then an error response is sent.

img7

Engineering Units are a property of a BACnet data object. You can set them to any supported unit using the ‘Units’ parameter. The manual provides a full list of units. You can see the analog data is scaled before it is served.

How to Write/Command Data

When you send a BACnet comamd to change the value of an object (typically an output object) then a message is sent to the FieldSever with the new value. If a matching device and object are found the Data Array is updated. Normally the data is read by the client side and shared with the server side. These two operations seem to contradict each other. Here is how it works:

1. Normally client side (Modbus) reads the data and server side serves that data.

2. BACnet Scada System sends a command to write a data object.

3. This causes the FieldServer to store the data in the Data Array location being used by the corresponding Server Map Descriptor.

4. This in turn triggers a once off operation. Instead of reading the data from the Modbus Device, a single write to the Modbus device is performed with the new data. FieldServers call this a ‘write-though-read’. That is why we get away with having no ‘write’ map descriptors to the Modbus device but we are still able to send commands to the Modbus Device.

Lets say a remote controller sends a new setpoint to Analog Output #2. In this case the new setpoint is stored in DA_Ana_Outputs[1] (offset 1).

img13

You can deduce that DA_Ana_Outputs[1] corresponds to Modbus register 40002. ( Basis for deduction – follow the data array name from the server map descriptor – find which client Map Descrptor uses the same Data Array. In this case it is the one called ‘Read_Holding_Regs’. Now you can see that 40001 corresponds to DA_Ana_Outputs[0] and hence 40002 corresponds DA_Ana_Outputs[1].

img14

Now the FieldServer knows where to send the new setpoint and hence a message to set 40002 in device #1 using Modbus/TCP is sent.

Modbus and Floating Point Numbers

Modbus does not naturally have a way of transporting floating point numbers. Commonly, two 16bit integers are used to store a representation of a floating point number. Commonly the representation method is IEEE754. FieldServer have a method of doing the conversion.

The following table shows the FieldServer function moves that copy two adjacent 16-bit registers to a 32-bit floating point value:

img8

In these examples, 32 16-bit values are combined to form 16 floating point numbers.

In the 1st example DA_SYN_REG[502] and DA_SYN_REG[503] are combined and stored in DA_SYN_ FLOAT500[0]. This is repeated 15 more times. Eg DA_SYN_REG[504] and DA_SYN_REG[505] are combined and stored in DA_SYN_FLOAT500[1].

img9

Complete Configuration File

img10
img11
img12

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

BACnet BBMD

The BACnet discovery uses two services – called ‘Who-Is’ and ‘I-Am’. They rely on the use of broadcasts.

Routers join IP networks together so messages from one network can be sent to another. Most routers do not forward broadcast messages and this means discovery cant discover devices on another network.

To solve this problem BACnet provides a technology called BBMD – BACnet/IP Broadcast Management Device.

In overview the technology is simple. You install a BBMD (might be a physical device or just a software application on a computer) on each network. You can configure the BBMD by specifying the IP Address and mask of the each BBMD. This makes both BBMD configs identical. When the one BBM receives a broadcast, it forwards the messages to the other BBMD which in re-broadcasts on the other network. They are configured by BDT files and these may be modified on the fly using selected Bacnet services.

The technology also provides for foreign device registration. This allows a device on one network to communicate with a device on another network by using the BBMD to forward and route the messages.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have