6-152
6.8 Other Convenient Instructions
6.8.1 Single-phase input up/down counter
UDCNT1
6.8
Other Convenient Instructions
6.8.1
Single-phase input up/down counter
UDCNT1
*1: Specify the array in which X is set as a device for global label.
*2 : Local devices and file registers per program cannot be used as setting data.
F
unct
i
on
(1) When the input specified for
turns from OFF to ON, the current value of the counter
specified for
will be updated.
(2) The direction of the count is determined by the ON/OFF status of the input specified for
+1.
• OFF : Up counter (counts by adding to the current value)
• ON
: Down counter (counts by subtracting from the current value)
UDCNT1
indicates the following instruction.
UDCNT1
Input argument,
EN:
Executing condition
: Bit
s:
s+0:Input number for the counter input
s+1:For setting the up/down counter
• OFF······ Up-counter
• ON········ Down-counter
: Array of bit (0..1)
n:
Set value
: ANY16
Output argument,
ENO:
Execution result
: Bit
d:
Counter number that starts counting by the UDCNT1
instruction
: ANY16
Setting
data
Internal device
R, ZR
J
\
U
\G
Zn
Constant
K, H
Others
Bit
Word
Bit
Word
(X only)
*1
−
−
−
−
n
U
*2
U
*2
U
*2
−
−
U
*1
(C only)
−
−
−
U
n
i
versa
l
UD
Hi
g
h
Per
f
ormance
Structured ladder
ST
U
DCNT
1
EN
ENO
s
d
n
U
DCNT
1
(EN,s, n, d);
ENO:=
s
d
s
d
s
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......