Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 227

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Timer and Counter Instructions
Description
Flags
Precautions
194
Area
Indirect DM
---
addresses in
BCD
Constants
---
Data Registers
---
Index Registers
---
Indirect address-
,IR0 to ,IR15
ing using Index
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
Registers
DR0 to DR15, IR0 to IR15
The counter PV is decremented by 1 every time that the count input goes from
OFF to ON. The Completion Flag is turned ON when the PV reaches 0.
Once the Completion Flag is turned ON, reset the counter by turning the reset
input ON or by using the CNR(545)/CNRX(547) instruction. Otherwise, the
counter cannot be restarted.
The counter is reset and the count input is ignored when the reset input is ON.
(When a counter is reset, its PV is reset to the SV and the Completion Flag is
turned OFF.)
Count input
Reset input
SV
Counter PV
Completion
Flag
Name
Label
Error Flag
ER
Equals Flag
=
Negative Flag
N
Counter numbers are shared by the CNT, CNTX(546), CNTR(012),
CNTRX(548), CNTW(814), and CNTWX(818) instructions. If two counters
share the same counter number but are not used simultaneously, a duplica-
tion error will be generated when the program is checked but the counters will
operate normally. Counters which share the same counter number will not
operate properly if they are used simultaneously.
A counter's PV is refreshed when the count input goes from OFF to ON and
the Completion Flag is refreshed each time that CNT/CNTX(546) is executed.
The Completion Flag is turned ON if the PV is 0 and it is turned OFF if the PV
is not 0.
N
*D0 to *D32767
BCD:
Binary:
DR0 to DR15
---
Operation
ON if N is indirectly addressed through an Index Register
but the address in the Index Register is not the PV
address of a counter.
ON if in BCD mode and S does not contain BCD data.
OFF in all other cases.
OFF or unchanged
OFF or unchanged
Section 3-5
S
#0000 to 9999 (BCD)
"&" cannot be used.
&0 to &65535 (decimal)
#0000 to #FFFF (hex)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents