EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 104

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...
71
Interrupt Tasks Section 2-3
High-speed Counter
Interrupt Tasks:
Tasks 0 to 255
High-speed counter interrupt tasks are enabled by executing the COMPARI-
SON TABLE LOADinstruction (CTBL(882)) to specify the execution condition
and the interrupt to execute. The comparison condition consists of target val-
ues or a comparison range.
Example
The following example illustrates executing high-speed interrupt task 10 when
the present value of high-speed counter 0 equals the target value when the
present value is incremented.
Scheduled Interrupt
Task: Task 2
Scheduled interrupt tasks are disabled in the default PLC Setup at the start of
cyclic task execution. Perform the following steps to enable scheduled inter-
rupt tasks.
1,2,3... 1. Execute the SET INTERRUPT MASK instruction MSKS(690) from a cyclic
task and set the time (cycle) for the specified scheduled interrupt.
2. Set the Scheduled interrupt interval in PLC Setup.
Note The interrupt time setting affects the cyclic task in that the shorter the interrupt
time, the more frequently the task executes and the longer the cycle time.
Example: The following examples shows executed scheduled interrupt task
every second.
END
END
END
D0 0001
D1 2710
D2 0000
D3 000A
CTBL
#0000
#0000
D0
00002710
COM 01 03 05 07 09
00 02 04 06 08
Cyclic task
Cyclic task
Match
High-speed Counter interrupt task 10
PV of high-speed counter 0
Comparison
High-speed counter 0
increment input
High-speed counter 0
decrement input
High-speed counter 0
reset input
CP1H
Target value for high-speed counter 0
Target
value
comparison
started with
CTBL(82).
One target value
Target value: 0000 2710 hex (10,000)
Compare when incrementing (bit 15: ON),
Interrupt task: 10 (0A hex)
High-speed counter 0
Register comparison table and
start comparison.
First word in comparison table

Table of Contents

Related product manuals