Archive for the 'BACnet MSTP' Category

FieldServer Gateway (Dual Serial)

Dual Serial – Ethernet

FS-B2510

The FS-B2510 Dual Serial-Ethernet gateway provides a wealth of features to enable data transfer between different devices and networks utilizing serial and Ethernet protocols. The extensive library of FieldServer drivers provides easy interoperability with devices and networks used in building automation, HVAC, fire and process control industries. The FS-B2510 is particular cost effective in the integration of two devices/systems utilizing serial protocols such as a fire alarm control panel to BACnet MSTP.

The FS-B2510 is one of the FS-X30 Series FieldServers designed to meet the needs of system integrators in designing a complete interoperable system. The FS-B25 Series brings together the powerful FieldServer driver library with state-of-the-art gateway design. This FieldServer includes twi serial connections (RS-232 or RS-485, software selectable) and one 10/100BaseT Ethernet ports. The multiport design allows for serial-to-serial interfaces or interface from mulitple serial products to an Ethernet or LonWorks network. The Ethernet port enables the integrator to connect a PC to download configuration changes without disturbing the system connections and without the additional cost of an external hub.

CAS sell, support, install, configure and develop custom drivers for FieldServers. With every FieldServer purchased from CAS that includes a BACnet protocol we provide a free license to the CAS BACnet Explorer which can be used to test / prove the BACnet interface is working.

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

Segementation in BACnet

 

BACnet messages that don’t fit in a single packet use segmentation. Why would one message need more than one packet ? Well IP packets have a maximum length of 1500 bytes. So if you are sending a BACnet IP message that is longer than 1500 bytes then you need to send more than one Ethernet packet.

Example: Ask your fishing buddy if he wants another beer. The reply is short and fits in s single response packet. Yes. Now ask him to tell you about the one that got away. He will need multiple sentences to tell you the long storey. Your buddy needs you to support segmentation otherwise you will only hear the first sentence of his storey (lucky you.)

Be aware: 1500 is not a hard coded Maximum Transmission Unit (MTU) length in all Ethernet applications. Often the size is set smaller.

Most serial protocols like MS/TP choose a small number for the MTU because am error requires retransmission and the data is slow so it better to catch an error in smaller packet.

Practical / Field Issues

  How does Segmentation affect you as a user ?If a device has a large number of objects and a message is sent to read the object list then it is possible that the response wont fit in a single packet. If both the device and the requestor support segmentation then there is no problem. If either side doesn’t support segmentation then 1) You are out of luck or 2) The requestor must use a different method to read the object list – for example, reading each object using its index until it reaches an index number with no object.The CAS BACNet explorer works like that – first it tries the most efficient method and then it slowly downgrades itself to try and ensure the response will fit in a single packet.

How do you know if a device supports segmentation ?

You can read the vendor’s PIC (Protocol Implementation and Conformance) Statement or you can look at the device object’s properties.

segmentation in bacnet

segmentation in bacnet

segmented-both (0)

segmented-transmit (1)

segmented-receive (2)

no-segmentation (3)

How can you work around the segmentation issue ?

If you can configure the services your system uses to read data you have a fighting chance. Ensure you use read-property for a single property – avoiding read-property for all properties. If you have to use read-property-multiple then limit the list of properties to be read and avoid reading all using this service.

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

Reducing latency on com ports

When a BYTE is sent from a serial device (BACnet MSTP thermostat) to a USB to 232/485 converters (USB-COMI-SI-M) it is cached on the USB converter until one of two things happened.

  • Transfer size – More then x BYTES are collected or
  • Latency timer – More then n Milliseconds (ms) expirer.

By default most ‘off the self’ USB to serial converters have a latency timer of 50ms and a transfer size of 4096 BYTES

The can be a major problem for PC utilities monitoring a serial network. The PC doesn’t get the BYTES fast enough to respond to the serial device before it times out.

For example:

On a network with a BACnet MSTP thermostat and a RS485 to USB converter connected to a PC. The BACnet MSTP thermostat will send a poll to the PC and will expect the PC to respond within 100ms. If the thermostat does not receive a response within this time the thermostat will assume that the device has gone offline. When the USB to 458 converter receives the message it will stay in its buffers for 50ms before being sent to the PC. Depending on the message it may take longer then 50 ms for the PC to respond to the poll and the thermostat will consider the PC offline.

Luckily we can set the Transfer size, and latency timer.

Most USB to 485 devices that I have used have the ability to set the transfer size and the latency timer.

  1. Start menu–> Settings –> Control panel –> device manager –> Ports (COM & LPT) –>{Select your USB to RS485 converter}
  2. Right click and select “Properties
  3. Select the “Port Settings” tab
  4. Click the “Advanced” button advancedsettingsforcomm10
  5. Change the Latency Timer (mSec) to 1 or the lowest possible setting.
  6. Change the USB Transfer sizes to 64 or the lowest possible settings
  7. Save and close.
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 BIBB’s

