Mitsubishi Electronics FX3G User Manual

Page of 964
282
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
10 Arithmetic and Logical Operation (
+, −, ×, ÷) – FNC 20 to FNC 29
10.5 FNC 24 – INC / Increment
Program example
X010
M  1
X011
FNC 12
MOVP
K  0
Z
FNC 18
BCDP
C 0Z
K4Y000
FNC 24
INCP
Z
FNC 10
CMPP
K 10
Z
M  0
→ (Z)
(C 0Z) 
→ (K4Y000)
 BIN      BCD
(Z) + 1 
→ (Z)
When Z is "10",
M1 turns ON.
The current values of counters C0 to C9
are converted into BCD format, and
output to K4Y000.
Z is cleared by the reset input X010.
Every time X011 is set to ON, the current
values of C0, C1 ... C9 are output one at
a time.