Delta AH500 Programming Manual page 400

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

AH 5 00 Pr ogr am m ing Ma n ua l
API
Instruction code
1004
DCNT
Device
X
Y
M
S
1
S
2
Symbol:
Explanation:
1.
The instruction DCNT can be used to enable the 32-bit counter within the range between HC0
and HC63.
2.
When the instruction DCNT is executed, the switch between the 32-bit general-purpose
addition counters and the 32-bit general-purpose subtraction counters depends on states of
the special auxiliary relays SM621~SM684.
3.
When the instruction DCNT is not executed, the counter stops counting, and the original value
of the counter is not cleared. Users can use the instruction RST to clear the value of the
counter and reset the contact.
Example:
When the PLC runs, SM621 is OFF, and the value of HC0 is cleared. When SM408 is ON for the
first time, the setting value 10 is loaded to HC0, and HC0 begins to count up.
After SM408 is switched from OFF to ON ten times, the value of HC0 is 10, and the contact of HC0
is ON.
After HC0 is ON, the value of HC0 keeps increasing because SM408 is still switched from OFF to
ON.
When the value of HC0 is 20, SM621 is ON. After SM408 is switched from OFF to ON ten times, the
contact of HC0 is OFF.
After the contact of HC0 is OFF, the value of HC0 keeps decreasing because SM408 is still switched
from OFF to ON.
6 - 2 3 2
Operand
S
, S
1
S
T
C
HC
D
Pulse instruction 16-bit instruction 32-bit instruction (5 steps)
: Counter value
S
1
: Setting value of the counter
S
2
2
L
SM SR
E
Double word
Double word
Function
32-bit counter
PR
K
16# "$"
DF
AH500

Advertisement

Table of Contents
loading

Table of Contents