
B–61863E–1/06
5. TUTORIAL
GENERAL
39
Internal rely area(D address) was used for intertask communication
in the application in the chapter before here. And this reduced internal
relay area which can be used by sequence program.
Preventing this, move the data from D address to common memory.
(The data area which can be accessed from every task is called common
memory)
The files are in the directory \tutorial\5–9–1.
(1) File confirmation
Please use the files (ctl.c and tutorial.bld) in the directories as
listed below.
The files in \tutorial\5–9–1\rc for PMC–SC/SC3/SC4
The files in \tutorial\5–9–1\nb for PMC–NB/NB2
D ctl.c Link control statement
D softkey.c Source code (task1)
D task1.c Source code (task1)
D task1.con Command file for binder (task1)
D task2.c Source code (task2)
D task2.con Command file for binder (task2)
D task3.c Source code (task3)
D task3.con Command file for binder (task3)
D common.c Source code
D common.con Command file for binder
D tutorial.bld Build file
D tutorial.con Command file for binder
D tutorial.h Header file (task1, 2, and 3)
(2) Modification.
The difference from chapter 5.8 is described below.
D task1.c, task2.c, task3.c
According to the data area is moved, the part of accessing the D
address is replaced with accessing the common memory.
*pl_memul2(D, SPECIFIED_TOOL) → tool.spec_no, etc.
D tutorial.h
Definition of structure type for tool data was added.
D common.c
common.c was added for definition of the data in common
memory.
D common.con
Command file for binding common memory is added.
File common.con
common.obj ,&
oj(common.lnk) nolo &
pr(common.mp1) name(common) ss(stack(0)) &
rn(data to common_data)
Command file for binding common memory does not need the
description below.
– command option “nopl ec()”
– “code to ****” in rn( )
5.9
MULTITASKING-III
(INTERTASK
COMMUNICATION)
5.9.1
Common Memory