Chapter 8 Communication Functions

4) Continuous writing of device(W(w)SB)

(1) Introduction

This is a function that directly specifies PLC device memory and continuously writes data from specified address as much as specified length.

(2) Request format

 

Format

 

 

Header

 

 

Station

 

 

Comman

 

 

Comma

 

 

Device

 

 

Device

 

 

Number of data

 

 

Data

 

 

Tail

 

 

Frame

 

 

name

 

 

 

 

No.

 

 

d

 

 

nd type

 

 

Length

 

 

 

 

(Max.128 Byte)

 

 

 

 

 

 

check

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Frame

 

 

 

H10

 

 

W(w)

 

 

SB

 

 

H06

 

%MW100

 

 

H02

 

 

H11112222

 

 

EOT

 

 

BCC

 

 

(Example)

 

ENQ

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ASCII

 

 

 

H3130

 

 

H57(77)

 

 

H5342

 

 

H3036

 

 

H254D57

 

 

H3032

 

 

H31313131

 

 

H04

 

 

 

 

 

value

 

H05

 

 

 

 

 

 

 

 

 

313030

 

 

 

32323232

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Remark

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

2)Number of data can be used up to 240Bytes(120 Words).

 

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

 

 

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

 

length(Name length

 

 

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

 

of variable)

 

 

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

 

device

 

 

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

 

 

 

name, digits, upper/lower case, and '%' only are allowable to be entered.

 

 

 

 

8-18

Page 208
Image 208
LG Electronics 120S user manual Continuous writing of deviceWwSB