LG MASTER-K 120S Series User Manual page 205

Programmable logic controller
Table of Contents

Advertisement

Chapter 8 Communication Functions
3) Individual writing of device(W(w)SS)
(1) Introduction
This is a function that writes the PLC device memory directly specified in accord with memory data type.
(2) PC request format
Format name
Header
Frame (Example)
ENQ
ASCII
H05
value
Item
BCC
Number of blocks
Device
length(Name
length of device)
device
Data
Ex.1
If type of data to be currently written is WORD, the data is H1234, ASCII code converted value of this is
"31323334" and this content must be entered in data area. Namely, most significant value must be sent first, least
significant value last.
Remark
1) Device data types of each block must be the same.
2) If data type is Bit, the data to be written is indicated by bytes of hex. Namely, if Bit value is 0, it must be
indicated by H00(3030), and if 1, by H01(3031).
Command
Station No.
Command
type
H20
W(w)
SS
H3230
H57(77)
H5353
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.
This specifies how much of the blocks composed of "[device length][device name]" are in
this request Format. This can be set up to 16. Therefore, the value of [Number of blocks]
must be set between H01(ASCII value:3031)-H10(ASCII value:3030).
This indicates the number of name's characters that means device, which is allowable up to
16 characters. This value is one of ASCII converted from hex type, and the range is from
H01(ASCII value:3031) to H10(ASCII value:3130).
Address to be actually read is entered. This must be ASCII value within 16 characters, and
in this name, digits, upper/lower case, and '%' only are allowable to be entered.
If the value to be written in %MW100 area is H A, the data Format must be H000A. If the
value to be written in %MW100 area is H A, the data Format must be H000A. In data area,
the ASCII value converted from hex data is entered.
Number of
Device
Device Name
blocks
Length
H01
H06
%MW100
H254D5731
H3031
H3036
3030
1 block(setting can be repeated up to max. 16 blocks)
Explanation
8-15
Frame
Tail
Data
.....
check
H00E2
EOT
BCC
H30304
H04
532

Advertisement

Table of Contents
loading

Table of Contents