The implementation of BACnet is under-the-hood. It is invisible to most of us users. We don’t know what services are supported and nor do we know when each service is used. If we don’t know then how can we tell, for example, whether a controller and field device such as a thermostat can interact.

The question is: How do you match requirements of a project to the capabilities of the devices being installed ? The Answer – in BACnet – is BIBBS.

A BIBB is a Bacnet Interoperability Building Block.

Continuing with our example: Say your controller needs to read the set point on a thermostat to perform its control. Then the controller needs to support a BIBB called DS-RP-A. This isn’t enough. The thermostat must be able to respond so it needs to support a BIBB called DS-RP-B. DS stands for Data Sharing. RP stands for Read Property. The A and the B stand for Client (A) and Server (B).

The outdoor temperature on a HVAC controller could come from two places. A local sensor connected to the unit or a remote value sent via BACnet. In this case you would want to match the BAS controller and HVAC controller with BIBBS DS-WP-A and DS-WP-B (DataSharing-WriteProperty-A or B for Client and Server).

Thus, if you buy a great controller that supports Conditional and Range Reads you would want to buy field devices that support these services. DS-RPC-A/B for DataSharing-ReadPropertyConditional-Client/Server.

Abbreviation BIBB Category
DS        Data Sharing
AE        Alarm and Event Management
DM       Device Management
DM and NM are part of the same category.
NM       Network Management
T          Trend
SCHED Schedule

TIP : Device A and Device B. All the BIBBs end in ‘-A’ or ‘-B’. BACnet refers to the A device and the B device. The A device in this context is a device acting as a client. The B device means a device acting as a server. In BACnet devices can be both clients and servers since almost all devices can read data from each other.

A complete table of BIIB’s is available at: http://www.chipkin.com/articles/bacnet-bibbs-table-bacnet-interoperability-building-blocks

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 BIBB’s TABLE – Bacnet Interoperability Building Blocks

Notes on BIBB’s are provided here: http://www.chipkin.com/articles/bacnet-bibbs

