
R67051.0009
– Index 1
9
Im Beispiel benutzen wir ein 575-Gerät mit
der
Geräteadresse „11“
. Dem Parameter
„Scaling Factor 12“ ist laut Geräte-
beschreibung die serielle
Codestelle
„A5“
zugeordnet. Wir wollen den Faktor auf den
Wert „0.9873“
setzen.
The example uses a 575 cdisplay with serial
unit address “11”. According to the
manual, register “Scaling Factor 12” uses
the serial
access code “A5”. The example
shows how to set the register to a value of
“0.9873”
7.1
Zuerst senden wir den Daten-String
bestehend aus insgesamt 13 ASCII-Zeichen:
7.1 First, we transmit the data string
consisting of totally 13 ASCII characters:
No.
Expression
ASCII Hex
Binary code
Hi-------- --------Lo
Comment
01
EOT
EOT
0 4
0 0 0 0 0 1 0 0
Control character Initialisation
02
AD1
1
3 1
0 0 1 1 0 0 0 1
Address, high byte
03
AD2
1
3 1
0 0 1 1 0 0 0 1
Address, low byte
04
STX
STX
0 2
0 0 0 0 0 0 1 0
Control character
05
C1
A
4 1
0 1 0 0 0 0 0 1
Register code high byte
06
C2
5
3 5
0 0 1 1 0 1 0 1
Register code low byte
07
X (Data)
0
3 0
0 0 1 1 0 0 0 0
Factor, highest digit
08
X (Data)
9
3 9
0 0 1 1 1 0 0 1
09
X (Data)
8
3 8
0 0 1 1 1 0 0 0
10
X (Data)
7
3 7
0 0 1 1 0 1 1 1
11
X (Data)
3
3 3
0 0 1 1 0 0 1 1
Factor, lowest digit
12
ETX
ETX
0 3
0 0 0 0 0 0 1 1
Control character
13
BCC
B
4 2
0 1 0 0 0 0 1 0
Block check character
Die Zeichen mit grauem Hintergrund werden
mittels
Exclusiv-Oder
zur Bildung des
Block-Check-Characters benutzt. Betrachten
Sie bitte hierzu im Feld
„Binary Code“ die 8
Spalten
(nur den grau unterlegten Bereich).
In der höchstwertigen Spalte ganz links
finden wir ausschliesslich Nullen. Das
Exclusiv-Oder und damit das entsprechende
Bit des BCC ist daher ebenfalls 0.
Characters with gray background are used
to form the block check character by an
exclusive- OR function. Consider each of
the 8 columns in the binary code field
(only gray rows).In the high bit column we
find all zeros, therefore the exclusive OR is 0
and the high bit of the block check character
must be zero at this position.
In der kleinstwertigen Spalte ganz rechts
finden wir die Bitfolge 1-1-0-1-0-1-1-1 (von
oben nach unten). Das Exclusiv-Oder und
damit das entsprechende Bit des BCC ist
daher 0. In der Spalte links neben dem
kleinsten Bit ergibt die EX-OR-Funktion
ebenfalls den Wert 1
In the low bit column we find 1-1-0-1-0-1-1-1
(from up to down) and the exclusive OR is
also „0“. Therefore the low bit of the block
check character m
ust be „0“ again at this
position. In the column left of the lowest bit,
the X-
OR function results in a „1“ etc.
Allgemein gilt: Bei einer
geradzahligen
Anzahl von „1“ in einer Spalte ist das BCC-
Bit an dieser Stelle
„0“.
Bei einer
ungeradzahligen
Anzahl von „1“ in einer
Spalte ist das BCC-Bit an dieser Stelle
„1“
In general we can say: when in one column
we find an even
number of „1“, the block
check bit must be
„0“ at this position. When
we find an odd
number of „1“, the block
check bit must be
„1“ at this position
Wenn wir nun die resultierenden Bits des
BCC in einer Reihe lesen, ergibt sich damit
die Binärzahl
0-1-0-0-0-0-1-0
as dem Hexadezimal-
Code „42“ oder dem
ASCII-
Zeichen „B“ entspricht.
So we find with our example, that the 8 Bits
of the block check character, read as a row,
are
0-1-0-0-0-0-1-0
which eq
uals to the Hexadecimal code “42”
or to the ASCII character of „B“.