Creating and Configuring A Modbus Network
Creating and Configuring A Modbus Network
Introduction
1 About This Guide ........................................................... 9
1.1 Purpose of This Guide ................................................................. 11
1.2 How This Guide is Organized ...................................................... 12
1.3 Typographical Conventions ......................................................... 13
Tutorial
3 Our Case Study ........................................................... 21
3.1 University X ................................................................................. 23
3.2 Requirements and Specifications ................................................ 26
3.2.1 Devices Used for This Case Study ............................................. 26
3.2.2 Software Used in This Tutorial ................................................... 27
3.2.3 Specifications ........................................................................... 27
3.3 Focus of This Tutorial .................................................................. 28
3.3.1 Pre-existing Database Folder and Programs .............................. 28
3.3.2 Pre-existing Database Objects .................................................. 29
Topics
Purpose of This Guide
How This Guide is Organized
Typographical Conventions
1 About This Guide
1.1 Purpose of This Guide
Introduction
The Introduction part contains information on the purpose of this guide, how this
guide is organized, where to find more information, and information on regulatory
notices.
Tutorial
The Tutorial part contains a step-by-step description of how to carry out different
tasks. If you want more information, see WebHelp or the corresponding Building
Operation Guide.
The Tutorial part includes a case study for a fictional customer called University X.
You can decide if you want to follow the example or use the described procedures
as reference information. The case study in this tutorial is an example of a typical
way of configuring Building Operation for a customer. When reading through this
tutorial, you might not have access to the devices, programs, and other files that
are needed for the fictional customer University X. However, the purpose of having
a case study is to see the procedures put in context, so you see how the
procedures could be used when configuring Building Operation, devices, or
programs for your customer.
Tip
Helps you understand the benefits and capabilities of the product.
Note
Provides you with supplementary information.
Important
Alerts you to supplementary information that is essential to the completion of a
task.
Caution
Alerts you to a condition that can cause loss of data.
Warning
Alerts you to a condition that can cause product damage or physical harm.
Bold texts:
User interface items, such as property names and buttons, are written in bold, for
example "On the File menu, select New."
Example texts:
All the example related information is indicated by blue lines and bullets.
Topics
Where to Find Additional Information
Regulatory Notices
2 Additional Information
2.1 Where to Find Additional Information
UL 916 Listed products for the Unites States and Canada, Open
Class Energy Management Equipment.
Industry Canada
ICES-003
This is a Class B digital device that meets all requirements of the Canadian
Interference Causing Equipment Regulations.
Topics
University X
Requirements and Specifications
Focus of This Tutorial
3 Our Case Study
3.1 University X
3.1 University X
We are going to install Building Operation as the building management system for
University X. The university is a campus of buildings for which heating and cooling
are supplied from a Central Plant with an underground distribution system. The
case study focuses on the renovation of the Central Plant and the expansion of the
School of Business.
Wiring
Pt ratio 001.0
Demand
dMd type W
Modbus
Address 001
Parity Even
Tip
• For instructions on how to configure the power meter, see the data sheet
delivered with the device.
3.2.3 Specifications
You find specifications in the Building Operation datasheets for Enterprise Server,
WorkStation, PS-24V Power Supply, Automation Server, and Power Meter Series
PM9.
Topics
Creating a Modbus Master Network
Configuring a Modbus Master Network
4 Creating and Configuring a Modbus RS-485 Network
Our Example
In this chapter, you create a Modbus Master Network (on a serial port) to provide
the facility to add RS-485 Modbus slave devices later (with the Automation Server
as master). You configure the network with a set of Modbus parameters (to which
all attached devices, including the power meter, must comply).
4. In the Name box, type a name for the network. In this example, type
“Modbus Master Network.”
5. In the Description box, type a description for the network. In this example,
type “Modbus RS-485 network.”
6. Click Create.
You can now configure the Modbus Master Network.
5. In the Baud rate box, select the baud rate. In this example, select 19200.
6. In the Parity box, select the parity. In this example, select Even.
Continued on next page
7. In the Stop bits box, select the number of stop bits. In this example, select
Auto.
8. In the Port reference box, enter the port that you want to associate with the
Modbus Master Network. The relative path
is ../System/Ports/Serial/[Port]. In this example,
enter ../System/Ports/Serial/RS485-COMA.
9. Click OK.
You can now add a Modbus Device to the Modbus Master Network.
Topics
Creating Multiple Modbus Devices
Creating Multiple Modbus Points
5 Creating and Configuring Modbus Devices and Points
Our Example
In this chapter, you create a slave device on the serial Modbus Master Network to
represent a real device on the Modbus network. In our case study, the Automation
Server is the master and the new slave device represents the power meter. You
configure the slave device with a network address and set up register addresses
that the master device communicates with.
You also create three Modbus analog input points, which are used to read the
measurements of the phase 1 current, line 1 to Neutral voltage, and total active
power from addressed registers in the power meter. You configure the analog input
points to enable the Automation Server to read the power meter registers correctly
and to change the units of measurement (to A, V, and kW respectively) for the
values presented in the graphic. Finally, you create and configure a Modbus
multistate input point that is used to read the system type: 4.3 Ct, 3.3 Ct, 3.2 Ct, or
2.1 Ct. The system type determines which voltage values are presented in the
graphic.
In our example, you use the Spreadsheet view to create and configure the Modbus
slave device in one action and to quickly create and configure all Modbus points.
5. Enter the properties of the Modbus device. In this example, enter Name:
Power Meter 1, Device address: 1 (to represent the first device in the
network), Poll register: 1001, and Poll code: 04. Keep the default Poll
interval.
Caution
Ensure that each device in a network is configured with a unique
address.
Important
Consult the datasheet for the device to be configured. The datasheet
contains the number of the register and the code you must enter to
establish basic communications.
Important
Modbus devices can differ considerably in the ways they can be configured.
Consult the device datasheet before configuring a point in the device.
5. Enter the properties of the Modbus point. In this example, enter Name: P,
Description: Power, real, Unit: kW, Register number: 1023 (According
to the PM9C datasheet, register number 1023 contains the measured value
for the total active power in kW/100.), Register type: 32 bit signed
swapped (For the PM9C meter, the two 16-bit words of a 32-bit value are
arranged with the higher order word having the lower register number, that is,
the two words are swapped. Register number 1023 therefore contains the
higher order word and register 1024 contains the lower order word.), Read
function code: 03, and Gain: 0.01 (to present the value in kW). Leave the
Bit mask as is (in this example, an analog point is read, and therefore no
bitmask is required) and also leave the Offset as is (no offset is required).
Tip
You can use the shortcut key Ctrl + U to change the engineering unit
of a value in the Spreadsheet view.
6. Create additional Modbus points using Steps 4-5. In this example, create
the Modbus points specified in the tables below.
Tip
You can also copy and paste cells, rows, and entire blocks.
In this example, create the rest of the Modbus points on the Power Meter 1
Modbus device. Use the following settings:
Component Setting
Name Vmode
Unit No Unit
Gain 1.00
a) According to the PM9C datasheet, register number 103 contains information on the system type.
b) According to the PM9C datasheet, register number 103 contains a 16-bit unsigned value.
Component Setting
Name VaN
Unit V
Gain 0.001c
a) According to the PM9C datasheet, register number 1015 contains the measured value for the line 1
to Neutral voltage in mV.
b) According to the PM9C datasheet, register number 1015 contains a 32-bit unsigned value
c) This gain is used to present the value in V.
Component Setting
Name Ia
Unit A
Gain 0.001c
a) According to the PM9C datasheet, register number 1001 contains the measured value for the
phase 1 current in mA.
b) According to the PM9C datasheet, register number 1001 contains a 32-bit unsigned value.
c) This gain is used to present the value in A.
Topics
Creating a Graphic
Binding a Graphic to a Variable
6 Displaying Modbus Data in a TGML Graphic
Our Example
In this chapter, you use a graphic to make the measurement data from the power
meter visible in WorkStation. To do this, you create a graphic object that will serve
as a container for the TGML graphic you import. You then bind the Modbus Analog
Input Points, which represent the measured values, to the graphic. You also bind
the Modbus Multistate Input Point, which represents the system type, to the
graphic. In the Graphics view, you can observe the dynamically changing values in
the graphic.
To create a graphic
1. In WorkStation, in the System Tree pane, select the folder or server where
you want to create the graphic. In this example, select ...University X
ES1/Servers/CPlant AS/Modbus Master Network/Power Meter 1.
2. On the File menu, point to New and then click Graphic.
3. In the Name box, type a name for the graphic. In this example, type “Basic
Display.”
4. In the Description box, type a description for the graphic. In this example,
type “Power Meter 1.”
5. Click Next.
Continued on next page
6. In the File box, enter a .tgml file if the graphic has already been created using
Graphics Editor. In this example, enter the path to Basic Display.tgml.
7. Click Create.
4. Drag the variable or object to the box in the Binding column for the binding
point you want to bind. In this example, drag the Modbus analog input point
to the P binding box.
For this example, repeat the procedure to bind the remaining Modbus points to the
graphic: ...University X ES1/Servers/CPlant AS/Modbus Master
Network/Power Meter 1/Basic Display. Use the following settings:
Ia ...University X ES1/Servers/CPlant
AS/Modbus Master Network/Power Meter
1/Ia
Topics
Exporting a Solution
Importing a Solution
Renaming a Folder or Object
Configuring a Modbus Device
Summary
7 Exporting and Importing a Modbus Device
Our Example
In this chapter, you create a new Modbus slave device (a power meter) by using the
import and export method, which ensures engineering efficiency. To do this, you
export an existing device to a file, which is saved to another location, and then
import the file to the Automation Server. You rename the new device to suit your
project. Finally, you configure the device address to enable the master device (the
Automation Server) to communicate with the slave device.
Multiple Modbus devices can be created using different methods: copy and paste,
export and import, or Spreadsheet view. In our example, you import the file to the
same server as the exported device. In such cases, you can, for example, use the
copy and paste method instead. The advantage of using the import and export
method is that you can use the exported file to create Modbus objects, networks,
devices, and solutions in another server.
To export a solution
1. In WorkStation, in the System Tree pane or the List View, select the
solution that you want to export. In this example, select ...University X
ES1/Servers/CPlant AS/Modbus Master Network/Power Meter 1.
2. On the File menu, click Export.
3. In the Select an Export Reference Filter option, select the filter type to be
used for the export. In this example, click Export.
4. Click Export.
5. In the Save As dialog box, enter the location and file name. In this example,
enter a file name that reflects what the file contains, for example “PM9C.xml”.
Store the file in a location that enables you to share and reuse the file easily.
6. Click Save.
7. Click Close when the export is complete.
To import a solution
1. In WorkStation, in the System Tree pane or List View, select a location
where you want to import a solution. In this example, select ...University
X ES1/Servers/CPlant AS/Modbus Master Network.
2. On the File menu, click Import.
3. In the Open dialog box, select the file and click Open. In this example,
select the file that you previously exported from “Power Meter 1”.
4. In the Import dialog box, resolve any name conflicts listed under Name
conflicts. In this example, do not try to resolve the name conflict. You will
rename the device later.
5. Click Import.
Note
When changing the name of a folder or server, you also have to reconfigure users
and user groups path permissions to this server or folder. For more information,
see the Path Permissions topic on WebHelp.
Note
You cannot change the name of a domain that is shared between servers.
For more information, see the Move, Copy, Paste, Rename, and Delete topic on
WebHelp.
In this example, you change the name of the new Modbus device from “Power
Meter 1_2” to “Power Meter 2” to indicate that it is the second power meter in the
Modbus master network.
Caution
Ensure that each device in a network is configured with a unique
address.
5. Click OK.
Note
• In a live system, the Device Status property starts Online and
changes to Offline if device polls fail.
7.5 Summary
You have now implemented a Modbus Master Network and a Modbus power meter
in the Automation Server and are monitoring selected data from the power meter.
The data from the power meter is now available in the Building Operation database
and can be used in trend logs and trend charts, displayed in graphics, and
monitored by alarms.
The communication with the power meter has been tested, verified, and exported
to a file for re-use in other projects.
04-14029-01-en
July 2013