AE-ACK-A Alarm and Event Notification – Acknowledgement
Alarm and Event Management
A client sends an acknowledgement after receiving an Alarm or Event notification that requires one.
Service Initiate Execute
AcknowledgeAlarm Yes No
AE-ACK-B Alarm and Event Notification – Acknowledgement
Alarm and Event Management
A server processes an alarm or event notification
Service Initiate Execute
AcknowledgeAlarm No Yes
AE-ASUM-A Alarm and Event – Alarm Summary
Alarm and Event Management
A client polls for a summary
Service Initiate Execute
GetAlarmSummary Yes No
AE-ASUM-B Alarm and Event – Alarm Summary
Alarm and Event Management
Server sends an alarm summary
Service Initiate Execute
GetAlarmSummary No Yes
AE-ESUM-A Alarm and Event – Enrolment Summary
Alarm and Event Management
Client wants a summary of event initiating objects. Selection criteria may be specified in the request.
Service Initiate Execute
GetEnrollmentSummary No Yes
AE-ESUM-B Alarm and Event – Enrolment Summary
Alarm and Event Management
Server sends a list of selected objects that are event initiating. Selectionis based on the requesting criteria.
Service Initiate Execute
GetEnrollmentSummary Yes No
AE-INFO-A Alarm and Event – Information
Alarm and Event Management
The GetEventInformation service is used by a client BACnet-user to obtain a summary of all “active event states”. The term
“active event states” refers to all event-initiating objects that
(a) have an Event_State property whose value is not equal to NORMAL, or
(b) have an Acked_Transitions property, which has at least one of the bits (TO-OFFNORMAL, TO-FAULT, TONORMAL)
set to FALSE.
Service Initiate Execute
GetEventInformation Yes No
AE-INFO-B Alarm and Event – Information
Alarm and Event Management
Server sends a summary of all active event states
“active event states” refers to all event-initiating objects that
(a) have an Event_State property whose value is not equal to NORMAL, or
(b) have an Acked_Transitions property, which has at least one of the bits (TO-OFFNORMAL, TO-FAULT, TONORMAL)
set to FALSE.
Service Initiate Execute
GetEventInformation No Yes
AE-LS-A Alarm and Event – Life Saftey
Alarm and Event Management
A client devices as a life saftety device is able to process and acknowldege notifications it receives about life safty events. The Client
sends a reset, silence or unsilence message. Is intended for fire and life safety systems.
Service Initiate Execute
LifeSafetyOperation Yes No
AE-LS-B Alarm and Event – Life Saftey
Alarm and Event Management
A device as a server and as a life saftey device sends notifications about life safety events. Server performs the reset or silence
Service Initiate Execute
LifeSafetyOperation No Yes
AE-N-A Alarm and Event Notification
Alarm and Event Management
A Client can process notifications about alarms and other events from any standard or proprietary eventgenerating
object of any standard or proprietary event type.
Service Initiate Execute
UnConfirmedEventNotification No Yes
ConfirmedEventNotification No Yes
AE-N-E-B Alarm and Event Notification – External Device
Alarm and Event Management
Server device sends notifications about alarms and other events in another device. At least one event enrolment object mustbe
supported and DS_RP-A and AE-N-I-B must be supported. If the notifications require acknowldgement then the server must be capable
of processing the acknowledgdments by supporting AE-ACK-B
object of any standard or proprietary event type.
Service Initiate Execute
AE-N-I-B Alarm and Event Notification – Internal
Alarm and Event Management
Server device sends notifications about alarms and other events. The server must support Intrinsic or Algorihmic reporting. If the
notifications require acknowldgement then the server must be capable of processing the acknowledgdments by supporting AE-ACK-B
object of any standard or proprietary event type.
Service Initiate Execute
ConfirmedEventNotification Yes No
UnconfirmedEventNotification Yes No
DS-COV-A Change of Value
Data Sharing
Client can subscribe for COV notification and can process the notifications from the remote device.Support for subscriptions of a
limited lifetime is required, and support for subscriptions of indefinite lifetime is optional. This service has two important differences
from the SubscriveCOVProperty service. Firstly, there is a limited set of properties (For the most part, Present_Value and Status_Flags)
it may subscribe to and secondly the COVIncrement is not part of the subscription – the notifications are based on how the server is
Service Initiate Execute
UnconfirmedCOVNotification No Yes
SubscribeCOV Yes No
ConfirmedCOVNotification No Yes
DS-COV-B Change of Value
Data Sharing
Server can accept subscriptions and send COV notifications to the remote device. Requires support for a minimum of five concurrent
subscriptions. Support for
subscriptions of a limited lifetime is required, and support for subscriptions of indefinite lifetime is optional.
Service Initiate Execute
ConfirmedCOVNotification Yes No
UnconfirmedCOVNotification Yes No
SubscribeCOV No Yes
DS-COVP-A Change of Value – Property
Data Sharing
Client can subscribe for COV notification of one/more properties of a single object and can process the notifications from the remote
device.Support for subscriptions of a limited lifetime is required, and support for subscriptions of indefinite lifetime is optional. This
service allows the COVIncrement to be specified and range of subscribable properties is larger than DS-COV-A
Service Initiate Execute
SubscribeCOV Yes No
ConfirmedCOVNotification No Yes
UnconfirmedCOVNotification No Yes
DS-COVP-B Change of Value – Property
Data Sharing
Server can accept subscriptions and send COV notifications Requires support for a minimum of five concurrent subscriptions. Support
for subscriptions of a limited lifetime is required, and support for subscriptions of indefinite lifetime is optional.
Service Initiate Execute
ConfirmedCOVNotification Yes No
UnconfirmedCOVNotification Yes No
SubscribeCOV No Yes
DS-COVU-A Unsolicited COV
Data Sharing
Client can process unsolicited COV messages from a Server.
Service Initiate Execute
UnconfirmedCOVNotification No Yes
DS-COVU-B Unsolicited COV
Data Sharing
Server can send unsolicited COV messages to a remote client.
Service Initiate Execute
UnconfirmedCOVNotification Yes No
DS-RP-A Read Property
Data Sharing
Client Polls for Data from remote device
Service Initiate Execute
ReadProperty Yes No
DS-RP-B Read Property
Data Sharing
Server responds to poll
Service Initiate Execute
ReadProperty No Yes
DS-RPC-A Read Property Conditional
Data Sharing
Client polls for data from one/more properties from one/more objects. Selection is based on criteria specified.
Service Initiate Execute
ReadPropertyConditional Yes No
DS-RPC-B Read Property Conditional
Data Sharing
Server responds conditionally sending selected properties from selected objects based on conditional criteria.
Service Initiate Execute
ReadPropertyConditional Yes No
DS-RPM-A Read Property Multiple
Data Sharing
Client Polls for Data from remote device
Service Initiate Execute
ReadPropertyMultiple Yes No
DS-RPM-B Read Property Multiple
Data Sharing
Server responds to poll
Service Initiate Execute
ReadPropertyMultiple No Yes
DS-WP-A Write Property
Data Sharing
Client sets the value of a property of a single object in the server device.
Service Initiate Execute
WriteProperty Yes No
DS-WP-B Write Property
Data Sharing
Server allows a value to be changed by a remote client.
Service Initiate Execute
WriteProperty No Yes
DS-WPM-A Write Property Multiple
Data Sharing
Client sets the value of a one/more properties of a single object in the server device. This is different from ReadPropertyMultiple which
can process properties more than one object.
Service Initiate Execute
WritePropertyMutiple Yes No
DS-WPM-B Write Property Multiple
Data Sharing
Server allows the values of one/more properties to be set by a remote client.
Service Initiate Execute
WritePropertyMutiple No Yes
DM-BR-A Backup and Restore
Device and Network
Client reads the files that contain the configuration of the B device and writes those files to the B device should it
need to be restored to its previously backed-up state.
Service Initiate Execute
ReinitializeDevice Yes No
CreateObject Yes No
AtomicReadFile Yes No
AtomicWriteFile Yes No
DM-BR-B Backup and Restore
Device and Network
Server sends it’s cofiguration to a remote client and allows a remote device to restore it by accepting a configuration and allowing a
Service Initiate Execute
CreateObject No Yes
ReinitializeDevice No Yes
AtomicWriteFile No Yes
AtomicReadFile No Yes
DM-DCC-A Commication Control
Device and Network
The DeviceCommunicationControl service is used by a client BACnet-user to instruct a remote device to stop initiating and
optionally stop responding to all APDUs (except DeviceCommunicationControl or, if supported, ReinitializeDevice) on the
communication network or internetwork for a specified duration of time. This service is primarily used by a human operator
for diagnostic purposes.
Service Initiate Execute
DeviceCommunicationControl Yes No
DM-DCC-B Commication Control
Device and Network
The controlled device responds to the request.
Service Initiate Execute
DeviceCommunicationControl No Yes
DM-DDB-A Dynamic Device Binding
Device and Network
A client can send discovery messages as well as process discovery anouncements send by other devices
Service Initiate Execute
Who-Is Yes No
I-Am No Yes
DM-DDB-B Dynamic Device Binding
Device and Network
A server can process discovery requests and can accounce itself.
Service Initiate Execute
Who-Is No Yes
I-Am Yes No
DM-DOB-B Dynamic Object Binding
Device and Network
Client polls to see which devices contain an object specified by Name or Object Identifier
Service Initiate Execute
I-Have Yes No
Who-Has No Yes
I-Have Yes No
Who-Has No Yes
DM-LM-A List Manipulation
Device and Network
Many BACnet object types have properties that are lists of a particular datatype. The Client can add and remove list
elements in properties of objects in the Server
Service Initiate Execute
AddListElement Yes No
RemoveListElement Yes No
DM-LM-B List Manipulation
Device and Network
The Server device removes/add the items the client requested to be changed in the list
Service Initiate Execute
RemoveListElement No Yes
AddListElement No Yes
DM-OCD-A Object Creation and Deletion
Device and Network
A client requests a server device to create / delete an object. Only applies to the Object Types supported on the server. Check the server
device PICS statememnt as it shoud contain a list of the types which can be dynamicallly manipulated.
Service Initiate Execute
CreateObject Yes No
DeleteObject Yes No
DM-OCD-B Object Creation and Deletion
Device and Network
A server device processes the request to add / delete objects on the fly.
Service Initiate Execute
CreateObject No Yes
DeleteObject No Yes
DM-PT-A Private Transfer
Device and Network
Client sends non-BACNet data to a remote device.
Service Initiate Execute
ConfirmedPrivateTransfer Yes No
UnconfirmedPrivateTransfer Yes No
DM-PT-B Private Transfer
Device and Network
The Recipient of the non-BACNet data, processes the data.
Service Initiate Execute
UnconfirmedPrivateTransfer No Yes
ConfirmedPrivateTransfer No Yes
DM-R-A Restart
Device and Network
When devices restart they can send notifications of this event. Support for this BIBB means the device can process these notifications
Service Initiate Execute
UnconfirmedCOVNotification No Yes
DM-R-B Restart
Device and Network
When a device restarts it can send notifications of this event.
Service Initiate Execute
UnconfirmedCOVNotification Yes No
DM-RD-A Reinitialize
Device and Network
Client requests a device to reinitialize
Service Initiate Execute
ReinitializeDevice Yes No
DM-RD-B Reinitialize
Device and Network
Server device performs the reinitialization
Service Initiate Execute
ReinitializeDevice No Yes
DM-TM-A Text Message
Device and Network
Client sends text data to a remote device. The device must support at least one of the services.
Service Initiate Execute
UnconfirmedTextMessage Yes No
ConfirmedTextMessage Yes No
DM-TM-B Text Message
Device and Network
The Recipient of the Text data, processes the data.
Service Initiate Execute
UnconfirmedTextMessage No Yes
ConfirmedTextMessage No Yes
DM-TS-A Time Synch – Local Time
Device and Network
Client sends a time synch message. The TimeSynchronization service is used by a requesting BACnet-user to notify a remote device of
the correct current time.
This service may be broadcast, multicast, or addressed to a single recipient. Its purpose is to notify recipients of the correct
current time so that devices may synchronize their internal clocks with one another.
Service Initiate Execute
TimeSynchronization Yes No
DM-TS-B Time Synch – Local Time
Device and Network
The server device applies the time synch. Its device object must support the Local_Time and Local_Date properties.
Service Initiate Execute
TimeSynchronization No Yes
DM-UTC-A Time Synch – Coordinated Universal Time
Device and Network
Client sends a time synch message. The TimeSynchronization service is used by a requesting BACnet-user to notify a remote device of
the correct current time.
This service may be broadcast, multicast, or addressed to a single recipient. Its purpose is to notify recipients of the correct
current time so that devices may synchronize their internal clocks with one another.
Service Initiate Execute
UTCTimeSynchronization Yes No
DM-UTC-B Time Synch – Coordinated Universal Time
Device and Network
The server device applies the time synch. Its device object must support the Local_Time , Local_Date, UTC_Offset …properties.
Service Initiate Execute
UTCTimeSynchronization No Yes
DM-VT-A Virtual Terminal
Device and Network
A client opens and conducts a Virtual Terminal session with a remote device.
Service Initiate Execute
VT-Close Yes Yes
VT-Data Yes Yes
VT-Open Yes No
DM-VT-B Virtual Terminal
Device and Network
A server devices allows a Virtual Terminal sessions to be opended and exchanges data with the remote client.
Service Initiate Execute
VT-Open No Yes
VT-Data Yes Yes
VT-Close Yes Yes
NM-CE-A Connection Establishment
Network Management
A device sends a command to a half-router to establish/terminate connections
Service Initiate Execute
Establish-Connection-To-Network Yes No
Disconnect-Connection-To-Network Yes No
NM-CE-B Connection Establishment
Network Management
A half-router processes commands to establish/terminate connections
Service Initiate Execute
Disconnect-Connection-To-Network No Yes
Establish-Connection-To-Network No Yes
NM-RC-A Router Configuration
Network Management
Client sends messages to configure or query a router or half-router
Service Initiate Execute
Initialize-Routing-Table-Ack No Yes
Initialize-Routing-Table Yes No
Who-Is-Router-To-Network Yes No
I-Am-Router-To-Network No Yes
I-Could-Be-Router-To-Network No Yes
NM-RC-B Router Configuration
Network Management
A router or half-router acts on configuration commands or responds to queries about the configuration.
Service Initiate Execute
Who-Is-Router-To-Network Yes Yes
Initialize-Routing-Table No Yes
Initialize-Routing-Table-Ack Yes No
I-Am-Router-To-Network Yes Yes
SCHED-A Scheduling
Scheduling
A client manipulates schedules and calandars in a server device. To do this the client musts support these two BIBBs DS-RP-A and DS-
Service Initiate Execute
SCHED-E-B Scheduling-External
Scheduling
Allows time and date scheduling of specific objects in other devices. To support SCHED-E-B the device must also required to support
SCHED-I-B and DS-WP
Service Initiate Execute
SCHED-I-B Scheduling-Internal
Scheduling
A device as a server has objects and properties that can be scheduled by date and time. The device supports at least one calandar and
one schedule object (must support at least 6 entries per day). This device must also support DM-TS-B and/or DM-UTC-B to claim support
Service Initiate Execute
T-ATR-A Automated Trend Retrieval
Trending
A device as a client can respond to notifications that a trend log is ready and reads the new data from the server.
Service Initiate Execute
ConfirmedEventNotification No Yes
ReadRange Yes No
T-ATR-B Automated Trend Retrieval
Trending
When a trend log has aquired a preset number of records the device (as a server) sends notification to a client device.
Service Initiate Execute
ConfirmedEventNotification Yes No
ReadRange No Yes
T-VMT-A Viewing and Modifying Trends
Trending
A client can display Trend Data obtained from the server device and can maipulate parameters in the remote server device that control
Service Initiate Execute
ReadRange Yes No
T-VMT-E-B Viewing and Modifying Trends External
Trending
The device as a server can collect trend log data from an external device and store these records internally. The device must also
support T-VMT-I-B and DS-RP-A.
Service Initiate Execute
T-VMT-I-B Viewing and Modifying Trends Internal
Trending
The device as a server can collect trend log data records and store them internally. Support for at least one Trend Log Object is provided.
Service Initiate Execute
ReadRange No Yes
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

