Wednesday, August 26, 2009


I would really like to abolish slaves -- MS/TP slaves. I don't like them. (Sorry if the following gets a bit technical.)

It seems to me that when BACnet was being drafted there were two schools of thought: "static binding," in which a client device was configured with a server's network number and MAC address, and "dynamic binding" in which the client was configured with server's "instance number"; the client would then locate the server using a broadcast: "Car 54, where are you?" (Yes Richard, this reference may date me but I never saw the show.) The "I-Am (here)" broadcast has the responding server's network address; then the two can talk directly. Both schools are embodied in the standard.

Alerton chose dynamic binding early on -- as soon as we had some prototype MS/TP slave devices (VLCs) running we learned how annoying static binding would be for our users, and the VLCs quickly became MS/TP masters instead, just so they could broadcast "I-Am" in response to "Who-Is". Much of the rest of the market has chosen dynamic binding also. Among the benefits: you can move a server device from one network to another and the clients will find it automatically -- no reprogramming necessary. The same is true if you swap out an Ethernet card (or device).

The problem is that MS/TP slaves are are part of the standard. This may have made sense back around 1990, when microcontroller ICs had very limited program memory, but it doesn't today. Back in 2003 I wanted to see "how low one could go" in BACnet and developed a small BACnet device using a PIC12 (under US$2, maybe closer to $1) - 2k instructions, 96 registers of storage, no hardware UART, 8 pins. In 2k instructions I got a software UART, an MS/TP Master Node (under 400 instructions), Who-Is & ReadProperty & WriteProperty execution, I-Am initiation, a Device object and one or two Analog or Binary I/O objects.

And this is a problem because new BACnet developers always seem to want to make MS/TP slaves, not considering the end users. Sure, the BACnet committee has worked to "free the slaves" and added methods for routers to discover MS/TP slaves and issue proxy I-Ams for them. The problem is that legacy systems do not have this capability; there their slaves are not "free" and new developers might not be aware of this.

The committee left an out for MS/TP slaves in the recently-revised Device Profiles (in Addendum l to BACnet-2008, which added more support for dynamic binding). But as long as there is an "out" new developers will try to take it.

In the long term it will probably make little difference as proxy-capable routers become more prevalent; ironically during the same time that microcontroller technology is reducing the cost-effectiveness of the MS/TP slave device to zero -- for its manufacturer, if not its user.

But for today, as I advised just this week to a group of developers new to BACnet, it's better to develop MS/TP master devices. The cost is small, the avoided headaches large.

My humble opinion.

No comments:

Post a Comment