Omron C200HX Operation Manual page 302

Hide thumbs Also See for C200HX:
Table of Contents

Advertisement

Subroutines and Interrupt Control
Data Concurrence
284
Note Disabling special I/O refreshing in the normal cycle to refresh special I/O in an
interrupt subroutine is necessary only in the high-speed mode. Disabling normal
cycle refreshing of special I/O during normal interrupt mode will be ignored and
the special I/O will be refreshed both in the normal cycle and in the interrupt sub-
routine.
The execution time of interrupt subroutines must be kept to less than10 ms if the
high-speed interrupt mode is used and Special I/O Units, Host Link Units, or Re-
mote I/O Units are programmed. An interrupt programming error (system FAL
error 8B) will occur if the execution time is 10 ms or greater.
The execution time of interrupt subroutine with the longest execution time is out-
put to SR 262 and the number of the subroutine with the longest execution time
is output to SR 263.
Example: 12.3 ms for subroutine #80
0
1
SR 262
SR 263
8
0
Note The above 10-ms limit does not apply when the normal interrupt mode is used or
when the above Units are not mounted.
Although data concurrence is not a problem for execution of normal arithmetic
instructions or comparison instructions, it can be a problem when executing
longer instructions that handle multiple words, such as block transfer instruc-
tions, when the high-speed interrupt mode is used and the same data is handled
both in the main program and in an interrupt subroutine.
Data may not be concurrent in two different situations: 1) if a data write operation
in the main program is interrupted and the same data is read in an interrupt sub-
routine and 2) if a data read operation in the main program is interrupted and the
same data is written in an interrupt subroutine.
If you must handle the same data both in the main program and in an interrupt
subroutine, use programming such as that shown below to be sure that data
concurrence is preserved, i.e., mask interrupts while read/writing data that is
also handled in an interrupt subroutine.
Reading and writing common
data words
Data concurrence can also be a problem if interrupts occur during data transfers
occurring in servicing for Special I/O Units, remote I/O, or Host Link Systems.
For any of these, data can be non-concurrent down to byte units.
Use one of the following methods to preserve data concurrence in the above sit-
uations. The second methods applies to Special I/O Units only.
• Mask interrupts in the main program while moving data transferred to/from
Units to different words and use these alternate words in the interrupt subrou-
tine.
2
3
Maximum interrupt subroutine execution time (in 0.1 ms)
No. of interrupt subroutine with maximum execution time
*
*
(@)INT(89)
(@)INT(89)
Section 5-23
Masks all interrupts.
100
000
000
Unmasks all interrupts.
200
000
000

Advertisement

Table of Contents
loading

This manual is also suitable for:

C200hgC200he

Table of Contents