Why can’t I change to 76800 baud rate on PC?

Q: Why can’t we change to a 76800 baud rate on a PC but are able to on some devices?

A: The reason for this is that the the standard 16C550 PC UART is too slow to keep up with the signals coming in and out. 76800 is not a standard multiple of the UART clock frequency.

Devices can be customized and therefore allow baud rates of 76800. If your PC has a customizable COM port card where you can program the bit clock then you would be able to set this value.

There is no fix for this, but if you find a converter that can change 76800 to a higher UART this could be a work around.

The standard frequencies are:

  • 150
  • 300
  • 1200
  • 2400
  • 4800
  • 9600
  • 19200
  • 38400
  • 115000
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

Cable Specifications for RS485 Networks – BACnet MSTP

The BACnet spec defined the media for MSTP as follows (2004) ;

“An MS/TP EIA-485 network shall use shielded, twisted-pair cable with characteristic impedance between 100 and 130 ohms. Distributed capacitance between conductors shall be less than 100 pF per meter (30 pF per foot). Distributed capacitance between conductors and shield shall be less that 200 pF per meter (60 pF per foot). Foil or braided shields are acceptable. The maximum recommended length of an MS/TP segment is 1200 meters (4000 feet) with AWG 18 (0.82 mm2 conductor area) cable. The use of greater distances and/or different wire gauges shall comply with the electrical specifications of EIA-485.”

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 MSTP Installation, RS485 and Cables

