Up to now the control codes have broadly been ignored, although the function of
most of them is probably self-evident from the above examples. These will be
explained in more detail here.
The control codes have two functions. First of all, they provide markers to indicate
the start of the message and separate the different types of data with the message.
And secondly, they provide integrity checking of the message.
The
<SOH>
Start of Header control code will always be the first character in the
message. This indicates that the Header will follow and has a value of 01.
The
<STX>
Start of Text character indicates that the Header information has finished
and the Text or main body of the message will follow. this has a value of 02.
The
<ETX>
End of Text character indicates the end of the end of the main part of
the message and the Block check character will follow. The End of Text character has
a value of 03.
The
<BCC>
has not got a fixed value like the other control codes as it is a calculated
value based upon a modulo 256 sum of all non control code characters in the
message. This is calculated for each message before it is transmitted and the receiver
confirms that a repeat calculation of the message results in the same block check
value. If there has been any corruption in any part of the message, the block check
character and the recalculated value will not tie up. If an instrument receives a
corrupted message, it is ignored. It is up to the writer of PC software to determine
what the MASTER does in such a situation.
The Block check character is for the message in example 1 is calculated as follows:-
30
32
3F
43
48
30
30
30
Total 1BC
Modulo 256 ( least significant byte )
BC
EXAMPLE BASIC PROGRAM
APPENDICES
APPENDIX E
Page 88
Содержание DM4000U
Страница 3: ...GETTING STARTED Page 3 ...
Страница 7: ...INSTALLATION Page 7 ...
Страница 25: ...USER GUIDE Page 25 ...
Страница 57: ...OUTPUT MENU PROGRAMMING Page 57 ...