11 - 308 11 - 308
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
• Assign values to %(3) and %(4) ( %(6) and %(7) in case of a format 2 control
table) in the following manner.
D!
H!
L!
H$
L$
to
• • •
Address seen from the communication module
Used as work areas.
100 H!=INT(D!/65536!)
110 L!=D!-H! 65536!
120 H$=RIGHT$(”0000”+HEX$(H!))
130 L$=RIGHT$(”0000”+HEX$(L!))
In case of a format 2 control table
140 %(3)=VAL(”&H”+L$)
150 %(4)=VAL(”&H”+H$)
to
• • • •
• • • •
%(6)=VAL(”&H”+L$)
%(7)=VAL(”&H”+H$)
• Data is stored in <storage area for data to be written> in the following manner.
Example : When writing data to buffer memory addresses 1 to 3 of an AD61 module
whose I/O addresses are from X/Y40 to X/Y5F.
1) If an input element is specified as an integer variable/array, the data is stored as
follows:
Number of bytes to be written • • • • 6 bytes
Starting address • • • • • • • • • • • •
Module number • • • • • • • • • • • • •
82
H
05
H
PCRD TBL%( ), SD%( )
23
H
(H)
45
H
(L)
SD%(0)
00
H
(H)
12
H
(L)
SD%(1)
18
H
(L)
00
H
(H)
SD%(2)
45
H
(L)
23
H
(H)
00
H
(H)
12
H
(L)
18
H
(L)
00
H
(H)
23
H
(H)
00
H
(H)
45
H
(L)
12
H
(L)
18
H
(L)
00
H
(H)
1
2
3
82
H
83
H
84
H
85
H
86
H
87
H
(Address)
Storage status
of data written
Buffer memory viewed
from the BASIC program
Buffer memory viewed
from the PLC CPU
(Address)
Specify
2) If an input element is specified as a character variable or character array variable
name:
Specify
PCRD TBL%( ), SD%( )
Number of bytes to be written • • • • 6 bytes
Starting address • • • • • • • • • • • •
Module number • • • • • • • • • • • • •
82
H
05
H
45
H
(L)
23
H
(H)
00
H
(H)
12
H
(L)
18
H
(L)
00
H
(H)
23
H
(H)
00
H
(H)
45
H
(L)
12
H
(L)
18
H
(L)
00
H
(H)
1
2
3
82
H
83
H
84
H
85
H
86
H
87
H
(Address)
Storage status
of data written
Buffer memory viewed
from the BASIC program
Buffer memory viewed
from the PLC CPU
(Address)
1st
character
2nd
character
3rd
character
4th
character
5th
character
6th
character
SD $
45
H
23
H
00
H
12
H
18
H
00
H
• • • •