C500MP102EV3 Omron, C500MP102EV3 Datasheet - Page 103

no-image

C500MP102EV3

Manufacturer Part Number
C500MP102EV3
Description
K-TYPE PC MEMORY RACK
Manufacturer
Omron
Datasheet

Specifications of C500MP102EV3

Leaded Process Compatible
No
Peak Reflow Compatible (260 C)
No
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Timer and Counter Instructions
92
Example 3:
Extended Timers
CNT 01
CNT 02
CNT 01
CNT 02
TIM 01
CNT 02
0000 TIM 01
0000
0002
0002
0001
0001
CNT 02
Because in this example the SV for CNT 01 is 100 and the SV for CNT 02 is
200, the completion flag for CNT 02 turns ON when 100 x 200 or 20,000 OFF
to ON changes have been counted in 0001. This would result in 0203 being
turned ON.
CNT can be used in sequence as many times as required to produce count-
ers capable of counting down even higher values.
CNT can be used to create extended timers in two ways: by combining TIM
with CNT and by counting SR area clock pulse bits.
In the following example, CNT 02 counts the number of times TIM 01
reaches zero from its SV. The completion flag for TIM 01 is used to reset TIM
01 so that is runs continuously and CNT 02 counts the number of times the
completion flag for TIM 01 goes ON (CNT 02 would be executed once each
time between when the completion flag for TIM 01 goes ON and TIM 01 is
reset by its completion flag). TIM 01 is also reset by the completion flag for
CNT 02 so that the extended timer would not start again until CNT 02 was
reset by 0001, which serves as the reset for the entire extended timer.
As the SV for TIM 01 is 5.0 seconds and the SV for CNT 02 is 100, the com-
pletion flag for CNT 02 turns ON when 5 seconds x 100 times, or 8 minutes
and 20 seconds have expired. This would result in 0201 being turned ON.
In the following example, CNT 01 counts the number of times the 1-second
clock pulse bit (1902) goes from OFF to ON. Here again, 0000 is used to
control when CNT is operating.
CP
R
CP
R
CP
R
CNT 01
CNT 02
#0100
#0200
TIM 01
CNT 02
#0100
0203
#0050
0200
Address Instruction
Address Instruction
0000
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0000
0001
0002
0003
0004
0005
0006
0007
0008
LD
AND
LD NOT
OR
OR
CNT
LD
LD NOT
CNT
LD
OUT
LD
AND NOT
AND NOT
TIM
LD
LD
CNT
LD
OUT
Section 5-11
CNT
CNT
#
CNT
#
CNT
TIM
CNT
#
TIM
#
CNT
Operands
Operands
0000
0001
0002
0100
0002
0200
0203
0000
0050
0001
0100
0200
01
02
01
01
02
02
01
02
01
01
02
02

Related parts for C500MP102EV3