Modbus for FICO, slave mode General Engineering Guide

Modbus for FICO, slave mode General Engineering Guide
Modbus for FICO, slave mode
General
Engineering Guide
1/16
Modbus.en
2011.11.21
Contents
1
About this Document .................................................................................... 3
1.1
Foreword....................................................................................................... 3
1.2
Notes on Use ................................................................................................ 3
1.3
Symbols and Abbreviations .......................................................................... 3
1.4
Revision History ............................................................................................ 3
2
General ......................................................................................................... 4
2.1
The Modbus protocol .................................................................................... 4
2.2
RS485 networks............................................................................................ 5
2.3
Tools ............................................................................................................. 5
2.4
Troubleshooting, Tips ................................................................................... 5
3
Connection and Configuration ...................................................................... 6
3.1
The system ................................................................................................... 6
3.2
General ......................................................................................................... 8
3.3
Connection via cable .................................................................................... 8
3.4
Connection via ethernet network .................................................................. 9
3.5
Configure ...................................................................................................... 9
4
Register map and function codes ............................................................... 10
4.1
Register map .............................................................................................. 10
4.2
Function codes ........................................................................................... 10
5
Reference addresses.................................................................................. 11
5.1
General ....................................................................................................... 11
5.2
Coil Status .................................................................................................. 12
5.3
Input Status................................................................................................. 12
5.4
Input Register ............................................................................................. 12
5.5
Holding Register ......................................................................................... 14
2/16
Modbus.en
2011.11.21
1
About this Document
1.1 Foreword
The purpose of this document is to provide users with a quick and simple means to
familiarize themselves with the configuration and use of Modbus on the control system
FICO.
Purpose
1.2
Target audience
Notes on Use
This document is intended for integrators who perform commissioning of the Modbus
communication.
For operation and planning of integration of the firedampersystem, please refer to
additional documents, such as:
 Consultants technical description of the site.
 Modicon Modbus Protocol Reference Guide PI-MBUS-300 Rev. J.
 RS485 installations guidelines.
 FIFLO SE 2008.11
Further information
1.3
Symbols and Abbreviations
Passages introduced by this symbol indicate a warning to help prevent incorrect
operation.
STOP
Passages introduced by this symbol indicate that the text must be read with special
attention.
Paragraphs with this symbol provide tips.
Abbreviations
Abbreviation
RTU
TCP/IP
Gateway
LSB
MSB
Description
Remote Terminal Unit
Transmission Control Protocol, e.g. Ethernet/Internet
A device for transfer data between different kind of networks
Least Significant Bit
Most Significant Bit
1.4 Revision History
Revision
1.0
Date
2009-01-16
Author
Thomas Åhlén
Remark
First release
3/16
Modbus.en
2011.11.21
2
General
2.1 The Modbus protocol
The following section provides only a brief overview of the Modbus protocol.
For the full specification, refer to "Modicon Modbus Protocol Reference Guide
PI-MBUS-300 Rev. J".
Master/slave protocol
The Modbus is a master/slave protocol. By definition, this means that a Modbus
network contains one, and only one, master and at least one slave.
Transactions on the
Modbus
The Modbus master starts the transactions on the network with a slave query. The
slave either responds positively with the requested service (response) or transmits an
"exception message". In the remainder of this document, these query/response
sequences are also referred to as "Modbus telegrams".
Function codes
The type of transaction is defined by the function code transmitted in the Modbus
telegrams. A function code defines the following:



Transmission modes
Structure of the telegram, query and response
Direction of data transmission (master  slave or slavemaster)
Data format of data point (bit or 16-bit register)
The Modbus protocol defines two alternative serial transmission modes:
These modes have the following characteristics:
RTU (Remote Terminal Unit) mode
 Binary-coded data
 Start and end of telegrams marked by timed pauses (a "silent interval") between
the characters transmitted.
 Check sum algorithm: CRC (Cyclic Redundancy Check)
ASCII mode
 Data in hexadecimal notation
 Beginning and end of telegrams marked by start and end characters.
 Check sum algorithm: LRC (Longitudinal Redundancy Check)
