SCT-20 Series
54
Visit our website
Check-Sum Calculation
The two ASCII control characters
(ckck)
are the representation of a hexadecimal digit in ASCII characters. The check digit is
calculated by performing the operation XOR (exclusive or) 8-bit ASCII codes of the only part of the underlined string.
The procedure to calculate the check-sum is the following:
• Consider only the string characters highlighted with underlining;
• Calculate the EXCLUSIVE OR (XOR) of the ASCII codes for the characters;
Example:
The result of the XOR operation expressed in hexadecimal notation is made up of 2 hexadecimal digits (numbers
from 0 to 9 or letters from A to F). In this case the hexadecimal code is 0x75.
The check-sum inserted in the strings transmitted is made up of the 2 characters which represent the result of the
XOR operation in hexadecimal notation (in this example the character 7 and the character 5.
3.13 Fast Continuous Transmission Protocol
This protocol allows for continuous serial output at high update frequencies. Up to 300 strings per second are transmitted (with
a minimum transmission rate of 38400 baud).
The communication modes available are (
•
: communication compatible with TX RS-485 instruments.
?
•
: communication compatible with TD RS-485 instruments.
?
If
is set, the following string is transmitted to PC/PLC:
xxxxxxCRLF.
:
In the event of negative weight, the first character on the left acquires the value « - » (minus sign - ASCII 45).
In the event of error or alarm, the 6 weight characters are replaced by the messages found in
.
If
is set, the following string is transmitted to PC/PLC:
&TzzzzzzPzzzzzz\ckckCR
Character Decimal ASCII Code Hexadecimal ASCII Code Binary ASCII Code
0
48
30
00110000
1
49
31
00110001
t
116
74
01110100
XOR =
117
75
01110101
Table 3-47. Example Check Sum Calculation (ASCII)
String Character
Definition
xxxxxx
6 ASCII characters for gross weight (48 ÷ 57 ASCII)
CR
1 character of carriage return (13 ASCII)
LF
1 character of line feed (10 ASCII)
Table 3-48.
Communication String Definitions
Data
Definition
&
1 character of string start (38 ASCII).
T
reference character for gross weight.
P
reference character for gross weight.
zzzzzz
6 ASCII characters for gross weight (48
?
57 ASCII).
\
1 character of separation (92 ASCII).
Table 3-49.
Communication String Definitions