Subroutine Enter - Sbs(91) - Omron SYSMAC C200HS Operation Manual

Programmable controllers
Hide thumbs Also See for SYSMAC C200HS:
Table of Contents

Advertisement

Subroutines and Interrupt Control
5-23-3 SUBROUTINE ENTER – SBS(91)
Limitations
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.
• Use the I/O REFRESH instruction in interrupt subroutines to refresh required
I/O from Special I/O Units and mask interrupts in the main program while read-
ing/writing Special I/O Unit words.
Ladder Symbol
SBS(91) N
Subroutine numbers 00 through 07 are used with input interrupts and subroutine
number 99 is used for the scheduled interrupt.
Section 5-23
Masks all interrupts.
(@)INT(89)
100
000
000
Unmasks all interrupts.
(@)INT(89)
200
000
000
Definer Data Areas
N: Subroutine number
00 to 99
257

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents