III. Examples:
A) Send the set temperature of 10.00 to the controller.
1. The control command, CC, for “FIXED DESIRED CONTROL SETTING” is 1c.
2. Multiply the desired set-point temperature by 100
10
(10.00
10
x 100
10
= 1000
10
).
3. Convert 1000
10
decimal to hexadecimal (3e8
16
) and add on leading zeros to make the four-character
send value DDDD (03e8).
4. Compute the checksum (SS) by adding the hexadecimal values of the following ASCII characters: 1, c,
0, 3, e, and 8:
ASCII Character: Hexadecimal Value:
1 31
c 63
0 30
3 33
e 65
8 38
Sum 194
16
The 8-bit checksum is the 8 least significant binary bits of the sum, represented as 94 in hexadecimal.
5. Combining all of these characters in one string we send: (stx)1c03e894(etx).
6. If the temperature controller receives the command and the checksum is correct, it will send back:
(stx)03e800(ack). If the checksum is not correct the temperature controller will send back:
(stx)XXXX60(ack).
B) Send the low set range of 10 to the controller.
1. The control command, CC, for “LOW SET RANGE” is 22.
2. Convert 10
10
decimal to hexadecimal (a
16
) and add on leading zeros to make the four-character send
value DDDD (000a).
3. Compute the checksum (SS) by adding the hexadecimal values of the following ASCII characters: 2, 2,
d, d, 0, 0, 0, and a:
ASCII Character: Hexadecimal Value:
2 32
2 32
0 30
0 30
0 30
a 61
Sum 155
16
The 8-bit checksum is the 8 least significant binary bits of the sum, represented as 55 in hexadecimal.
4. Combining all of these characters in one string we send: (stx)22000a55(etx).
5. If the temperature controller receives the command and the checksum is correct, it will send back:
(stx)000a00(ack). If the checksum is not correct the temperature controller will send back:
(stx)XXXX60(ack).
C) Send the set temperature of -1.50 °C.
1. The controller command, CC, is 1c.
2. Multiply the desired set-point temperature by 100
10
(-1.50 x 100 = -150).
3. Convert -150
10
to hexadecimal by taking the two’s complement of the number. (This can be easily
done by using the formula 2
n
– N, where n is the word-bit size and N is the absolute value of the
number being converted.) Hence, you have 2
16
- 150 = 65386
10
. This value then converts to ff6a
16
.
4. Compute the checksum (SS) by adding the hexadecimal ASCII values of the following characters: 1, c,
f, f, 6, a,: