HA243821
Issue 5 Mar 98
Section5
Page 5 - 33
MODEL 346 INSTALLATION AND OPERATION MANUAL
5.7.4 PROTOCOL (Cont.)
SELECTION SEQUENCE
The message sent to the recorder to write a new value is:EOT G G U U STX CN C1 C2 D1 to DN ETX BCC where
each of the characters/mnemonics is as described in the polling section above.
SELECTION COMPLETE.
If all is well, the recorder will respond with a single ACK to indicate that the message has been accepted as
correct, and that the change has taken place. The host may now re-enter the selection procedure at STX to
access a further parameter in the same channel, or it may initiate a complete new selection sequence.
SELECTION INCOMPLETE
If the group and unit addresses are recognised, but some other part of the message is not valid (e.g. the param-
eter is read only) the recorder will respond with a NAK. The host must now initiate a complete new selection
sequence.
If the group or unit address is not recognised, the recorder will make no response.
Each bit in the two Hex bytes making up the
ASCII character is compared with the equivalent
bit in the ASCII character it is being XORed with.
I.E. the two bits 0 are compared, the two bits 1
are compared and so on.
If both bits are 0, the result is also 0
If both bits are 1, the result is 0
If one bit is 1 and the other is 0, the result is a 1.
The exclusive OR (XOR) function
2
P
V
1
2
.
3
4
ETX
32
XOR 50
=
XOR 56
=
XOR 31
=
XOR 32
=
XOR 2E
=
XOR 33
=
XOR 34
=
XOR 03
= BCC
0011 0010
0101 0000
0110 0010
0101 0110
0011 0100
0011 0001
0000 0101
0011 0010
0011 0111
0010 1110
0001 1001
0011 0011
0010 1010
0011 0100
0001 1110
0000 0011
0001 1101 = 1 D
Character
ASCII
Binary
To calculate the BCC of the message STX2PV12.34ETX (present value of channel 2 is 12.34). In
ASCII hex, this is 32 xor 50 xor 56 xor 31 xor 32 xor 2E xor 33 xor 34 xor 03 to give a BCC of 1D as
follows.