LG MASTER-K 120S Series User Manual page 201

Programmable logic controller
Table of Contents

Advertisement

Chapter 8 Communication Functions
(4) Response format (NAK response)
Format name
Header
Ex. of frame
NAK
ASCII value
Item
BCC
Error code
(5) Example
This example supposes when 1 WORD from M20 and 1 WORD from P001 address of station No.1 are read and BCC value
is checked. Also it is supposed that H1234 is entered in M20, and data of H5678 is entered in P001.
① Computer request format (PC → MASTER-K120S main Unit)
Format name Header
Ex. of frame
ENQ
ASCII value
H05
② For ACK response after execution of command(PC ← MASTER-K120S main Unit)
Format name
Header
Ex. of frame
ACK
ASCII value
H06
Station No.
Command
H20
H15
H3230
H52(72)
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.
Hex and 2 bytes(ASCII code, 4 bytes) indicate error type. For the details, see 8.1.8 Error
codes.
Command
Station No. Command
type
H01
r
SS
H3031
H72
H5353
Command
Station No. Command
type
H01
r
SS
H3031
H72
H5353
Command type
R(r)
SS
H5353
Explanation
Number of
Variable
Format
blocks
length
name
H02
H05
%MW20
H254D57
H3032
H3035
3230
Number of
Number of
Data
blocks
data
H02
H02
H1234
H3032
H3032
H31323334 H3032 H35363738 H03
8-11
Error code
Tail
(Hex 2 Byte)
H1132
ETX
H31313332
H03
K120S main unit
Device
Format name
length
H06
%PW001
EOT
H25505730
H3036
3031
Number of
Data
data
H02
H5678
ETX
Frame check
BCC
Frame
Tail
check
BCC
H04
Frame
Tail
check
BCC

Advertisement

Table of Contents
loading

Table of Contents