beautypg.com

Delta Electronics Programmable Logic Controller DVP-PLC User Manual

Page 252

background image

6 Application Instructions API 00-49

DVP-PLC Application Manual

6-40

API Mnemonic

Operands

Function

25

D DEC P

Decrement

Controllers

ES/EX/SS SA/SX/SC EH/SV

Bit Devices

Word Devices

Program Steps

Type

OP

X Y M S K H

KnX

KnY

KnM KnS T C D E F

D

*

*

*

*

*

*

*

*

DEC, DECP: 3 steps

DDEC, DDECP: 5 steps

PULSE 16-bit 32-bit

ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV

Operands:

D

: Destination device

Explanations:

1. If

D

is used in device F, only 16-bit instruction is applicable.

2.

See the specifications of each model for their range of use.

3.

If the instruction is not a pulse execution one, the content in the designated device D will minus “1” in every scan

period whenever the instruction is executed.

4.

This instruction adopts pulse execution instructions (DECP, DDECP).

5.

In 16-bit operation, -32,768 minuses 1 and obtains 32,767. In 32-bit operation, -2,147,483,648 minuses 1 and

obtains 2,147,483,647.

6.

The operation results will not affect M1020 ~ M1022.

Program Example:

When X0 = Off→On, the content in D0 minuses 1 automatically.

X0

DECP

D0