Integration GuideModbus
Integration GuideModbus
POL6XX
POL6XX
Climatix
Modbus communication, slave mode
Integration guide
CB1J3960en
01.03.2010
Building Technologies
2 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
Table of contents
1
1.1
Revision history.........................................................................................5
1.2
1.3
1.4
1.5
1.6
1.7
1.8
2.1
Modbus protocol........................................................................................9
2.2
RS485 networks......................................................................................10
2.3
2.4
2.5
2.6
Tools........................................................................................................ 11
Commission instructions.....................................................................13
3.1
General ...................................................................................................13
3.2
3.3
3.4
3.5
Integration..............................................................................................21
4.1
4.2
Function codes........................................................................................21
4.3
Other information..................................................................................23
5.1
Troubleshooting, tips...............................................................................23
5.2
5.3
5.4
Index
................................................................................................................27
3 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
4 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
1.1
Revision history
Version
Date
Changes
1.0
01.03.2010
First edition
1.2
Validity
Section
Pages
Type (ASN)
POL902.00/STD
POL63x.00/STD
POL638.00/STD
Short name
Modbus module
Basic controller
TCP/IP controller
Product versions
Description and functional scope of the products are based on the Climatix Valid
Version Set 8.0 or higher and application based on standard AHU.
Target audience
Prerequisites
1.3
Further information
Reference documents
5 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
1.4
Document conventions
Symbols used
This symbol draws your attention to special safety notes and warnings. Failing to
observe these notes may result in injury and/or serious damages.
STOP
This symbol denotes special information that, when failed to observe, may result in
faulty functionality or loss of data.
Notes with this symbol provide important information that requires appropriate
attention.
This symbol marks passages containing tips and tricks.
Abbreviations
Meaning
Building Automation and Control System
Board Support Package (operating system)
Controller family with common tools
A device for transfer data between different kind of networks
Human Machine Interface, e.g Operator unit
Climatix Dot Matrix HMI, POL895.51
Heating, Ventilating, Air Conditioning
Least Significant Bit
Most Significant Bit
Remote Terminal Unit
Safety Extra-Low Voltage
Transmission Control Protocol, e.g. Ethernet/Internet
6 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
1.5
Field of application
Intended use
Electrical
installation
Fuses, switches, wiring and grounding must comply with local safety regulations for
electrical installations.
Wiring
When wiring, strictly separate AC 230 V mains voltage from AC 24 V safety extralow voltage (SELV) to protect against electrical shock!
Commissioning and
maintenance
Only qualified staff trained accordingly may prepare for use, commission, and
maintain Modbus communication modules.
Maintenance
Faults
Only authorized staff may diagnose and correct faults and recommission the plant.
This applies to working within the panel as well (e.g. testing or changing fuses).
Refer to the environmental conditions specified in the respective data sheets for
storage and transport.
If in doubt, contact your supplier.
Disposal
7 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
1.6
Trademarks, legal
owners
The table below lists the third-party trademarks used in this document and their
legal owners. The use of trademarks is subject to international and domestic
provisions of the law.
Trademarks
Modbus
Legal owner
The Modbus Organization, Hopkinton, MA, USA
All product names listed in the table are registered () or not registered ()
trademarks of the owner listed in the table. We forgo the labeling (e.g. using the
symbols and ) of trademarks for the purposes of legibility based on the
reference in this section.
Copyright
This document may be duplicated and distributed only with the express permission
of Siemens, and may be passed on only to authorized persons or companies with
the required technical knowledge.
1.7
Document contents
Quality assurance
1.8
Before using our products, it is important that you read the documents supplied
with or ordered at the same time as the products (equipment, applications, tools
etc.) carefully and in full.
We assume that persons using our products and documents are authorized and
trained appropriately and have the technical knowledge required to use our
products as intended.
Siemens assumes no liability to the extent allowed under the law for any losses
resulting from a failure to comply with the aforementioned points or for the improper
compliance of the same.
8 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
Modbus networks
2.1
Modbus protocol
Modbus, general
information
The following section provides only a brief overview of the Modbus protocol.
For the full specification, see:
"Modicon Modbus Protocol Reference Guide PI MBUS 300 Rev. J".
Master/slave protocol
Transactions on
Modbus
The Modbus master uses a slave query to start transactions on the network. The
slave either responds positively with the requested service (response) or transmits
an "exception message".
Function codes
The type of transaction is defined by the function code transmitted in the Modbus
telegrams. A function code defines the following:
Structure of the telegram, query and response.
Direction of data transmission (master slave or slave master).
Data format of data point.
Transmission modes
Gateway
Master
P3934Z03
Slave
Slave
See www.modbus.org
9 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
2.2
RS485 networks
RS485 definition
2.3
Handle the RS485 bus in practice as 3-wire network even though RS485 as per
EIA 485 only specifies a two-wire line for differential signals. Reason:
Devices with RS485 interface have third connection named "Common", "Ground"
or "REF" (e.g. in Climatix).
This connection is not used to connect to ground, but rather for a common
reference signal. Voltage on lines Tx/Rx (or +/-) are measured relative to the
voltage level on the reference signal.
You do not need screens. The twisted cable for Tx and Rx suppresses interference
more effectively than a screen.
You can use the third wire as screen for emergencies. It is better, however, to use a
wire of the second wire pair of a CAT5 cable; see "Cable selection" below.
Cat5 cables?
Yes, these cables are good. Use a pair for Tx/Rx and a wire of the other pair for the
reference signal (ground).
We recommend the following cables:
Manufacture / Type
Belden 3106A
Bild02
Belden 3107A
Bild03
Specifications
Multi-Conductor - EIA Industrial RS-485 PLTC/CM
22 AWG stranded (730) 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.
Multi-Conductor - EIA Industrial RS-485 PLTC/CM
22 AWG stranded (730) 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.
10 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
RS485 does not specify max cable length. It depends largely on transmission
rates:
The greater the transmission rate, the shorter the possible cable length.
Rule of thumb for AWG cable:
Cable length [m] x data rate [bps] < 108.
The following guide values result:
Baud rate
9,600
19,200
38,400
2.4
Termination resistance
Bus termination
As Modbus RTU is based on an RS485 bus, both bus ends require terminating
resistances.
In Climatix, the resistances can be enabled or disabled via operator unit. No
external resistance is needed.
2.5
TCP/IP networks
Modbus TCP in Climatix uses the TCP port 502. This port number is not
changeable.
IP address
The IP address is assigned either dynamically via the DHCP server or set manually
via HMI. Normally is to use fixed IP address.
If the controller is Server (Slave) he is able to serve 3 Modbus IP Clients, so it is
possible to connect for example 3 touch panels to one controller at the same time.
The onboard Ethernet port used for Modbus can be used for remote service or
internal web HMI at the same time as Modbus TCP.
2.6
Modbus master
simulation tools
Tools
Modbus slave devices e.g. Climatix controllers can be tested with several Modbus
master simulation tools such as "Modbus Poll" or "ModScan" from a computer.
"Modbus Poll" can be downloaded from www.modbustools.com.
A RS485/RS232 converter or a Modbus RTU/TCP gateway may be needed to
connect to a computer.
11 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
Blank page
12 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
Connection ways
Commission instructions
3.1
General
Internal RTU
(POL63x)
A Modbus RTU, via RS485, interface is always available on the basic controller
POL63x.00/STD. It can be defined as the master or slave or switched off.
The internal Modbus interface is automatically set to master if any master function
is enabled in the controller.
Internal TCP
(POL638)
External communication
module POL902
An extra slave interface, with two separate channels, is always provided with the
external Modbus communication module POL902. The internal interface cannot be
used if the external module is used and the internal interface is no longer required
as the master.
Prerequisite for commissioning any of the above mentionned ways:
Working application loaded and started in the Climatix controller.
13 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
3.2
Involved devices
POL63x
RS485
HMI-DM
Modbus RTU
Connection
Configuration via
operator unit
14 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
After restart, the internal Modbus RTU is configured and ready to use.
As a matter of principle, the controller must be restarted with "Reset required !!" or
power off/on the controller after changing any settings to assume the data.
Other setting than described above has nothing to do with Modbus RTU slave
mode and should not be changed.
15 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
3.3
Involved devices
POL638
Ethernet
HMI-DM
Modbus TCP
Connection
Connect the Climatix controller to the Ethernet (Modbus TCP) with a standard
network cable.
Configuration via
operator unit
16 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
3.4
Design
REF
T2
1
RS485
SIEMENS
SIEMENS
POL902.00/xxx
REF
T1
RS485
BSP
BUS
4
3
Elements and
connections
Status LEDs
The status LEDs "BSP" and "BUS" can light red, green and yellow during
operation.
"BSP" LED
This LED informs on the status of the "Board Support Package" (BSP). Color and
flashing frequency of the LED:
Color
Flashing frequency
Meaning / Mode
Red / yellow 1 s "on" / 1 s "off"
Upgrade mode.
Green
Steady "on"
BSP operating and communication with
controller working.
Yellow
Steady "on"
BSP operating, but no communication with
controller.
Red
Flashing at 2Hz
BSP error (software error).
Red
Steady "on"
Hardware fault.
"BUS" LED
This LED shows the status of external communication with the bus, not to the
controller. Color and flashing frequency of the LED:
Color
Flashing frequency
Meaning / Mode
Green
Steady "on"
Communication active.
Red
Steady "on"
Communication interrupted.
Power supply is outside the allowed range if both LEDs are dark.
17 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
3.5
Involved devices
POL902 / POL6XX
HMI-DM
Connection
Proceed as follows to connect the Modbus module to the Modbus bus via RS485
(see also description in section for the Modbus module):
Step
Action
1
Controller OFF.
2
Connect Modbus module to controller using plug connection.
3
Connect Modbus bus cable to Modbus module (pins + and -, Ref for
GND).
Use the T1 interface if only one master/bus should be connected.
Use the T2 interface if an additionally master/bus should be connected.
4
Controller ON:
The module starts / initialization begins.
As soon as the two LEDs "BSP" and "BUS" are steady green,
communication with the controller and Modbus bus is active.
Caution!
HMI must be reset a second time to update; prior to parameterization.
Configuration via
operator unit
Proceed as follows to configure the Modbus module for Modbus RTU step by step:
Step
Action
1
Log in to HMI using the password for level 4 (Service), default 2000.
2
Select Main Index > System overview > Communication > Modbus >
Module[x] Modbus >
or
Main Index > System overview > Communication > Comm module
overview > Module[x] Modbus >
Note! [x] is the position of the connected communication module. This is
only information used when more than one module is connected.
3
Select Settings channel [y] >
Channel 0 / Channel 1. Displays as of this point the data for the first
Modbus channel (channel 0, terminal T1) and the second Modbus
channel (channel 1, terminal T2) of the module.
These are the corresponding parameters, with the exception of enable:
Select Enable:
Only for channel 1. Set to Active to enable channel 1 (T2).
4
Select Slave address:
Enter the corresponding Modbus slave address (1247).
5
Select Baud rate:
Enter the transmission rate as per the Modbus (2400, 4800, 9600,
19200 and 38400). All participants must have the same setting.
18 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
Step
6
10
Action
Select Stop bits:
One or two stop bits
All participants must have the same setting.
Select Parity:
None, even or odd parity.
All participants must have the same setting.
Select Response timeout:
Settings access time for master.
The master must undertake read access within this period, otherwise an
alarm is triggered
Select Termination:
The RS485 topology must always be ended using wave resistors.
They can be enabled or disabled as described in Section,2.4
Select Reset required !!:
When done, restart controller using this command.
19 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
Blank page
20 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
Integration
4.1
Map registers
Modbus registers are organized into reference types identified by the leading
numeric character of the reference address:
The "x" following the leading character represents a four-digit reference address.
ModbusType
Coil Status
Leading character
Input Status
1xxxx
Input Register
3xxxx
Holding
Register
4xxxx
The leading character is generally implied by the function code and omitted from
the address specified for a given function. The leading character also identifies the
I/O data type.
4.2
Meaning
Reference
0xxxx
Function codes
The functions below are used to access the registers outlined in the register map of
the module for sending and receiving data.
Function
Code
Modbus function
01
Read CoilStatus-Register
(ID-COIL)
02
Read InputStatus-Register
(ID-STATE)
03
Read Holding-Register
(ID-HOLD)
04
Read Input-Register
(ID-INP)
05
06
15
16
21 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
4.3
Register restrictions
The internal Modbus onboard the controller has limited number of registers. Input
and holding registers are limited to max 125 addresses. The Modbus
communication module can handle up to 1000 addresses. In some applications are
some of the reference addresses higher than 125 and it is then only possible to
access them via the Modbus communication module.
Addresses used
All reference addresses from 0001-0125 for on-board and -1000 for module are
generated and can be accessed even if not listed. As a result, multiple
coils/registers can be forced/reset even if there is a gap between two reference
addresses.
Do not read/write any addresses above 0125/1000. Doing so causes an exception
and communication fails.
All address types starts with 1, and due to that some Master devices starts with 0
its in that case necessary to subtract all addresses in the reference list with 1.
The reference addresses are found in a separate document and are specific for the
actual application. All different applications, and in some cases also application
versions, have different reference addresses. The specific document for the actual
application must be used to see what reference addresses that are used.
The actual application name and version can be found using the HMI. In some
cases it is also good to check the controller BSP version.
Explanation / Example
e.g. Siemens
e.g. STD_AHU_vX.XX
Application creation date; can be changed by
application manufacturer
e.g. plant name.
e.g. plant address.
e.g. plant address.
Explanation / Example
Controller operating system.
22 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
Other information
5.1
Troubleshooting, tips
General
Modbus
communication error
RS485 network
TCP/IP network
23 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
5.2
TCPI/UDP ports
Network:
Disconnected
FAQ on TCP/IP
Port number
21
23
80
502
4242
Type
UDP
TCP
TCP
Used for
FTP
Telnet/Ping
Web
Modbus
Scope, RemoteOPC TCP/IP
24 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
5.3
Situation
SD
POL902 / POL6XX
Prerequisite
BSP
BUS
Upgrade procedure
The upgrade procedure and how to save/load all settings are not described in this
manual. See basic documentation for the specific product depending of what
upgrade is needed.
25 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
5.4
Preamble
Some inputs can be overridden via Modbus, see reference addresses. However
these inputs must first be setup for this before it works. Inputs can work, only via
hardware, only via communication or as a combination.
Prerequisite
Configuration via
operator unit
Range
Hardware
Comm
And.
Or.
PreferedHW
PrefComm
Value
selector
(Analog
inputs)
Hardware
Comm
Average
Minimum
Maximum.
PreferedHW
PrefComm
Function
Select valid input value for the application:
Value on hardware input.
Value from communications.
The input is 1, if the value on the hardware input
and the value from communications = 1. Alarm
triggers, if one of the two values is invalid.
The input is 1, if the value on the hardware input
or the value from communications = 1. Alarm
triggers, if one of the two values is invalid.
Value on hardware input has priority. The value
from communications assumed if invalid. Alarm
triggers, if both values are invalid.
Value from communications has priority. The
value from hardware input assumed if invalid.
Alarm triggers, if both values are invalid.
Select valid input value for the application:
Value on hardware input.
Value from communications.
Average from the values on hardware input and
from communications. Alarm triggers, if one of
the two values is invalid.
Lowest value from the values on hardware input
and from communications. Alarm triggers, if one
of the two values is invalid.
Highest value from the values on hardware input
and from communications. Alarm triggers, if one
of the two values is invalid.
Value on hardware input has priority. The value
from communications assumed if invalid. Alarm
triggers, if both values are invalid.
Value from communications has priority. The
value from hardware input assumed if invalid.
Alarm triggers, if both values are invalid.
26 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
Index
A
Abbreviations .......................................................... 6
Application information ......................................... 22
B
Before you start ...................................................... 5
Bus termination..................................................... 11
C
Commission instructions....................................... 13
Commission internal Modbus RTU....................... 14
Commission internal Modbus TCP ....................... 16
Commission Modbus modules ............................. 18
D
Document use......................................................... 8
Document validity ................................................... 5
Documents, other ................................................... 5
F
Function codes ..................................................... 21
I
I/Os via communication ........................................ 26
M
Map register.......................................................... 21
Modbus module mechanical design ..................... 17
Modbus protocol......................................................9
Modbus reference addresses................................22
Modbus TCP Ethernet.............................................9
Q
Quality assurance....................................................8
R
Revision history .......................................................5
RS485 cable installation........................................10
RS485 networks ....................................................10
S
Safety notes. ...........................................................7
Status displays ......................................................17
Symbols in document ..............................................6
T
Target audience.......................................................5
TCP/IP FAQ...........................................................24
TCP/IP networks ...................................................11
Tools ......................................................................11
Trademarks and copyrights.....................................8
Troubleshooting, tips .............................................23
U
Upgrade via SD card .............................................25
27 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010
28 / 28
Siemens
Building Technologies
CB1J3960en
01.03.2010