Schwank ThermoControl Plus Series CM-485 User Manual
Page 6
![background image](/manuals/572215/6/background.png)
- 6 -
Communication
The communication of the CM-485 Modbus Module is based on 16-bit registers. You can
see or modify the parameters by reading or writing these registers. Each register has a 16-
bit address.
Two formats can be selected, the 7-bit ASCII or the 8-bit RTU. The ASCII format uses two
characters for the transfer of a number, the transfer error is checked by LRC. The RTU
format can communicate at higher speed because the data is transferred in one character
and the error detection is made by 16-bit CRC.
More detailed information about communication can be found at: www.modbus.org
In the following example ASCII format messages are used.
Two functions used for data transfer and one for test:
– Reading:
code 03h
– Writing:
code 06h
– Test:
code 08h
The length of one ASCII message is always 17 characters; the length of the answers may
be different.
Register reading
In this example we ask for 1 register
from address “0”.
:020300000001FA
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
:
0 2 0 3 0 0 0 0 0 0 0 1 F A
0Dh 0Ah
As an ASCII code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
3Ah 30h 32h 30h 33h 30h 30h 30h 30h 30h 30h 30h 31h 46h 41h 0Dh 0Ah
Structure:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
: Dev addr fcode
Reg. address
Numb. of registers
LRC
CR LF
Hi Lo Hi Lo
02
03
00
00
00
01
FAh
In the example the "Dev addr" is the unique number of
the device, the fcode=03 indicates the reading request.
Reg.address=0000 gives the starting address.
Number=0001 means the number of required data
register (max:7Fh). This may be more than 1, in that case
the answer will be longer.
Remark: the letter “h” after the
figures always means
the hexadecimal format.
The “:” is part of the message !
The “
” means the 0Dh+0Ah line-end
signal.
LRC: Check sum: if we add
up the marked figures
(between 2-15) then the sum
must be dividable by 100h
without rest.
CR: Carriage return
LF: Line feed
Σ mod 100h = 0