EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Global Subroutine; Interrupt Tasks; Types of Interrupt Tasks

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
68
Interrupt Tasks Section 2-3
2-2-6 Global Subroutine
A subroutine in one task cannot be called from other tasks. A subroutine
called a global subroutine can be created in interrupt task number 0, and this
subroutine can be called from cyclic tasks (including extra cyclic tasks).
GSBS(750) is used to call a global subroutine. The subroutine number must
be between 0 and 255. The global subroutine is defined at the end of interrupt
task number 0 (just before END(001)) between GSBN(751) and GRET(752)
instructions.
Global subroutines can be used to create a library of standard program sec-
tions that can be called whenever necessary.
2-3 Interrupt Tasks
2-3-1 Types of Interrupt Tasks
List of Interrupt Tasks
GSBN
n
GSBS
n
GSBS
n
GRET
END
Cyclic task (including
extra cyclic task)
Multiple tasks
Cyclic task (including
extra cyclic task)
Call
Call
Exe-
cution
Return
Return
Interrupt task 0
n = 0 to 1,023
Global subroutine
(shared subroutine
used for standard
programming)
Type Task
No.
Execution condition Setting procedure Number of
interrupts
Application
examples
Input
Inter-
rupts
CP1H
X/XA: 0 to 7
140 to
147
An interrupt occurs when
an interrupt input built
into the CPU Unit turns
ON or OFF in Direct
Mode or when a speci-
fied number of ON or
OFF signals is detected
at the interrupt input in
Counter Mode.
Use the SET INTER-
RUPT MASK instruction
MSKS(690) to specify
which interrupt inputs
are enabled.
8 points Increasing
response speed to
specific inputs
CP1H
Y: 0 to 5
140 to
145
6 points
CP1L
M, or L (20 I/O):
0 to 5
140 to
145
6 points
CP1L
L (14 I/O): 0 to 3
140 to
143
4 points
High-speed counter
interrupts
0 to
255
An interrupt occurs when
a condition is met for a
target value or range
comparison for the
present value of a high-
speed counter.
Use the COMPARISON
TABLE LOADinstruction
(CTBL(882)) to specify
the execution condition
and the interrupt to exe-
cute.
256 points Performing posi-
tioning operations
based on counting
encoder pulses

Table of Contents

Related product manuals