7-4
Section
Sample Program
105
Continued from
previous page
To read just the error code, the leftmost byte of
DM 2003 is set to 00 and the result is stored in
DM 0010.
If execution of IOWR was completed in the last
cycle, the content of DM 0010 (service code) is
compared to #0094 for an error check.
If the error code matches, the content of DM 0006
is incremented by 1 to record an error completion.
If an error completion hasn’t occurred, the contents
of IR 000 are shifted two bits to the right. (This step
is repeated so IR 000 returns to its initial status.)
Shifts the contents of IR 000 one bit to the left.
If message communications are enabled, transfers
the 10 words of command data beginning at
DM 1000 to Master Unit #0.
If the IOWR instruction’s write (transfer) operation
hasn’t been completed, the contents of IR 000 are
shifted one bit to the right for a retry.
As long as the write operation isn’t completed, the
content of DM 0007 is incremented by 1 to record
an error.
If the IOWR instruction’s write (transfer) operation is
completed, the contents of IR 000 are shifted one
bit to the left.
(Equals Flag =)
(Equals Flag
≠
)
IOWR write
incomplete
IOWR write
completed
Message
Communications
Enabled Flag
INC (38)
DM0006
ANDW (34)
#00FF
DM2003
DM0010
CMP (20)
#0094
DM0010
00002
25506
ASR (26)
000
25506
ASR (26)
000
ASL (25)
000
00000
10112
IOWR (–)
DM0000
DM1000
#0010
ASR (26)
000
00001
25506
INC (38)
DM0007
ASL (25)
000
25506
END (01)