NT00079EN-01 (Modbus F200C)
NT00079EN-01 (Modbus F200C)
NT00079EN-01 (Modbus F200C)
Flair 200C
MODBUS Communication
User Manual
2 MERLIN GERIN
Contents
General..........................................................................................................................4
Introduction....................................................................................................................4
Functions.......................................................................................................................4
MODBUS data addresses and encoding........................................................................6
General..........................................................................................................................6
Identification / configuration zone...................................................................................7
Time synchronization zone ............................................................................................7
Test zone.......................................................................................................................8
Event zone.....................................................................................................................8
TC / TSD / TSS zone ...................................................................................................10
Telemetering zone .......................................................................................................12
Diagnostic counter reading ..........................................................................................16
Report by exception with a modem ..............................................................................17
Appendix MODBUS protocol........................................................................................18
MERLIN GERIN 3
General
Introduction
The FLAIR 200C communication board allows the connection of
MV/LV substation to a telecontrol system by using a MODBUS
protocol . It includes advanced telecommunication function and
manages PSTN type of transmission modems.
Application
Advantages
Functions
Report by exception
Protocol analyser
Events
4 MERLIN GERIN
General
Accessible data
Power (P, Q, S)
Power factor
Energy
Characteristics
MERLIN GERIN 5
MODBUS data addresses and encoding
General Addressing
A MODBUS master can access 255 storage spaces of 64K words (255
MODBUS addresses).
Transmission
asynchronous, 300 to 19200 bauds
Reply messages
Upon receipt of a request recognized by the equipment (read or
write), transmission of the data corresponding to the MODBUS
specifications.
Read zone
The number of words read may not exceed the size of the
checked zone.
Remarks
The bit by bit write and read functions are not used in the FLAIR
200C application.
Terminology
TCD: remote control (encoded in 2 bits)
6 MERLIN GERIN
MODBUS data addresses and encoding
Identification /
configuration zone
Time synchronization zone This zone contains the internal The zone may only be read or
date and time of the equipment for written as a whole.
time-stamping of events.
0 Year (0 to 99)
b15 b8 b7 b0
millisecond (0 to 59999)
b15 b8 b7 b0
MERLIN GERIN 7
MODBUS data addresses and encoding
Test zone The test zone contains 9 words The contents of the zone do not
that can be read or written. It is have any effect on the FLAIR
recorded in saved RAM and is 200C functions.
available to users to facilitate final
adjustment tests.
8 MERLIN GERIN
MODBUS data addresses and encoding
MERLIN GERIN 9
MODBUS data addresses and encoding
The control order zone ( TCD) may The telecontrol center system may
be read with bit and word read reset this codes by writing a 0 to
function code. As it contains no the relevant address.
information the data is 0.
10 MERLIN GERIN
MODBUS data addresses and encoding
TSS16 TSS15 TSS14 TSS13 TSS12 TSS11 TSS10 TSS9 TSS8 TSS7 TSS6 TSS5 TSS4 TSS3 TSS2 TSS1
b15 b8 b7 b0
MERLIN GERIN 11
MODBUS data addresses and encoding
Telemetering zone
12 MERLIN GERIN
MODBUS data addresses and encoding
Phone number.
Phone number of the host computer system or SMS, used to send the
alarms.
15 figures maximum encodded.
Only this figures are accepted : <0 to 9>, '+'=<A>
Zone initialized with <F..F> : Flair 200C doesn't send alarms.
i.e. :+330476606599 encodded value :
Phone number Word
FFFA 6Ah
3304 6Bh
7660 6Ch
6599 6Dh
Each time when data is written in the this zone(76h-77h) automatic call
is Re-initialize
14 MERLIN GERIN
MODBUS data addresses and encoding
sub-function code = 0B
Talus 200 sub-address = 3 CRC16
Reading: 01 08 03 0B 00 00 91 8D
Reply: 01 08 03 0B 00 04 90 4E
Function code = 8
16 MERLIN GERIN
MODBUS data addresses and encoding
FLAIR 200C dial-up again the ‘’main’’ phone number after the ‘’dial-up
delay time / second attempt’’ and eventually try again after the ‘’dial-up
delay time / third attempt’’.
MERLIN GERIN 17
Appendix MODBUS protocol
Functions available:
5: write a bit.
6: write a word.
18 MERLIN GERIN
Appendix
Synchronization of exchanges
Any character that is received after a silence of more than 3
characters is considered as the beginning of a frame. A silence in
the line equal to at least 3 characters should be respected between
two frames.
If the CRC16 or the slave number are incorrect, the slave does
not reply.
If the CRC16 and the slave number are correct, but the function
code or parameters are not valid, the slave transmits an exception
reply.
MERLIN GERIN 19
Appendix
Reply
Slave 1 or 2 number of 1st byte read last byte CRC16
number bytes read read
1 byte 1 byte 1 byte 2 bytes N bytes 2 bytes 2 bytes
Example
Reading of 16 bits, bit address 300h of slave n°1
Request: 01 01 03 00 00 10 36 42
Reply:01 01 02 00 00 B9 FC
Request
Slave 3 or 4 address of 1st word number of words CRC16
number (MSB+LSB) (MSB+LSB)
1 byte 1 byte 2 bytes 2 bytes 2 bytes
Reply
Slave 3 or 4 number of 1st word read last word CRC16
number bytes read (MSB+LSB) read
(MSB+LSB)
1 byte 1 byte 1 bytes 2 bytes 2 bytes 2 bytes
Example
Reading of words 40h to 43h of slave n°1,
Request: 01 03 00 40 00 04 45 DD
Reply:01 03 08 00 00 80 00 80 00 80 00 C2 18
20 MERLIN GERIN
Appendix
Reply
The reply is an echo of the request indicating that the slave has
acknowledged the value contained in the request.
Example
Writing of bit to 1, bit address 301h of slave n°1,
Request: 01 05 03 01 FF 00 D6 8E
Reply:01 05 03 01 FF 00 D6 8E
Request
Write a word:
function n°6 Slave 6 address of word value of word CRC16
number (MSB+LSB) (MSB+LSB)
1 byte 1 byte 2 bytes 2 bytes 2 bytes
Reply
The reply is an echo of the request indicating that the slave has
acknowledged the value contained in the request.
Example
Writing of word 30h of slave n°1, at the value 0001h
Request: 01 06 00 30 00 01 48 05
Reply:01 06 00 30 00 01 48 05
MERLIN GERIN 21
Appendix
Request / reply
Slave 8 sub-function code data (MSB+LSB) CRC16
number (MSB+LSB)
1 byte 1 byte 2 bytes 2 bytes 2 bytes
sub-function data
code
the slave should send the echo of the request xx00 XXXX
resetting of diagnostic counters xx0A 0000
reading of total number:
of frames received with no CRC errors (CPT1) xx0B XXXX
of frames received with CRC errors (CPT2) xx0C XXXX
of the number of exception replies (CPT3) xx0D XXXX
of frames addressed to the station (CPT4) xx0E XXXX
(excluding broadcast)
of broadcast requests received and correctly xx0F XXXX
executed (CPT5)
Sub-function n°0 is used to test transmission. The slave sends back the
echo of the data received.
Examples
Resetting of counters for slave n°1,
Request: 01 08 00 0A 00 00 C0 09
Reply:01 08 00 0A 00 00 C0 09
22 MERLIN GERIN
Appendix
Write N The number of words to be written is between 1 and 123 and the number
consecutive of bytes is between 2 and 246.
Words are written in increasing order of addresses.
words:
function n°16 Request
Reply
Slave 10h address of 1st word number of words written CRC16
number written (MSB+LSB) (MSB+LSB)
1 byte 1 byte 2 bytes 2 bytes 2 bytes
Example
Writing of words 0302h to 0305h of slave n°1, (addresses 02h to 05h)
with the values 0060h, 0A10h, 0B33h, 1662h
Request: 01 10 03 02 00 04 08 00 60 0A 10 0B 33 16 62
96 B3
Reply: 01 10 03 02 00 04 60 4E
MERLIN GERIN 23
Appendix
CRC 16 calculation
algorithm Hex FFFF CRC 16
n=0
no carry yes
n=n+1
no n>7 yes
Next byte
End
Write CRC 16 Calculates and gives the CRC16 in the "buf" zone with length "len".
calculation *buf: pointer of buffer on which the calculations are
in C language performed.
len: length of buffer.
24 MERLIN GERIN
Schneider Electric SA Postal address As standards, specifications and designs change from time to time, please ask for
F-38050 Grenoble Cedex 9 confirmation of the information given in this publication.
Tel.: +33 (0)4 86 58 60 60
Telex: merge 320842 F Published by: Schneider Electric SA
http:\\www.schneider- Design and layout by: PIPET
electric.com Printed by: Hewlett Packard
MERLIN GERIN 25