BACnet MSTP uses RS485 (also known as EIA485) as it physical layer. This is good and bad.

Search the Internet on RS485 you will find Bob Perrins’s article called the “THE ART AND SCIENCE OF RS-485.” It is his reference to Art that makes RS485 bad. What he means is that RS485 is often non-trivial and getting a network working can rely more on experience and experimentation.

Here is our simplified advice:

1. RS485 is a 3 conductor network. You take a huge risk by not installing the 3rd conductor. You risk blowing 485 ports, you risk unstable operation (works sometimes and doesn’t work other times) and finally you risk re-installation. For a more detailed discussion read this article. The more power sources used to power devices, the greater the physical separation of devices, the less well grounded devices and power sources are the greater the risk. Remember this statement : The so called Ground Terminal on a RS485 interface is not a connection to ground. It is a common reference signal. The voltage level on the Tx/Rx conductors are measured relative to this voltage level.

You can (if you must) use a shield drain wire as the 3rd conductor (ground reference conductor)

2. Always connect the ground reference conductor first if you are connecting a device that is powered up or you are connecting your laptop an operating network.

OR

Always choose devices that have optical isolation – this almost always will protect the RS485 transmitter/receivers.

3. You can get away without the shield. The twisted pair used for Tx and Rx is more effective at noise cancellation than the shield.

