Mitsubishi Melsec A User Manual page 77

Table of Contents

Advertisement

POINT
1
The SADMO system subroutine (Monitor data entry) is used
for both bit and word device and, once entered, is valid for
all tasks. These system subroutine enter the devices specified
into the OS area where they remain valid until new ones are
entered.
(5) Monitoring of devices (SADMI) specified by the monitor data
entry (SADMO)
[Program example
11
Program t o specify and monitor the following bit devices:
100 A=$F000
. . . . . . . . . . . .
.Sets indirect variable head address.
11 0 A$="X007DY0201 M0178803AOTSO46CC085".
. .
. . . .
.Stores device numbers into work area.
120 B=$E800
. . . . . . . . . . . .
Sets indirect variable head address.
130 B:O)=$FF
. . . . . . . . . . . .
.Defines PC station number as host.
140 8:1)="8"
. . . . . . . . . . . .
.Specifies "bit entry".
150 C=$E802
. . . . . . . . . . . .
.Sets indirect variable head address.
160 C(O)=6.
. . . . . . . . . . . . .
S e t s the number of points t o be entered
t o 6.
170 C ( l ) = A .
. . . . . . . . . . . . .
Sets "entry data" head address.
180 C(2)=50
. . . . . . . . . . . . .
Sets time check period t o 50 (500msec).
190 Z=CALL(O, $8084. 1, 8 )
. .
.Calls system subroutine SADMO.
200 IF
ZXO
PRINT "ERROR".
Z;
GOT0 190
. . . . . . . . .
.Checks for errors in SADMO execution.
210 D=$E900
. . . . . . . . . . . .
Sets indirect variable head address.
220 D:O)=$FF
. . . . . . . . . . . .
.Defines PC station number as host.
. . . . . . . . . . . .
230 D: l)="B"
Specifies "bit monitor".
. . . . . . . . . .
230 D ( l )=$EA00
.Data destination head address.
240 D ( 2 ) = 5 0 .
. . . . . . . . . . . .
Sets time check period t o 50 (500msec).
240 Z=CALL(O, $8087, 1. D l .
.
.Calls system subroutine SADM1.
250 I F Z#0 PRINT "ERROR",
Z;
GOT0 260
. . . . . . . . .
.Checks for errors in SADMl execution.
260 END

Advertisement

Table of Contents
loading

Table of Contents