Telegrams with
multiple data points
Certain types of Modbus transactions permit the transmission of a variable number of
Modbus data points (bit or 16-bit register) in a single telegram.
Modbus TCP
Ethernet
A Modbus TCP/RTU gateway can be used to connect a Modbus/TCP master to one or
several slaves. The Modbus TCP/RTU gateway will act as a Modbus/TCP slave on a
Ethernet network, and transform the queries to the serial Modbus network and back
again. See also chapter 3.3 for hints when communication via Ethernet to FCLA-128.
4/16
Modbus.en
2011.11.21
2.2 RS485 networks
RS485 is a balanced line, half-duplex transmission system that meets the requirements
for a truly multi-point communications network, and the standard specifies up to 32
drivers and 32 receivers on a single (2-wire) bus. Half-duplex data transmission means
that data can be transmitted in both directions on a signal carrier, but not at the same
time.
Specifications
RS485
Mode of Operation
Total Number of Drivers and Receivers on One Line (One
driver active at a time for RS485 networks)
Maximum Cable Length
Maximum Data Rate (10m – 1200m)
Maximum Driver Output Voltage
Driver Output Signal Level (Loaded Min.)
Driver Output Signal Level (Unloaded Max)
Driver Load Impedance (Ohms)
Max. Driver Current in High Z State, Power On
Max. Driver Current in High Z State, Power Off
Slew Rate (Max.)
Receiver Input Voltage Range
Receiver Input Sensitivity
Receiver Input Resistance (Ohms), (1 Standard Load for
RS485)
Differential
32 Driver
32 Recvr
1200 meter
10Mb/s-100Kb/s
-7V to +12V
+/-1.5V
+/-6V
54
+/-100uA
+/-100uA
N/A
-7V to +12V
+/-200mV
>=12k
2.3 Tools
Modbus slave devices can be tested with several Modbus master simulation tools, like
“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.
2.4
Troubleshooting, Tips
Modbus
Communication error
 The slave address must be unique in the network, valid addresses are from1-247.
 Only reference addresses that are generated can be read/write, see chapter 5 for
more information about the specific application.
RS485 network
 Baudrate, Parity and Stopbits must match the network and the Master.
 The 2-wire bus is NOT interchangeable and must be connected correctly.
 In case of long distance and/or high Baudrate, please consider end of line resistors