4. Take care where you run your cables. It seems obvious not to wind your cable around other cables or sources of electricity/magnetism. People are often surprised to find that the worst source of induced noise are switching DC loads. Another big culprit are Variable Frequency drives.

5. Cable selection does make a difference.

All cables offer impedance (resistance). Some cables are designed so that the impedance is relatively independent of distance. You want one of these cables. A clue to knowing if you selected one is to look at the cable’s Nominal Impedance. If they quote a number such a 100Ohms you have a good cable. If they quote an impedance per meter/foot you have chosen the wrong kind. Wrong in the sense – to determine the value of terminating resistors now requires measurements and calculations. Choose low capacitance cables.

Can you use Cat5 cable ? Yes. Use one pair for Tx,Rx and a conductor from another pair for the ground reference signal.

We recommend these two cables.

Belden 3106A

Multi-Conductor – EIA Industrial RS-485 PLTC/CM
22 AWG stranded (7×30) tinned copper conductors, Datalene® insulation, twisted pairs, overall Beldfoil® shield (100% coverage) plus a tinned copper braid (90% coverage), drain wire, UV resistant PVC jacket.

Belden 3107A

Multi-Conductor – EIA Industrial RS-485 PLTC/CM
22 AWG stranded (7×30) tinned copper conductors, Datalene® insulation, twisted pairs, overall Beldfoil® shield (100% coverage) plus a tinned copper braid (90% coverage), drain wire, UV resistant PVC jacket.

6. How do you put more than 32 devices on a single RS485 trunk ?

The simple answer is use a repeater but in practice one isn’t always necessary.

The RS485 stardard is based on 32 devices. Since the standard was developed most RS485 chips present less than the full unit load originally specified. Today you get half and quarter load devices. Thus to see how many devices you can install you simply get the data sheets and add the loads. Look for “UL” on the data sheet. It stands for Unit Load.

