LG MASTER-K 120S Series User Manual page 204

Programmable logic controller
Table of Contents

Advertisement

Chapter 8 Communication Functions
(4) Response format (NAK response)
Format name
Header
NAK
Ex. of frame
H15
ASCII value
Item
BCC
Error code
(5) Example
This example supposes that 2 WORDs from M000 of station No. 10 is read and BCC value is checked. Also it is supposed
that data in M000 and in M001 is as follow:
M000 = H1234
M001 = H5678
① Computer request format (PC → MASTER-K120S Main Unit)
Format name
Header
Frame (Example)
ENQ
ASCII value
H05
② For ACK response after execution of command(PC ← MASTER-K120S Main Unit)
Format name
Header
Frame (Example)
ACK
ASCII value
H06
③ For NAK response after execution of command(PC ← MASTER-K120S Main Unit)
Format name
Header
NAK
Frame (Example)
ASCII value
H15
Station No.
Command
H10
r
H3130
H72
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte
each to ASCII values from NAK to ETX is converted into ASCII and added to BCC, and sent.
Hex and 2 bytes(ASCII code, 4 bytes) indicate error type. For the details, see 8.1.8 Error
codes.
Station No.
Command
H0A
r
H3041
H72
Station No.
Command
H0A
r
H3041
H72
Station No>
Command
Command type
H0A
r
H3041
H72
Error code
Command type
(Hex 2 Byte)
SB
H1132
H5342
H31313332
Explanation
Command
Device length
Device name
type
SB
H06
%MW000
H254D5730
H5342
H3036
3030
Number of
Command
data
type
SB
H04
H5342
H3034
H3132333435363738
Error code
SB
Error code
H5342
Error code
8-14
Tail
Frame check
ETX
H03
Number of data
Tail
H02
EOT
H3032
H04
Data
Tail
12345678
ETX
03
Tail
(2Byte)
ETX
(4Byte)
H03
BCC
Frame check
BCC
Frame check
BCC
BCC
BCC

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents