![background image](http://html1.mh-extra.com/html/omron/sysmac-c200h/sysmac-c200h_operation-manual_742423132.webp)
119
Execution condition
on count pulse (CP)
Execution condition
on reset (R)
ON
OFF
ON
OFF
Completion Flag
ON
OFF
PV
SV
SV – 1
SV – 2
0002
0001
0000
SV
Program execution will continue even if a non-BCD SV is used, but the SV
will not be correct.
Flags
ER:
SV is not in BCD.
Indirectly addressed DM word is non-existent. (Content of
*
DM word
is not BCD, or the DM area boundary has been exceeded.)
In the following example, the PV will be decremented whenever both 00000
and 00001 are ON provided that 00002 is OFF and either 00000 or 00001
was OFF the last time CNT 004 was executed. When 150 pulses have been
counted down (i.e., when PV reaches zero), 00205 will be turned ON.
00000
CP
R
CNT 004
#0150
00002
00001
00205
CNT 004
Address
Instruction
Operands
00000
LD
00000
00001
AND
00001
00002
LD
00002
00003
CNT
0004
#
0150
00004
LD
CNT
004
00005
OUT
00205
Here, 00000 can be used to control when CNT is operative and 00001 can
be used as the bit whose OFF to ON changes are being counted.
The above CNT can be modified to restart from SV each time power is
turned ON to the PC. This is done by using the First Cycle Flag in the SR
area (25315) to reset CNT as shown below.
00000
CP
R
CNT 004
#0150
00002
00001
00205
CNT 004
25315
Address
Instruction
Operands
00000
LD
00000
00001
AND
00001
00002
LD
00002
00003
OR
25315
00004
CNT
004
#
0150
00005
LD
CNT
004
00006
OUT
00205
Counters that can count past 9,999 can be programmed by using one CNT to
count the number of times another CNT has counted to zero from SV.
Precautions
Example 1:
Basic Application
Example 2:
Extended Counter
Timer and Counter Instructions
Section 5-12
Содержание SYSMAC C200H
Страница 1: ...OPERATION MANUAL C200H CPU01 E 03 E 11 E SYSMAC Programmable Controllers Cat No W130 E1 05 ...
Страница 2: ...C200H Programmable Controllers CPU01 E 03 E 11 E Operation Manual Revised June 2003 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 8: ...TABLE OF CONTENTS ix Glossary 345 Index 363 Revision History 369 ...
Страница 342: ...336 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage ...
Страница 374: ...Cat No W130 E1 05 C200H Programmable Controllers CPU01 E 03 E 11 E OPERATION MANUAL ...