Chapter 8 Communication Functions

For NAK response after execution of command(PC MASTER-K120S main Unit)

Format name

Header

Station No.

Command

Command type

Error code

Tail

Frame check

Ex. of frame

NAK

H01

r

SS

Error code (2 bytes)

ETX

BCC

ASCII value

H15

H3031

H72

H5353

Error code (4 bytes)

H03

 

2) Continuous reading(R(r)SB) of device

(1) Introduction

This is a function that reads the PLC device memory directly specified in accord with memory data type. With this, data is read from specified address as much as specified continuously.

(2) PC request format

 

Format name

 

 

Header

 

 

Station

 

 

Command

 

 

Command

 

 

Device

 

 

Device

 

 

Number of data

 

 

Tail

 

 

Frame

 

 

 

 

 

 

No.

 

 

 

 

type

 

 

length

 

 

 

 

(Max. 128 Bytes)

 

 

 

 

check

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ex. of frame

 

 

ENQ

 

 

H10

 

 

R(r)

 

 

SB

 

 

H06

 

 

%MW100

 

 

H05

 

 

EOT

 

 

BCC

 

 

ASCII value

 

 

H05

 

 

H3130

 

 

H52(72)

 

 

H5342

 

 

H3036

 

 

H254D57313030

 

 

H3035

 

 

H04

 

 

 

 

Remark

1)Number of data specifies the number to read according to the type of data. Namely, if the data type of device is word and number is 5, it means that 5 words should be read.

2)Max. of %MW in number of data can be used up to 120(240bytes).

3)Protocol of RSB doesn't have number of blocks.

4)R(r)SB command of bit devices is not available.

 

Item

 

 

Explanation

 

 

BCC

 

 

When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte

 

 

 

 

each to ASCII values from ENQ to EOT is converted into ASCII and added to BCC.

 

 

 

 

 

 

 

Device length

 

 

This indicates the number of name's characters that means device, which is allowable up to

 

 

(Length of

 

 

16 characters. This value is one of ASCII converted from hex type, and the range is from

 

 

device name)

 

 

H01(ASCII value:3031) to H10(ASCII value:3130).

 

 

Device name

 

 

Address to be actually read is entered. This must be ASCII value within 16 characters, and in

 

 

 

 

this name, digits, upper/lowercase, and '%' only are allowable to be entered.

 

 

 

 

 

 

 

 

 

 

 

 

8-12

Page 202
Image 202
LG Electronics 120S user manual Continuous readingRrSB of device