beautypg.com

3 basic instructions – Delta Electronics Programmable Logic Controller DVP-PLC User Manual

Page 170

background image

3 Basic Instructions

DVP-PLC Application Manual

3-16

Program Example:

Ladder diagram:

Instruction code:

Operation:

LD

X0

Loading in A contact of X0

CJ

P10

From instruction CJ to P10

:

P10

Pointer P10

LD

X1

Loading in A contact of X1

X0

Y1

CJ

P10

X1

P10

OUT Y1

Driving

Y1

coil

Mnemonic Function Program

steps

I

Interruption program marker (I)

1

Controllers

ES

EX

SS

SA

SX

SC

EH

SV

Operand

I00□, I10□, I20□, I30□, I40□, I50□, I6□□, I7□□, I8□□

I010, I020, I030, I040, I050, I060, I110, I120, I130, I140, I150, I160, I170, I180

Explanations:

A interruption program has to start with a interruption pointer (I□□□) and ends with API 03 IRET. I instruction has to

be used with API 03 IRET, API 04 EI, and API 05 DI. See Chapter 2.9 for pointers of all DVP series PLCs.

Program Example:

Ladder diagram:

Instruction code: Operation:

EI Enabling

interruption

LD

X1

Loading A contact of X1

OUT Y1 Driving

Y1

coil

:

DI

Disabling

interruption

:

FEND

Main program ends

I001

Interruption pointer

LD

X2

Loading in A contact of X2

OUT Y2 Driving

Y2

coil

:

Y1

EI

X1

I 001

DI

FEND

Y2

X2

IRET

Allowable range

for interruption

Interruption

subroutine

Pointer of
interruption

program

IRET

Interruption

return