8 - 14 8 - 14
MELSEC-Q
8 MULTITASK PROCESSING
8.5 Exchanging Data between Tasks
The contents of variables and arrays in each task can be referenced only within each
program during multitask processing. It is necessary to use a special method to
exchange data between programs.
Program 1
Program 2
Variables
and arrays in
program 1
Variables
and arrays in
program 2
8.5.1 Common memory and internal devices
Common memory and extension registers (ED) can be used equally from all tasks in
AD51H-BASIC. Data can be exchanged between tasks by using this area.
Program 1
Variables
and arrays in
program 1
Variables
and arrays in
program 2
Common
memory
Internal devices
Program 2
The PUTMEM and GETMEM instructions are used in order to access common
memory and extension registers. The memory configuration is as follows.
(Address)
ED0
ED1
ED1023
ED1024
ED1025
ED2047
1800
H
1801
H
1802
H
1803
H
37FF
H
to
to
3800
H
3801
H
3FFF
H
4000
H
4001
H
47FF
H
Common memory
Internal devices
Common
memory
8 k bytes
Extension
registers
(ED)
2 k bytes
The PUTMEM and GETMEM instructions are used to access
the communication module's buffer memory as well.
Be careful when using these instructions; specifying addresses
0
H
to 17FF
H
means performing an operation to the buffer
memory.
to