7. Cable Lengths and Baud Rates

Practically speaking you can go up to 4000 feet at baud rates up to 76800 baud. Above that you need to do a little math and reduce the length. For example, at 115k baud your cable should not be much longer than 2500 feet.

However, the higher the baud rate the more sensitive the cable is to the quality of installation – issues like how much twisted pair is unwound at each termination start to become very very important.

Our advise: For longer networks with lots of devices, choose 38k400 baud over 76k800 baud and optimize using COV, separate networks and by setting the Max Master to a lower number.


Source: Ten Ways to Bulletproof RS-485 Interfaces National Semiconductor
Application Note 1057 John Goldie October 1996

8. How many devices to install on a single RS485 Trunk (Bandwidth Issues)

How many devices to install on a single RS485 Trunk (Bandwidth Issues)

There are non electrical considerations to determine how many devices you put on an MSTP network.

The chart below illustrates (from one installation) how little of the bandwidth is used to transfer data. The APDU’s are application layer message that poll and respond with property values – they do work for us as data consumers. The rest is used to maintain the network – passing the token around and looking for new devices.

It’s not possible to provide a calculator to work out how many devices to install on a single network but the following list provides some help in assessing bandwidth considerations.

  • How many of the devices will be BACnet slaves.

    Token passing and looking for new devices on the MSTP trunk consumes a fair amount of bandwidth.

    A BACnet slave can be read/written but never gets the token. So it can’t initiate any messages because it never gets the token. The more slaves the fewer token passes. Typically you are not able to put a device in slave mode. Most vendors implement their devices as masters (ie token passing devices).

  • How many Objects in each device are you interested in monitoring?

    The more you read and the greater the frequency the more bandwidth that will be consumed.

    It takes approx 30 bytes to poll for a single property. It takes about 40 bytes to reply. A token is 8 bytes as is a Poll for master.
    Assume that 50% of your bandwidth will be used by overhead (token, poll for master).
    Divide the baud rate by 10 to get bytes per seconds.
    Using a number like 30+40=70 as a best case and 100 as a worst case (obviously reading descriptions will take more) multiply by the number of objects and properties you are going to poll on a regular basis.

    Here are some typical numbers assuming the device doesn’t support the ‘multiple’ services (see below).

    Baud 38400
    Bytes per sec (divide Baud by 10) 3840
    Overhead use (token and poll for master) 50%
    Byte per sec for payload (a) 1920
    Typical Poll and response for a single property (b) 70
    Number of properties that can be polled per sec (=a/b) 27.42857
    Typical number of props that will polled per object 4
    (pres value, status_flags, reliability, out of service)
    Number of objects per sec 6.857143
  • How many properties from each of these objects?
  • What is the baud rate?
  • What is Max Master Set to?

    Every few cycles each (master) token passing device on the network must look to see if there are new devices. Max Master determines the biggest address that must be searched for. Each search involves sending a message and waiting for a response or a timeout (if the devices isn’t there). Timeouts cost time. The higher the number of Max Master (default is 127) the more potential devices must be searched for. If you use Max master to improve bandwidth then you must adjust it in each device.

  • Do the devices support the “Read/Write Property Multiple” services or must each property be read in a separate message.

    Find the answer to this question by reading the BIBs statement for each device or you could explore the device object of the device, find the property called BACnetServicesSupported and then look at the 14th item in the array to see if Read Property Multiple is supported and the 16th for Write Property Multiple. However, we have found that a large number of devices don’t display this information.

    Obviously, if you can read a chunk of properties in one message you will be better off than if you can only read a single one.

  • Can you use BACNet’s COV mechanism.

    COV stands for Change of Value. When a device supports COV another device / application can subscribe to receive notifications when an object property changes. This means the data client doesn’t have to poll for data continuously but can wait passively to be notified of the change. This reduces the number of messages on a network dramatically.

  • Some devices are slower than others.

    BACnet allows up to 15 msec for a device to use the token. Since most messages on a MSTP network are token passes a device that uses the token in 5 msec will consume much less bandwidth than one that takes 15msec. (A number of vendors relax this requirement to allow for other vendors implementations. The more relaxed the more bandwidth is consumed doing nothing.)

9. What can go wrong with 485 ?

