Chapter 7 Second Development PlatformVP3000
313
API Instruction code Operand Function
24 D INC P D BIN increment (add one)
Type
Operand
Bit devices Word devices
16-bit instruction (3 steps)
INC
Continuous
execution
type
INCP
Pulse
execution
type
32-bit instruction (5 steps)
DINC
Continuous
execution
type
DINCP
Pulse
execution
type
Associated flag: none
X Y M K H KnX KnY KnM T C D
D
Caution for using operand: none
Description
D: destination devices
If the instruction is not a pulse execution one, the content in the designated device D will plus
“1” in every scan period whenever the instruction is executed.
This instruction adopts pulse execution instructions (INCP).
In 16-bit operation, 32,767 plus 1 and obtains -32,768. In 32-bit operation, 2,147,483,647 plus
1 and obtains -2,147,483,648.
Example
When X0 = OFFON, the content in D0 plus 1 automatically.
X0
D0INCP