Chapter 13 RS-232C function of K200S MASTER-K
13-13
5) Example
Read the contents of 2 words from the first word of M area (M000), and the station
number of PLC is 10 (h0A). Assume that the content of M000 is h1234 and M0001 is
h5678.
① Request format (External device à PLC)
Format
name
Header
Station
number
Main
instruction
Instruction
type
Length of
device
definition
Device definition
Number of
data
Tail
Fra me
check
Frame
example
ENQ h0A R (r) SB h06 %MW000 h02 EOT BCC
ASCII
value
h05 h3041 h52 (h72) h5342 h3036 h254D57303030 h3032 h04
② Response format (PLC à External device : ACK response)
Format
name
Header
Station
number
Main
instruction
Instruction
type
Number
of data
Data Tail
Frame
check
Frame
example
ACK h0A R (r) SB h04 h12345678 ETX BCC
ASCII
value
h06 h3041 h52 (h72) h5342 h3034 h3132333435363738 h03
③ Response format (PLC à External device : NAK response)
Format
name
Header
Station
number
Main
instruction
Instruction
type
Error code Tail Frame check
Frame
example
NAK h0A R (r) SB
(2 byte)
ETX BCC
ASCII value h15 h3041 h52 (h72) h5342
ASCII value
(4 byte)
h03