Computer Hardware User Manual

356
The instructions termination code is output to SR 237 after CMCR(––) is
executed. Also, SR 252 contains flags that indicate the instructions completion
status (normal/error) and the execution status for operating levels 0 and 1. The
following table shows the function of these bits.
Word Bit(s) Function
SR 237
00 to 07 Termination code output area for operating level 0 after
execution of CMCR(––).
08 to 15 Termination code output area for operating level 1 after
execution of CMCR(––).
SR 252
00 Error Flag for operating level 0 after execution of CMCR(––)
01 ON when CMCR(––) can be executed for operating level 0
03 Error Flag for operating level 1 after execution of CMCR(––)
04 ON when CMCR(––) can be executed for operating level 1
The following table shows the meaning of the termination codes.
Code Meaning
00 Normal completion
01 Parameter error such as offset, file size, or number of words to read
02 Disk full, file I/O error, or file type error
03 Non-existent file specified
04 Comparison or search failed
05 to FE Undefined
FF Process number error
Flags ER: The content of a word containing an indirect DM/EM address is not BCD
or the DM/EM area boundary has been exceeded.
DM 6144 through DM 6655 has been used for D.
The execution enabled flag for the specified operating level (SR 25201
or SR 25204) was OFF.
The operating level specified was not 0 or 1.
Example By turning IR 00000 OFF ON OFF, 100 words of DM data starting from
DM 0100 are written to the file G:\DMSAVE.DAT (Memory Card, slot 1). The DM
area settings are shown after the ladder diagram.
SR 25201: Execution enabled flag for
operating level 0.
Operating level 0
Write file (Create new file.)
(One-word comma delimiter file)
Executes instruction with process
number 1. (Write file)
IR 00300: Output when error occurs in
execution of CMCR(––).
IR 00101: Ends execution of CMCR(––).
00100
00000
KEEP
00100
00101
25201
00100
00300
25200
00100
DIFU(013)00101
25201
@MOV(21)
#0901
DM 0000
@CMCR(––)
DM 0000
DM0098
000
S
R
SR Bits and the Termination
Code
Special I/O Unit Instructions Section 5-29