Omron SYSMAC mini SP10 Operation Manual page 99

Table of Contents

Advertisement

Instruction Set
0000
0001
0002
0410
CNT 04
Example 3: Extended
Counter
0000
0001
0002
CNT 01
CNT 02
CNT 01
0002
CNT 02
Example 4:
Extended Timers
CP
CNT 04
R
#0150
0103
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.
In the following example, 0000 is used to control when CNT 01 operates.
CNT 01, when 0000 is ON, counts down the number of OFF to ON changes
in 0001. CNT 01 is reset by its Completion Flag, i.e., it starts counting again
as soon as its PV reaches zero. CNT 02 counts the number of times the
Completion Flag for CNT 01 goes ON. Bit 0002 serves as a reset for the en-
tire extended counter, resetting both CNT 01 and CNT 02 when it is OFF.
The Completion Flag for CNT 02 is also used to reset CNT 01 to inhibit CNT
01 operation, once SV for CNT 02 has been reached, until the entire ex-
tended counter is reset via 0002.
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 0103
being turned ON.
CP
CNT 01
#0100
R
CP
CNT 02
#0200
R
CNT can be used in sequence as many times as required to produce count-
ers capable of counting any desired values.
CNT can be used to create extended timers in two ways: by combining TIM
with CNT and by counting dedicated clock pulse bits.
In the following example, CNT 02 counts the number of times TIM 01 reach-
es 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
Address Instruction
000
LD
001
AND
002
LD
003
OR
004
CNT
005
LD
006
OUT
Address Instruction
000
LD
001
AND
002
LD NOT
003
OR
004
OR
005
CNT
006
LD
007
LD NOT
008
CNT
009
LD
010
OUT
0103
Section 3-7
Operands
0000
0001
0002
0410
04
#
0150
CNT
04
0103
Operands
0000
0001
0002
CNT
01
CNT
02
01
#
0100
CNT
01
0002
02
#
0200
CNT
02
0103
91

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SYSMAC mini SP10 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Sysmac mini sp16Sysmac mini sp20

Table of Contents