Lets say you adopted all the best practices for installation of the network but you get intermittent or unacceptable performance because of packet loss, noise, collisions … Then you should consider hiring an expert to resolve your problems because now you are in the ‘Art’ part of RS485. These are some of the things they will look at.

  • Reflections

    Without a scope and expertise you wont know this is a factor. Its easy and cheap to eliminate. Look at the cable spec. Find the nominal impedance. Buy two resistors of the same value. At each end of the trunk install the resistors between the Tx and Rx terminals. If you don’t have obvious ends of the trunk (because you created a star) then we recommend re-cabling to form a linear trunk or we wish you luck.

    Some devices have terminating resistors built into them. If the vendor did a poor job, the default is to have the resistor active and they must be disabled unless they are the terminating devices on the network. Read vendor docs.

  • Biasing, Idle State Biasing, Fail Safe Biasing, Anti Aliasing

    There are a whole string of terms uses as synonyms to describe this phenomenon.

    To use two wires ( as opposed to full duplex 4 wire) for RS485 each devices transmitter and receiver must be set to an idle state to release the line for others use. Releasing the line means allowing it to ‘float’. It must not be allowed to float at any voltage level so devices have pull up/down resistors to pull the line to an allowable ‘floating’ voltage. (the floating state is also known as the tri-state. ) The load presented by other devices on the network affects this floating so the resistor values may need to be changed depending on the number of devices installed and the values of the pull up/down resistors they are using. (You can imagine how tricky its going to be to resolve this). If a device floats out of the specified range then to other devices it will look like the floating devices isn’t floating at all. The other devices will think that it is transmitting or receiving and thus blocking the line.

    The simplest way of knowing if this is a factor – Does the device work properly when it is the only device on the network ?. When you install it in the full network other devices or this device stops working properly. This device and/or the pull up/down resistors of other devices are candidates for investigation.

    A number of vendors have a range of pull up/down resistors installed and allow you to change the selection using software or jumpers.

  • Line Drive On / Off

    To use two wires for RS485 each devices transmitter and receiver must be set to an idle state to release the line for others use. When a device wants to send it must grab the line. When it has finished sending it must release the line. You can see there are potential problems here. What happens if one device waits too long after sending its last bit before releasing the line – its possible that the other devices will miss some bits of data.

10. Take care with the topology. The best topology is a single trunk that in-outs on the terminal blocks of each device it connects. What do we mean by best ? We mean the choice which is least likely to cause problems.

Best arrangement. (Showing TX conductor for reference only)

Getting worse. Making the connections to the RS485 terminals, drops instead of connections starts to give the electrical signals all kinds of complicated paths for reflections and harmonics. Its obvious that if the drops are long and are not twisted then you also have more chance to induce noise. (Showing TX conductor for reference only)

Worst. Avoid Star configurations. They are so much harder to debug when it gets tricky. (Showing TX conductor for reference only)

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 MSTP – An Introduction

The MS stands for Master – Slave although in practice there are not many slaves out there.
The TP stands for Token Passing.

This flavor of BAcnet is most commonly used to connect field devices to controllers / routers / control applications.

The physical layer uses RS485 which allows up to 128 devices to be installed on a single network with a max physical length of 4000ft and speeds up to 115k baud. Using repeaters allows the length to be increased. Compare to Ethernet where the spec allows a max of 100 meters (330ft) on a single unrepeated segment.

Common baud rates are 19200, 38400 and 76800. All devices must operate at the same baud rate. More and more devices can auto sense the baud rate and configure themselves correctly.

We divide the messages on a MSTP network into two categories:
1. Overhead (token, poll for master…)
2. Application. These carry payloads that we have an interest in.

Only a device with the token can initiate an application layer message. It can send the message to any device on the network. Some messages demand an instantaneous reply, some don’t. The receiving device doesn’t need the token to respond. There is a limit to how many application layer messages a device can send before it must pass the token on.

The benefits of token passing networks are the following:
1. They are self healing
2. They can discover new devices
3. They ensure each device gets its chance
4. They avoid collisions making network performance (somewhat) deterministic

A disadvantage of the token system is that any one device gets a limited use of the bandwidth. Thus a device may need to keep an internal queue of application layer messages it wants to send, waiting to use the token. We have encountered some vendor systems which fill there queue and then drop subsequent messages without notifying the user of the problem. Limited access combined with the overhead makes it easy to use up all the bandwidth on the network if there are many devices with many objects and many properties of interest.

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 MSTP Topology

Take care with the topology. The best topology is a single trunk that in-outs on the terminal blocks of each device it connects. What do we mean by best ? We mean the choice which is least likely to cause problems.

Best arrangement. (Showing TX conductor for reference only)

Getting worse. Making the connections to the RS485 terminals, drops instead of connections starts to give the electrical signals all kinds of complicated paths for reflections and harmonics. Its obvious that if the drops are long and are not twisted then you also have more chance to induce noise. (Showing TX conductor for reference only)

Worst. Avoid Star configurations. They are so much harder to debug when it gets tricky. (Showing TX conductor for reference only)

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