
Chapter 7 Communication function
7-58
1
Individual writing of direct variables (WSS)
This is a function to write PLC device memory directly specified in accord with memory data type.
Separate device memories can be written up to 4 at a time.
1)
Request format(PC -> PLC)
Format
Name
Header
Station
No.
Command
Command
type
Number
of
blocks
Variable
length
Variable
name
Data
Tail
Frame
check
frame(Ex) ENQ H20
W(w)
SS
H01
H06
%MW10
0
H00E2 EOT
BCC
ASCII
value
H05 H3230 H57(77) H5353 H3031 H3036
H254D5
731303
0
H30304
532
Repe
ated
block
H04
1block(Setting can be repeated up to 4 blocks)
9
BCC : When command is one of lower case(w), 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.
9
Number of blocks: This specifies the number of the blocks composed of ‘[Variable length][Variable name]’ in
this request format. This can be set up to 4 blocks. Therefore, the value of [Number of blocks] must be
H01(ASCII value:3031)-H04(ASCII value:3034).
9
Variable length(name length of direct variable) : This indicates the number of name’s characters that means
direct variable, 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).
9
Direct variable : Input address of variable to be read actually in ASCII value within 16 characters. Others
than figure, upper/lower cases, ‘%’ and ’.’ are not allowed for variable name.
9
Data : 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 %MD100 area is H A, the data format must be H0000000A. In data area, ASCII value converted
from HEX data is entered.
Direct variables available according to PLC type are as follows.
Type
BOOL
Byte
WORD
Double WORD
Long WORD
GM1/2 %MX,%QX,%IX %MB,%QB,%IB
%MW,%QW,%IW
%MD,%QD,%ID %ML,%QL,%IL
GM3 %MX,%QX,%IX
%MB,%QB,%IB
%MW,%QW,%IW
%MD,%QD,%ID -
GM4 %MX,%QX,%IX
%MB,%QB,%IB
%MW,%QW,%IW
%MD,%QD,%ID -
GM6 %MX,%QX,%IX
%MB,%QB,%IB
%MW,%QW,%IW
%MD,%QD,%ID -
GM7 %MX,%QX,%IX
%MB,%QB,%IB
%MW,%QW,%IW
%MD,%QD,%ID -