2-3
Section
CPM1/CPM1A Interrupt Functions
93
This example shows a program that uses the high-speed counter with phase-dif-
ference inputs in the Up/Down Mode, making comparisons by means of the
range comparison method.
The comparison conditions (upper/lower limits of the ranges) are stored in the
comparison table with the subroutine numbers. Up to 8 separate ranges can be
defined. The corresponding subroutine is executed when the counter’s PV is
within the range.
Note
Always set 8 ranges. If fewer than 8 ranges are needed, set the remaining sub-
routine numbers to FFFF. A value of FFFF indicates that no subroutine is to be
executed.
The following data is stored for the comparison table:
DM 0000
1500
DM 0001
0000
Lower limit 1: 1,500 counts
DM 0002
3000
DM 0003
0000
Upper limit 1: 3,000 counts
DM 0004
0040
Range 1 interrupt subroutine no.: 40
DM 0005
7500
DM 0006
0000
Lower limit 2: 7,500 counts
DM 0007
0000
DM 0008
0001
Upper limit 2: 10,000 counts
DM 0009
0041
Range 2 interrupt subroutine no.: 41
DM 0010
0000
DM 0011
0000
DM 0012
0000
DM 0013
0000
DM 0014
FFFF
Range 3 interrupt subroutine not executed
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
DM 0035
0000
DM 0036
0000
DM 0037
0000
DM 0038
0000
DM 0039
FFFF
Range 8 interrupt subroutine not executed
Application Example
(Up/Down Mode)
Содержание SRM1 - PROGRAMING 02-2001
Страница 1: ...Programmable Controllers Cat No W353 E1 06 SYSMAC CPM1 CPM1A CPM2A CPM2C SRM1 V2 PROGRAMMING MANUAL ...
Страница 2: ...CPM1 CPM1A CPM2A CPM2C SRM1 V2 Programmable Controllers Programming Manual Revised February 2008 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 9: ...x ...
Страница 15: ...xvi ...