like 120 Ohm on both sides (according to RS485 rules).
5/16
Modbus.en
2011.11.21
3
Connection and Configuration
3.1
The system
FICO is a system for monitoring and surveillance of fire dampers and smoke detectors.
The system consist of the control unit FCLA-128, the multibox FCBA and the relay unit
FCFA-1. The control unit can handle up to 64 multiboxes and each multibox can handle
2 dampers and smoke detectors. The relay unit has one relay for interlocking of the
supply fan.
The system can be divided in up to 10 fire groups. The control unit automatically tests
the dampers with a user defined frequency. The damper test can also be initiated via
the modbus master and then if needed divided into several “testgroups” since there is a
possibility to choose test of individual multiboxes, groups or the whole system via
modbus commands.
It is also possible, when integrated via modbus, to interlock individual multiboxes or
groups which gives the opportunity to create user zones in the master device. These
zone can be interlocked e.g. via time schedulers during non-office hours. See also the
example configuration below.
FCLA-128
Supply 230 V
Modbus communication
230 V
Relay for firealarm
Relay for servicealarm
Interlocking of Ahu1 (group A)
Interlocking of Ahu2 (group B)
FCBA
1
ST1A
ST2A
ST3A
ST4A
Group A
Interlocking
Ahu1
230 V
FCBA
2
Interlocking
FCBA
3
230 V
ST1B
ST2B
ST3B
ST4B
Group B
Interlocking
Ahu2
FCBA
4
230 V
Interlocking
FCBA
5
230 V
ST1C
ST2C
ST3C
ST4C
230 V
Group C
FCBA
6
FCFA-1
230 V
Interlocking
Ahu3
Interlocking
FCBA
7
230 V
ST1D
ST2D
ST3D
ST4D
Group D
230 V
FCFA-1
Interlocking
Ahu4
230 V
FCBA
8
Interlocking
6/16
Modbus.en
2011.11.21
Multibox
1
2
3
4
5
6
7
8
Ahu, (relay unit)
1
1
2
2
3
3
4
4
Group
A
A
B
B
C
C
D
D
User zones
1
1
1
2
3
3
3
3
Comment
Office hour 07:00 – 17:00
Office hour 08:00 – 20:00
Office hour 07:00 – 18:00
Groups:
Groups refers to the groups in the FCLA-128.
In the example system there are 4 groups. Each group interlocks its corresponding
dampers and also its ahu, this is controlled by the FCLA-128.
In this system group A consists of Ahu1 and multibox 1,2 and group B consists of Ahu2
and multibox 3,4 etc.
User zones:
The FCLA-128 does not handle user zones and therefore must such zones be
managed via modbus communication. In the example system user zones 1 consists of
multibox 1-3, user zone 2 of multibox 4 and user zone 3 of multibox 5-8.
If user zone 1 is interlocked but not user zone 2 the Ahu2 mustn’t stop, but if also user
zone 2 interlocks the Ahu2 must stop.
To be able to create such configuration the possibility to choose if the ahu should stop
or not has been implemented when interlocking individual multiboxes.
Important!
The integrator has to take care not to close all dampers while the fan is still running.
7/16
Modbus.en
2011.11.21
3.2 General
The RS485 interface is present on the FCLA-128.
3.3 Connection via cable
Follow the instructions below to connect to the RS485 interface.
Technical data
RS485 / Modbus RTU
2-wire bus connection, twisted pair
Bus connection / electronics
Data
24(+), 25(-), 26 (com) NOT
interchangeable
Non-floating
8/16
Modbus.en
2011.11.21
3.4
Connection via ethernet network
To connect to the system unit FCLA-128 via a Ethernet network a gateway must be
used at the FCLA-128. If the master cannot integrate Modbus/TCP a gateway must
also be installed at that side. The picture bellows shows a topology where a gateway
has been installed also at the master side.
Modbus
Master
Modbus/RTU alt
Modbus/ASCII
Modbus
gateway
Own IP : 192.168.0.10
Slave adr. 2 corresponds to IP 192.168.0.11
Serial interface : Master, Modbus/RTU
Modbus/TCP
TCP/IP
Modbus
gateway
Own IP : 192.168.0.11
Serial interface : Slav, Modbus/RTU
Modbus/RTU
FCLA-128
For correct configuration of the gateways, please refer to the specific gateway manuals.
A special modbus/TCP – modbus/serial gateway is recommended, do not use a
standard terminal server.
Tip: Modbus/RTU uses a timeout of 3,5 character instead of a stop character to define
end of message. Communicating over a large network eg. Internet it can cause
problems due to the nature of TCP/IP. It can be a good idea to use modbus/ASCII on
the master side (and only on the master side) when using a gateway. This can only be
realized if a modbus gateway is used rather than a standard terminal server. If the
master only can use Modbus/RTU correct message and character timeouts should be
configured.
3.5 Configure
Default communication settings are : slave address 2, 9600 baud, 8 databits, 1 stopbit,
parity none. Follow the instructions below to configure RS485 and Modbus.
1.
Commissioning unit with all settings according to the manual before starting to
configure Modbus.
2.
Log in with password (2000).
3.
4.
5.
6.
7.
Navigate to menu “Settings – Modbus”.
Set the slave address for the device. (1-247, Must be unique).
Set Baudrate for RS485 (300-19200)
Set Parity for RS485 (None, Even, Odd)
Set number of Stopbit for RS485 (1 or 2)
Push “ESC” to return to main menu.
9/16
Modbus.en
2011.11.21
4
Register map and function codes
4.1 Register map
Modbus registers are organized into reference types identified by the leading number of
the reference address:
The "x" following the leading character represents a four-digit reference address.
Modbus Data formats
ModbusType
Reference
Description (refer to a Master device)
Coil Status
0xxxx
Read/Write Discrete Outputs or Coils.
A 0x reference address is used to drive output data
to a digital 1-bit output channel.
Input Status
1xxxx
Read Discrete Inputs.
The 1-bit status of a 1x reference address is
controlled by the corresponding digital input channel.
Input Register
3xxxx
Read Input Registers.
A 3x reference register contains a 16-bit number
received from an external source—e.g. an analog
signal.
Holding
Register
4xxxx
Read/Write Output or Holding Registers.
A 4x register is used to store 16-bits of numerical
data (binary or decimal), or to send the data from the
CPU to an output channel.
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 Function codes
The functions below are used to access the registers outlined in the register map of the
module for sending and receiving data.
Supported
Modbus commands
Function
Code
Modbus function
Modbus master application
01
Read Coil Status
Read multiple DOs
(0xAdr)
02
Read Input Status
Read multiple DIs
(1xAdr)
03
Read Holding Registers
Read multiple AOs
(4xAdr)
04
Read Input Registers
Read multiple AIs
(3xAdr)
05
Force Single Coil
Write single DO
(0xAdr)
06
Preset Single Register
Write single AO
(4xAdr)
15
Force Multiple Coils
Write multiple DOs
(0xAdr)
16
Preset Multiple Registers
Write multiple AOs
(4xAdr)
When the slave device responds to the master, it uses the function code field to
indicate either a normal (error-free) response, or that some kind of error has occurred
(an exception response).
10/16
Modbus.en
2011.11.21
5
Reference addresses
5.1
General
This chapter describes the reference addresses used in the application.
Used addresses
Reference addresses marked “Not used” are should not be accessed. (FCLA-128 will
answer with the correct error message.)
Do not Read/Write any addresses not mentioned in this manual. If so there will be
an exception response and the communication fails.
All address types starts with 1, and due to that some Master devices starts with 0
it’s in that case necessary to subtract all addresses in this manual with 1.
Presentation
- 16 bit real values are presented in their actual value/unit. E.g. °C, %, Pa, l/s
- 16 bit states are presented either as a number or as a bit pattern, see the reference
address description
- 1 bit status are presented as 0=Off and 1=On
- 1 bit alarms are presented as 0=Normal and 1=Alarm
11/16
Modbus.en
2011.11.21
5.2
Coil Status
Address
0x0001
0x0003
0x101..199
Description
External alarm reset, 1 to reset external
alarm.
Set interlock, 1 to activate interlock, 0 to
deactivate(normal mode)
Set system mode, 1=Auto, 0=Standby
Reset FCBA fire alarm, 1 to reset.
0x200
0x201..299
Not used
Reset FCBA service alarm, 1 to reset.
0x300
0x301..399
Not used
Reset FCBA damper failure alarm, 1 to
reset.
Not used
0x0002
0x400..65535
5.3
Values / Unit
0-1
Remark
Automatically set back to
0
0-1
0-1
0-1
Automatically set back to
0
Automatically set back to
0
0-1
Automatically set back to
0
Input Status
Address
1x0001
Description
Fire alarm
Values / Unit
0-1
1x0002
Service alarm
0-1
1x0003
1x0004
External alarm
Interlock
0-1
0-1
Remark
1 = alarm, summarized
from all multiboxes
1 = alarm, summarized
from all multiboxes
1 = alarm
1 = interlock active,
(whole FCLA-128)
1x0005..65535 Not used
5.4
Address
3x0001
3x0002
Input Register
Description
Copy of discrete inputs 4..1 in least
significant bit
Bit representation:
00=Fire alarm if set
01=service alarm if set
02=External alarm if set
03=Interlock if set
04..15=Not used, read as 0(zero)
Actual test interval, days
0..7, 0 for disabled.
If 7 days, (weekday *8) is added (Sun 0,
Mon 8, Tue 16, Wed 24, Thu 32, Fri 40,
Sat 48)
Example:
If an interval of 168hours on Thursday is
desired the result is :
xxxxxxxxxx100111 = 0x0027 = 39 =
<index for choosed weekday>*8 +
<Testinterval 168H> = 32 + 7 = 39. See
also the remark column and register
4x0003.
Values / Unit
Bit
Remark
Value 0..56
Value representation:
0 = No test
1 = every 24h
2 = every 48h
3 = every 72h
4 = every 96h
5 = every 120h
6 = every 144h
7 = every Sunday
15 = every Monday
23 = every Tuesday
31 = every Wednesday
39 = every Thursday
47 = every Friday
55 = every Saturday
12/16
Modbus.en
2011.11.21
Address
3x0003
Description
Next test time
Values / Unit
Value
3x0004
Next test time, minute + (hour * 64) +
(day * 2048).
Minute 00..59
Hour 00..23
Day 0..6, 0=Sunday
Current time
Value
3x0005..100
3x0101..298
Current time: , minute + (hour * 64) + (day
* 2048).
Minute 00..59
Hour 00..23
Day 0..6, 0=Sunday
Not used
FCBA status, odd address (101,103…)
Bit/value
for LEFT channel, even address
(102,104…) for RIGHT Channel
Bit representation:
00=Fire alarm if set
01=Fire alarm is acknowledge if set
02=Service alarm if set
03=Service alarm is acknowledge if set
04=Damper failure if set
05=Damper failure is acknowledge if set
07,06=Damper state,
(00=unknown/moving, 01=open,
10=closed, 11=failure)
12=Detector enabled if set
13=Damper enabled if set
14 even*= Multibox interlock if set
14 odd**= FCBA is active if set
15 even*= Fan keeps running during
interlock if set
15 odd**= FCBA is enabled if set.
3x0311..400
3x0401..499
3x0500
3x0501..510
Not used
Fan status for group A-J
Bit:
00=On, fan is on if set
01=Active if set
02=Enabled if set
03=Interlock if set
Not used
Interlock status for multibox
Bit
00=Multibox interlock if set
01=Keep fan running during interlock if
set
Not used
Interlock status for group A-J
Bit
00=Group interlock if set
Note that bit 6,7 is
presented as bits and the
corresponding values for
the 2 bits are :
0=Unknown/moving
1=open
2=closed
3=failure
8-11 is presented as values
for the 4 bits were the value
corresponds to the group
number.
*This information is valid for
the multibox but read on
addresses valid for the ChA
side. This information can
also be read on address
401..499
11..08=Group belonging, (0=no group,
1-10=A-J 11-15 not used.)
3x0299..300
3x0301..310
Remark
**This information is valid
for the multibox but read on
addresses valid for the ChB
side.
Bit
Bit
This information can also
be read on address
3x0101..298 but then care
have to be taken that
information is different for
even and odd addresses.
Bit
13/16
Modbus.en
2011.11.21
5.5
Holding Register
Address
4x0001
4x0002
Description
Not used
Test interval, days 0..7, 0 for disabled
If 7 days(168h), (weekday*8) is
added (sun 0, Mon 8, Tue 16, Wed
24, Thu 32, Fri 40, Sat 48)
Values / Unit
Remark
value
Value representation:
0 = No test
1 = every 24h
2 = every 48h
3 = every 72h
4 = every 96h
5 = every 120h
6 = every 144h
7 = every Sunday
15 = every Monday
23 = every Tuesday
31 = every Wednesday
39 = every Thursday
47 = every Friday
55 = every Saturday
Example:
If an interval of 168hours on
Thursday is configured the result is :
xxxxxxxxxx100111 = 0x0027 = 39 =
<index for choosed weekday>*8 +
<Testinterval 168H> = 32 + 7 = 39.
See also the remark column and
register 4x0003.
4x0003
Test time, minute + (hour *64)
4x0004
Test multibox/group/all
0=No test
1..99=Correspondning multibox
1001..1010= Group A..J
10001=All multiboxes
Not used
Multibox interlock
Value:
0=Disable interlock(no interlock)
1=Set interlock, fan stops
2=Not valid
3=Set interlock, fan keeps running*
4x0005..400
4x0401..499
4x0500
4x0501
Not used
Group interlock
Value:
0=Disable interlock(no interlock)
1=Interlock group
Minute 00..59
Hour 00..23
Value
Value
New command during
ongoing test will be
ignored. Test takes aprox
180 seconds(damper
runtime)
Damper delay is ignored
when multibox interlock is
used.
*IMPORTANT : User
have to take care when
interlocking damper(s)
while fan(s) still running
to prevent potiential
damages.
Value
Interlocking a group
always stops fan.
14/16
Modbus.en
2011.11.21
Index
A
Abbreviations .............................................................. 3
About this document ................................................... 3
C
Configure .................................................................... 9
Connect....................................................................... 8
F
Function codes.......................................................... 10
G
General introduction.................................................... 4
M
Modbus data formats ................................................ 10
R
Reference addresses
Coil status ............................................................12
General ................................................................11
Holding register....................................................14
Input register ........................................................12
Input status ..........................................................12
Register map .............................................................10
RS485 specification ....................................................5
S
Software ......................................................................5
Symbols ......................................................................3
T
Tools ...........................................................................5
Troubleshooting ..........................................................5
15/16
Modbus.en
2011.11.21
Fläkt Woods Oy
Kalevantie 39
20520 TURKU, FINLAND
tel. +358 20 442 3000
fax +358 20 442 3010
w www.flaktwoods.com
16/16
Modbus.en
2011.11.21
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement