
Chapter 7 Communication function
7-44
[Table 7.16] Number of data according to variables
Classification
Direct variable available
Number of data (Byte)
BOOL(X)
%MX,%QX,%IX,%(P,M,L,K,F,T)X
1(only lowest bit of these is effective)
Byte(B) %MB,%QB,%IB,
%(P,M,L,K,F,T,C,D,S)W
1
WORD(W) %MW,%QW,%IW,%(P,M,L,K,F,T,C,D,S)W
2
DOUBLE WORD(D) %MD,%QD,%ID, %(P,M,L,K,F,T,C,D,S)W
4
LONG WORD(L)
%ML,%QL,%IL
8
* Values of ASCII code converted from HEX data are in data area.
Ex.1
Data number of H04(ASCII code value:H3034) indicates that 4-byte data in HEX. is in the data(DOUBLE WORD).
HEX data of 4 bytes is converted into ASCII code in data.
Ex.2
If the number of data is H04 and the data is H12345678, ASCII converted code value of this is “31 32 33 34 35 36
37 38”, which is input in data area. Namely, the highest value comes first and the lowest last.
Remark
[Notes] If data type is BOOL, data read is indicated by one byte of HEX. Namely, if bit value is 0, it is indicated by
H00 and if 1, it is indicated by H01.
3)
Response format(for PLC of NAK response)
Format
Name
Header
Station No.
Command
Command type
Error code
(HEX 2 Byte)
Tail
Frame check
Frame(Ex.) NAK H20 R(r)
SS
H1132
ETX
BCC
ASCII value
H15
H3230
H52(72)
H5353
H31313332
H03
9
Station number, commands, and type of command are the same as in computer request format.
9
BCC : When command is one of lower case(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, added to BCC, and sent.
9
Error code is HEX and 2 bytes(ASCII code, 4 bytes), which indicates type of error. For the details, see
Appendix ‘B. Error Code Table’.