6.2 Arithmetic Operation Instructions
6.2.16 32-bit BIN data increment and decrement
6-63
6
BA
S
IC
INSTRUCTIONS
DINC, DDEC
DINC, DDEC
O
p
erat
i
on
E
rror
No operation error occurs in the execution of the DINC(P) and DDEC(P) instructions.
Program
E
xam
pl
e
(1) In the following program, 1 is added to the data in Var_D0 when X0 turns ON.
[Structured ladder]
[ST]
DINCP(X0,Var_D0);
(2) In the following program, 1 is added to the data set in Var_D0 when X0 turns ON, and the
result is stored to Var_D3.
[Structured ladder]
[ST]
IF X0 THEN
DMOVP(TRUE,Var_D0,Var_D3);
DINCP(TRUE,Var_D3);
END_IF;
(3) In the following program, 1 is subtracted from the data in Var_D0 when X0 turns ON.
[Structured ladder]
[ST]
DDECP(X0,Var_D0);
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: ......