Chapter 7:Appendix
DTM temperature controller operating manual
Read command Read reply string Write command Write reply string
(word) ‘0’ ‘4’ content ‘3’ content ‘3’
‘0’
Address H1001
Data content
‘0’ ‘E’ ‘E’
‘2’ ‘0’ ‘8’ ‘8’
LRC1 check
code
‘B’ ‘0’ LRC1 check code
‘F’ LRC1 check
code
‘F’
LRC0 check
code
‘A’ ‘0’ LRC0 check code
‘D’ LRC0 check
code
‘D’
Stop word 1 CR LRC1 check
code
‘0’ Stop word 1 CR
Stop word 1 CR
Stop word 0 LF LRC0 check
code
‘3’ Stop word 0 LF Stop word 0 LF
Stop word 1 CR
Stop word 0 LF
LRC check code:
ASCII uses LRC for error checking; this method adds the bytes in all transmitted data, discarding the smallest bit, and
then taking the complement of 2; LRC check code consists of the "machine address" added to the "data content."
Example: Assuming the data in a packet consists of [H01, H03, H41, HFF, H00, H02], the sum of the packets
data content is taken as follows:
H01+H03+H41+HFF+H00+H02=H146, and discarding the smallest bit 1, leaving H46
Taking the complement of 2 from [H46] leaves [HBA] which is the LRC check code.
RTU mode:
Read command Read reply string Write command Write reply string
Machine
address
H01 Machine
address
H01 Machine
address
H01 Machine
address
H01
Function
command
H03 Function
command
H03 Function
command
H06 Function
command
H06
Read data
initial address
H10 Reply data
length
(bytes)
H04
Write data
address
H10
Write data
address
H10
H00 H01 H01
Read data
length
(character/
word)
H00
Data content 1
H01
Write data
content
H03
Write data
content
H03
H02 HF4 H20 H20
CRC least bit HC0
Data content 2
H03 CRC least bit HDD CRC least bit HDD
CRC highest bit HCB
H20 CRC highest
bit
HE2 CRC highest
bit
HE2
CRC least bit HBB