Omron SYSMAC mini SP10 Operation Manual page 98

Table of Contents

Advertisement

Instruction Set
Description
Flags
Example 1:
Basic Application
0000
0001
0002
CNT 04
Example 2:
Reset for Power
Interruptions
90
CNT is used to count down from SV when the execution condition on the
count pulse, CP, goes from OFF to ON, i.e., the present value (PV) will be
decremented by one whenever CNT is executed with an ON execution condi-
tion for CP and the execution condition was OFF for the last execution. If the
execution condition has not changed or has changed from ON to OFF, the
PV of CNT will not be changed. The Completion Flag for a counter is turned
ON when the PV reaches zero and will remain ON until the counter is reset.
CNT is reset with a reset input, R. When R goes from OFF to ON, the PV is
reset to SV. The PV will not be decremented while R is ON. Counting down
from SV will begin again when R goes OFF. The PV for CNT will not be reset
in interlocked program sections or by power interruptions.
Changes in execution conditions, the Completion Flag, and the PV are illus-
trated below. PV line height is meant only to indicate changes in the PV.
Execution condition
ON
on count pulse (CP)
OFF
Execution condition
ON
on reset (R)
OFF
ON
Completion Flag
OFF
PV
ER:
The Error Flag (0311) will be turned ON when the SV is contained in
a word (SP16 and SP20 only) but the content of the indicated word is
not BCD. The instruction will be executed, but operation will not be
reliable.
In the following example, the PV will be decremented whenever both 0000
and 0001 are ON provided that 0002 is OFF and either 0000 or 0001 was
OFF the last time CNT 04 was executed. When 150 pulses have been
counted down (i.e., when PV reaches zero), 0103 will be turned ON.
CP
CNT 04
R
#0150
0103
Here, 0000 can be used to control when CNT is operative and 0001 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 Scan Flag (0410) to re-
set CNT as shown below.
SV
SV – 1
SV – 2
Address Instruction
000
LD
001
AND
002
LD
003
CNT
004
LD
005
OUT
Section 3-7
SV
0002
0001
0000
Operands
0000
0001
0002
04
#
0150
CNT
04
0103

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?

This manual is also suitable for:

Sysmac mini sp16Sysmac mini sp20

Table of Contents