Archive for July, 2007

BACnet: The Schedule Object

The Schedule object is defined by the standard as a periodic schedule of events that may repeat within a range of dates. The schedule object is categorized into two types of days:

  • Normal Days in a Week
  • Exception Days

The two types can entail scheduled events for an entire day or portions of a day. The developer may choose exceptions at other times and dates with this object type as well.

The Schedule object essentially acts as a bridge between scheduled times and dates, and the writing of certain values to specific properties and objects concerning the schedule.

The following table will present the actual properties and datatypes of the Schedule object from the BACnet standard:

Property Datatype
Object_Identifier BACnet Object Identifier
Object_Name Character String
Object_Type BACnet Object Type
Present_Value Any
Description Character String
Effective_Period BACnet Data Range
Weekly_Schedule BACnet Array(7) of BACnet Daily Schedule
Exception_Schedule BACnet Array(N) of BACnet Special Event
Schedule_Default Any
List_of_Object_Property_References BACnet Device Object Property Reference
Priority_For_Writing Unsigned (1…16)
Status_Flags BACnet Status Flags
Reliability BACnet Reliability
Out_of_Service Boolean
Profile_Name Character String

The state of the Schedule object is described by the Present_Value property from the above table. The Present_Value property is figured through calculations that are considered a local matter, but the calculations use time and value variables from the Weekly_Schedule and Exception_Schedule properties with a default value for no effective schedules.

A special note concerning the Schedule object must be mentioned in this article. The versions of this object prior to revision four of the standard will only support schedules that define a whole day from midnight to midnight. For the previous versions, compatibility can be achieved by a specific format in the standard. Weekly and Exception schedule value(s) that start with “00:00″ and no use of any “NULL” values will solve this issue.

The following example from the standard will examine the Schedule object structure from an actual building automation application. This example will specifically focus on a roof HVAC unit that controls a specific room in a school during the calendar year:

Object_Identifier (Schedule, Instance 2)
Object_Name “Rm208Sched”
Object_Type SCHEDULE
Present_Value ACTIVE
Description “Room 208 Schedule”
Effective_Period ((5-SEP-1995)-(10-JUN-1996))
Weekly_Schedule {((8:00,ACTIVE),(17:00,INACTIVE)), ((8:00,ACTIVE)),
((8:00,ACTIVE),(17:00,INACTIVE)), ((8:00,ACTIVE),(17:00,INACTIVE),
(19:00,ACTIVE),(23:30,INACTIVE)), ((8:00,ACTIVE),(17:00,INACTIVE)),
((00:00,INACTIVE)), ((10:00,ACTIVE),(17:00,INACTIVE))}
Exception_Schedule {((23-NOV-1995),(0:00,INACTIVE),10), ((HOLIDAYS,(0:00,INACTIVE),11), ((5-MAR-1996)-(7-MAR-1996),((0:00,INACTIVE), (9:00,ACTIVE),(14:00,INACTIVE)),6),
((8-MAR-1996),((10:00,INACTIVE),(11:00,NULL)),7)}
List_Of_Object_Property_References ((Device, Instance 12),(Binary Output, Instance 9), Present_Value)
Priority_For_Writing 15
Status_Flags {FALSE, FALSE, FALSE, FALSE}
Reliability NO_FAULT_DETECTED
Schedule_Default INACTIVE
Out_Of_Service FALSE

Written by: Scott Cosby

© Chipkin Automation Systems 2007

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: The Command Object

The Command object is a very important part of the operation of a BACnet device. The Command object writes to a group of object properties through action code(s) within the Present_Value property. When this writing occurs, the Command object will start a sequence of actions in the BACnet device(s).

The Command object like the object in the previous article by the same author uses the four properties required by the BACnet standard. In addition, five more important properties are included in the operation of this object.

The following table will list the properties and datatypes of the Command object from the BACnet standard:

Property Datatype
Object_Identifier BACnet Object Identifier
Object_Name Character String
Object_Type BACnet Object Type
Present_Value Unsigned
In_Process Boolean
All_Writes_Successful Boolean
Action BACnet Array of Action List
Action Text BACnet Array of Character String
Profile_ Name Character String

The Command object can be a powerful aspect with beneficial applications, but at the same time this object can cause confusion and problems for the developer. Certain issues must be observed concerning the Command object:

  • Proper configuration of the Command object.
  • Proper device configuration concerning the Command object.
  • Closely monitor the In_Process property of the Command object, due to the possibility of the object commanding itself.

The following example from the BACnet standard will reveal the Command object structure from an actual building automation application. Specifically, an elevator subsystem where a floor of the building is shut off when in the unoccupied mode:

Object_Identifier = (Command, Instance 1)
Object_Name = "ZONE43CONTROL"
Object_Type = COMMAND
Description = "Fourth Floor, West Wing Office Suite"
Present_Value = 2
In_Process = FALSE
All_Writes_Successful = TRUE
Action = {((,(Analog Value, Instance 5), Present_Value,,65.0, 8,,TRUE,TRUE),
(,(Binary Output, Instance 3), Present_Value,,INACTIVE,8,1,TRUE,TRUE),
((Device, Instance 1), (Binary Value, Instance 1),Present_Value, ,INACTIVE, 8,1,TRUE,TRUE)), ((,(Analog Value, Instance 5), Present_Value,,72.0,
8,2,TRUE,TRUE), (,(Binary Output, Instance 3), Present_Value,
,ACTIVE,8,,TRUE,TRUE), ((Device, Instance 1), (Binary Value, Instance 1),Present_Value,,ACTIVE, 8,,TRUE,TRUE))}
Action_Text = {"Unoccupied", "Occupied"}

Written by: Scott Cosby

© Chipkin Automation Systems 2007

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: Multi-state Objects

Multi-state objects are very important in operational state description of a BACnet device. There are three types of Multi-state objects described in the BACnet standard:

  • Multi-state Input
  • Multi-state Output
  • Multi-state Value

All three object types use the four required BACnet standard properties. Refer to the article on BACnet Objects by the same author for a more detailed explanation.

The Multi-state Input Object represents the result from an algorithmic process within a BACnet device. This mathematical process is considered a local task, and not defined by the standard. The result from the process may come from a logical combination of binary inputs or the threshold of one or more analog inputs.

The Multi-state Output Object represents the physical outputs or processes for a BACnet device. The specific functions of the device or process are a matter for the product vendor or developer. Examples of outputs can include active/inactive conditions or in the form of an analog output value.

The Multi-state Value Object is essentially a control system parameter in the memory of a BACnet device. Similar to the other Multi-state objects, the associated functions are a local matter, and not specified by the BACnet standard. State examples can include the active/inactive condition of inputs and outputs or the value of an analog input or output.

The following will illustrate the defining structure of the three Multi-state objects in actual building automation applications from the BACnet standard with associated properties as well.

Multi-state Input Object Example of a Two-Speed Fan:

Object_Identifier = (Multi-state Input, Instance 1)
Object_Name = "Fan1_Input"
Object_Type = MULTI_STATE_INPUT
Present_Value = 2
Description = "2-speed Fan#1"
Device_Type = "ZZZ Fan Motor"
Status_Flags = {FALSE, FALSE, FALSE, FALSE}
Event_State = NORMAL
Reliability = NO_FAULT_DETECTED
Out_Of_Service = FALSE
Number_Of_States = 3
State_Text = ("Off", "On_Low", "On_High")
Time_Delay = 3
Notification_Class = 4
Alarm_Values = (3)
Fault_Values = (2)
Event_Enable = {TRUE, TRUE, TRUE}
Acked_Transitions = {TRUE, TRUE, TRUE}
Notify_Type = EVENT
Event_Time_Stamps = ((23-MAR-95,18:50:21.2), (*-*-*,*:*:*.*), (23-MAR-95,19:01:34.0))

Multi-state Output Object Example of a Three Position Switch:

Object_Identifier = (Multi-state Output, Instance 2)
Object_Name = "3-POS-SW"
Object_Type = MULTI_STATE_OUTPUT
Present_Value = 1
Description = "3 POSITION SWITCH #1"
Status_Flags = {FALSE, FALSE, FALSE, FALSE}
Event_State = NORMAL
Reliability = NO_FAULT_DETECTED
Out_Of_Service = FALSE
Number_Of_States = 3
State_Text = {"Position_1", "Position_2", "Position_3"}
Priority_Array = {NULL...NULL}
Relinquish_Default = 1

Multi-state Value Object Example of a Ventilator Unit Operational Mode:

Object_Identifier = (Multi-state Value, Instance 1)
Object_Name = "UV39"
Object_Type = MULTISTATE_VALUE
Present_Value = 2
Description = "UnitVent Room 39"
Status_Flags = {FALSE,FALSE,FALSE,FALSE}
Event_State = NORMAL
Reliability = NO_FAULT_DETECTED
Out_Of_Service = FALSE
Number_Of_States = 4
State_Text = ("Unoccupied","Warmup","Occupied","Setback")

If you have any questions about BACnet, or connecting BACnet devices to your other devices feel free to contact us
We are here to help you.

Written by: Scott Cosby

© Chipkin Automation Systems 2007

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: Create a Modbus client in C#

Q: Given hardware, can I write .NET software for the slave device itself? Is the software on slave device embedded C? Some other language I have never heard of? Can it use C#? The reason I ask is because I have been tasked with writing slave software, NOT master software, and only know C#, VB.NET, VBA, VBScript, and Javascript.
Is this possible?

A: You should be able to write a Modbus client in any language that has access to the serial ports or a TCP connection.
C# has access to both the serial port and a RAW TCP connection; it will not be too hard to create a simple Modbus Client with C#.

Modbus is an open protocol and the Modbus spec is freely available from Modbus.org.
I would suggest that you start there.

I have to ask, Why would you want to create a anther Modbus Slave utility when there are already so many good freely available ones out there?

I would recommended that you take a look at CAS Modbus Scanner, it’s a free Modbus client that you can use to test your Modbus devices

© Chipkin Automation Systems 2007

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: Testing Modbus communication

Q: We want to check the communication between our device and personal computer, so we need the 232 communication software. Control.com/Q1026236536

A: There are a few free utilities to check communications between your PC and your Modbus device. Try searching Google for Free Modbus Slave utilities. I recomeded that you use CAS Modbus Scanner its pretty simple to use and completely free.

If your PC does not have a RS232 port (AKA serial port) you may have perchance a USB to rs232 converter, Any Staples or Best Buy will have one.

Once you download and install the utility you will have to configure both the device and your utility to have the same communications settings.

Then it’s as simple as trying to read one of your registers on your device.

© Chipkin Automation Systems 2007

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: Minimum Function Implementation

Q: What is the minimum subset of function that a Modbus salve device should implement?

A: It depend on if you are creating a commercially available slave device or your own slave device.

If you are creating a Modbus Slave device that will only be interrogate by a specific Modbus Master, then you only have to implement the functions that the Modbus Master will use to call on your Modbus Slave. If your master is interested only in reading coils then your slave could be limited to only supporting function 0×01.

If you are creating a commercially available Modbus Slave device there are 4 so called classes of function implementation.

  • Class I is the minimum useful set of functions, master and a slave should implement only read multiple registers (0×03) and write multiple registers (0×16).
  • Class II represents the additional functions which are commonly implemented: read coils (0×01), read input discretes (0×02) , read input registers (0×04), write coil (0×05), write single register (0×06), read exception status (0×07)
  • Class III are the data transfer functions needed for HMI and supervision: force multiple coils (0×15), read general reference (0×20), write general reference (0×21), mask write register (0×22), read/write registers (0×23), read FIFO queue (0×24)
  • Class IV are machine/network/vendor dependent functions: diagnostics (0×08), poll (0×10), get comm event counters (0×011), get comm event log (0×12), report slave ID (0×17), firmware replacement (0×125), report local address(0×127)

© Chipkin Automation Systems 2007

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

The BACnet Object

BACnet object(s) are concepts that allow the communication and organization of data related to inputs, outputs, software, and calculations to be performed. The BACnet Object can manifest itself in a variety of ways. These ways include:

  • Single Points
  • Logical Groups
  • Program Logic
  • Schedules
  • Historical Data

The BACnet object covers both physical and non-physical concepts. For example, a thermostat could be considered a physical concept and the HVAC system as the output device. A HVAC maintenance schedule in the form of software is an example of a non-physical concept.

All BACnet objects contains properties for information exchange and commands. One could view these properties in a tabular format with two columns. The first column lists the property name, and the second column gives a property value. Information in the second column can exist in read-only or write-enable format.

The following is a BACnet object example of an analog input for a space temperature sensor in a building:

Object Name Space Temp
Object Type Analog Input
Present Value 71
Status Flags Normal, InService
High Limit 77
Low Limit 67

The first four properties in the table are required by the BACnet standard. The last two properties are considered optional. These optional objects are often required by a developer, but that object must conform to the BACnet standard. The example shows only a few of the properties with an object. In the real-world, especially in a building automation setting many more properties would be present in the object.

Most experts and sources indicate there are 23 standard BACnet objects used in building automation systems. Standard objects are those objects that operate within the BACnet standard.

  • Binary Input
  • Binary Output
  • Binary Value
  • Analog Input
  • Analog Output
  • Analog Value
  • Averaging
  • LifeSafety Zone
  • LifeSafety Point
  • Multi-State Input
  • Multi-State Output
  • Multi-State Value
  • Loop
  • Calendar
  • Notification Class
  • Command
  • File
  • Program
  • Schedule
  • Trend Log
  • Group
  • Event Enrollment
  • Device

This list of 23 standard objects is representative of those functions in building automation and control systems of the present day.

Written by: Scott Cosby

If you have any questions about BACnet, or connecting BACnet devices to your other devices feel free to contact us
We are here to help you.

© Chipkin Automation Systems 2007

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

Free Tool: CAS BACnet Explorer

CAS BACnet Explorer is the perfect utility for exploring, testing and debugging BACnet® networks and devices.

  • Exploring – Automatically discover all the BACnet® IP, BACnet® Ethernet and BACnet® MSTP devices, objects, and there properties on your network. The objects and devices are arranged in an easy to use tree format with braches for each network, object, and device.
  • Testing – The CAS BACnet Explorer allows you to write to the BACnet® points, turn lights on or off, generate alarms, ACK alarms, ect
  • Debugging – With the report function you can document the current state of your BACnet® network, and use the information in your documentation. Never again ask yourself if a BACnet® device is on your network, and what value does it have.
  • Monitoring – A monitoring table can be set up to check the present value or any other property of a BACnet? object, easily with a single glance.

CAS BACnet explorer can be used on both BACnet®/Ethernet 802.3, BACnet®/IP and BACnet®/MSTP networks simultaneously.

Features:

  • Works with BACnet®/Ethernet 802.3, BACnet®/IP BACnet®/MSTP networks simultaneously
  • Create reports of your network in a simple to read webpage style html or XML
  • Write values to points
  • Simple to use

Requirements:

  • Windows: XP / 2000
  • 10 MB of free hard drive space
  • A WinpCap supported network card (99% of all network cards)

You can download a copy of CAS BACnet Explorer from Chipkin Automation systems website.

© Chipkin Automation Systems 2007

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

Free Tool: CAS Modbus Scanner

CAS Modbus Scanner is a utility to retrieve coils, inputs, holding registers, and input registers from a Modbus enabled device. Values retrieved from the device can be viewed in many different formats including Binary, HEX, Uint16, Int16, Uint32, Int32, and Float32.

This utility is great finding and debugging problems with your Modbus network.

Features:

  • Can read; coil status (0xxxx), input status(2xxxx), input registers (3xxxx), and holding registers (4xxxx)
  • Data is viewable in Binary, HEX, Uint16, Int16,Uint32, Int32, and Float32
  • Easy to use
  • Free to use, no registration required.

Requirements:

  • Windows: XP / 2000
  • 10 MB of free hard drive space
  • One free serial port

You can download this utility from Chipkin Automation’s website CAS Modbus Scanner

© Chipkin Automation Systems 2007

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: Notification Class Objects

The BACnet Notification object is a BACnet Object that is used to send event notifications within a BACnet System. When a device has a problem or a fault, such as the present value of a property rise above a predetermined level, a notification object would be created to inform the rest of the BACnet system that there is something wrong. There are several way of sending this type of message to other devices with different priorities and different destination.

In addition, the notification class prioritizes events according to these transition definitions, and may involve the acknowledgment from a human user:

  • TO-OFFNORMAL
  • TO-FAULT
  • TO-NORMAL

A device that is used to check the water level of a boiler might send a notification object with the priority of TO-OFFNORMAL if the water level is below a certain point, or TO-FAULT if the boiler i
s dry, or TO-NORMAL when water is added to the boiler and the water level returns to a normal level.

The primary reason for prioritization is to offer the user a way to ensure that alarms or events with critical time constraints are not delayed. The range of priorities includes 0 to 225 with the lower number (0) as a high priority than a high number (255).

The notification classes may specify a list of destinations, each of which can be defined by time, day of week, and handling type. The destination also defines the receiver device to that receives the notification and a process within the device. The processes are indicated by numerical handles that are only understood by the destination device. The handles are considered to be a local administration decision. The destination device is specified by the BACnet object “identifier” or through its address. Three types of addresses can be used:

  • Node Address
  • Multicast Address
  • Broadcast Address

The destination further indicates whether the notification should be sent using a confirmed or unconfirmed event notification.

The following example was obtained from the 2004 BACnet Standard to illustrate the defining structure of a notification class object for critical system alarms, including a time-dependent receiver list:

Property: Object_Identifier (Notification Class, Instance 1)
Property: Object_Name “Alarms1″
Property: Object_Type NOTIFICATION_CLASS
Property Description “Critical System Alarms”
Property: Notification_Class 1
Property: Priority (3, 10, 10)
Property: Ack_Required (TRUE, TRUE, TRUE)
Property: Recipient_List (((Monday, Tuesday, Wednesday, Thursday, Friday), 6:00, 20:00, (Device, Instance 12), 21, TRUE, (TRUE, TRUE, TRUE)),
((Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday),
0:00, 6:00, (Device, Instance 18), 5, TRUE, (TRUE, TRUE, FALSE)),
((Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday),
20:00, 24:00, (Device, Instance 18), 5, TRUE, (TRUE, TRUE, FALSE)))

Written by: Scott Cosby

If you have any questions about BACnet, or connecting BACnet devices to your other devices feel free to contact us
We are here to help you.

© Chipkin Automation Systems 2007

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