2019r0
Page 52 of 82
Mercury 2+ Operator Terminal User Manual
Checksum
Calculation
To calculate the CSUM for the above example:
Take the Hex value of the Characters and add them all together.
The codes are listed on page 31.
<STX>
(02
H
)
ADDR
01
(30, 31
H
)
FUNC
R
(52
H
)
DATA
TEST
(54,45,53,54
H
)
DMY
<NUL>
(00
H
)
Sum of above codes:
02+30+31+52+54+45+53+54+00 = 01F5
H
01F5 in Hex = 111110101 in Binary
'AND' the above with (7F
H
) = 1110101
Negate the above (two's complement) by inverting all bits
and add 1 = 0001011 = 0B
H
This value is less than 20
H
, which is a control code and so the
process needs to be repeated with DMY = 20
H
. This results in a
new checksum having the value 6B
H
, which translates to the
character "k".
To transmit the word "TEST" to the terminal at address 01, the
following string needs to be sent:
"<STX> 0 1 R T E S T <SP> k <ETX>"
Using the format described above, the Master sends a block to read
the output buffer on a Mercury 2+ terminal with Multidrop
address 01 as follows:
<STX>
(02
H
)
ADDR
01
(30,31
H
)
FUNC
R
(52
H
)
DATA
"<ESC> [ ? 9 ; 1 z"
(1B,5B,3F,39,3B,31,7A
H
)
DMY
<NUL>
(00
H
)
The checksum can be calculated to be 77
H
, which is the ASCII
code for the letter "w".
The block to be sent to the terminal takes the form:
"<STX> 0 1 R <ESC> [ ? 9 ; 1 z <NUL> w <ETX>"
The Resend Last Block command (see page 34) allows the buffer
to be read repeatedly.
Reading the
Block Buffer
Содержание 2+
Страница 1: ...Mercury 2 Mercury 2 Operator Terminal User Manual ...
Страница 2: ...2019r0 Page 2 of 82 Mercury 2 Operator Terminal User Manual This page is intentionally left blank ...
Страница 4: ...2019r0 Page 4 of 82 Mercury 2 Operator Terminal User Manual This page is intentionally left blank ...
Страница 6: ...2019r0 Page 6 of 82 Mercury 2 Operator Terminal User Manual This page is intentionally left blank ...
Страница 8: ...2019r0 Page 8 of 82 Mercury 2 Operator Terminal User Manual This page is intentionally left blank ...
Страница 10: ...2019r0 Page 10 of 82 Mercury 2 Operator Terminal User Manual Mercury 2 Terminal With Proximity Card Reader ...
Страница 14: ...2019r0 Page 14 of 82 Mercury 2 Operator Terminal User Manual Mounting the Mercury 2 Terminal ...
Страница 16: ...2019r0 Page 16 of 82 Mercury 2 Operator Terminal User Manual This page is intentionally left blank ...
Страница 18: ...2019r0 Page 18 of 82 Mercury 2 Operator Terminal User Manual Fig 3 I S Interface Module ...
Страница 22: ...2019r0 Page 22 of 82 Mercury 2 Operator Terminal User Manual This page is intentionally left blank ...
Страница 50: ...2019r0 Page 50 of 82 Mercury 2 Operator Terminal User Manual This page is intentionally left blank ...
Страница 54: ...2019r0 Page 54 of 82 Mercury 2 Operator Terminal User Manual This page is intentionally left blank ...
Страница 56: ...2019r0 Page 56 of 82 Mercury 2 Operator Terminal User Manual This page is intentionally left blank ...
Страница 58: ...2019r0 Page 58 of 82 Mercury 2 Operator Terminal User Manual This page is intentionally left blank ...
Страница 61: ...Mercury 2 Operator Terminal User Manual Page 61 of 82 2019r0 Fig 5 Signal Levels on Multi Drop RS485 Lines ...
Страница 62: ...2019r0 Page 62 of 82 Mercury 2 Operator Terminal User Manual This page is intentionally left blank ...