Mitsubishi Melsec A User Manual page 86

Table of Contents

Advertisement

(3)
TIC
set values read.
[Program example]
Program for reading set values of TO t o T31 and
C64
t o C79 t o
memory addresses BOOOH t o B03FH and B040H t o B05FH in
channel 2.
100 Z=ZWR1(2, $E700, $FF)
. .
. . .
.Defines PC station number a s host.
110 Z=ZWR1(2, $E701, $4D).
.
.
. .
Sets main ,"M", sequence program.
120 Z=ZWR2(2, $E702, $FEOO)
. .
.
.Sets read head step t o TO.
130 Z=ZWR2(2, $E704,32)
. . .
.
. .
.Sets the number of points to be read to
32.
140 Z=ZWR2(2. $E706, $8000)
. . .
.Sets data destination head address.
150 Z=ZWR2(2, $E708,50).
. .
. . .
.Sets time check period to 50 (500msec).
160 Z=CALL(O, $808A, 2, $E700).
.
.Reads T O to T31 set values.
170 Z=ZWR2(2, $E702, $FF40)
. .
.
Sets read head step t o C64.
180 Z=ZWR2(2, $E704, 16)
. .
. .
. .
Sets the number of points to be read to
16.
190 Z=ZWR2(2, $E706, $8040)
.
. .
Bets data destination head address.
200 Z=CALL(O. $808A, 2, $E700).
.
.Reads C64 to C79 set values.
210 IF Z M PRINT "ERROR",
Z; GOT0 200.
.
. .
. .
. . . . .
.
.
.Checks for errors in SAAR execution.
220 END

Advertisement

Table of Contents
loading

Table of Contents