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
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...