DVP - ES2/SA2/SS2/SA2/SX2/SE Operation Manual - Programming

3.3 Pointers

Mnemonic

Operands

Function

Program steps

 

 

 

 

P

P0~P255

Pointer

1

 

 

 

 

Explanation:

Controllers

ES2/EX2 SS2 SA2SE SX2

Pointer P is used with API 00 CJ and API 01 CALL instructions. The use of P does not need to start from P0, and the No. of P cannot be repeated; otherwise, unexpected errors may occur. For other information on P pointers, please refer to section 2.12 in this manual

Program example 1:

Ladder Diagram:

 

 

Instruction:

Operation:

 

X0

CJ

P10

LD

X0

Load NO contact X0

 

 

 

 

 

CJ

P10

Jump to P10

 

 

 

 

 

X1

 

 

P10

Y1

 

:

 

 

 

 

 

 

P10

 

Pointer P10

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LD

X1

Load NO contact X1

 

 

 

 

 

 

OUT

Y1

Drive coil Y1

3.4 Interrupt Pointers

Mnemonic

Function

Program steps

 

 

 

I

Interrupt program pointer

1

 

 

 

Controllers

ES2/EX2 SS2 SA2SE SX2

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. For detailed information on interrupt pointes, please refer to section 2.12 in this manual

Program example:

 

 

 

 

Ladder diagram:

 

Instruction

Operation:

 

 

code:

 

 

 

EI

EI

 

Enable interruption

 

LD

X1

Load NO contact X1

X1

Allowable range

for interruption

OUT

Y1

Drive Y1 coil

 

Y1

 

:

 

 

 

 

 

 

Pointer of

DI

DI

 

Disable interruption

 

:

 

 

interruption

 

 

 

FEND

FEND

 

Main program ends

program

 

X2

Y2

I001

 

Interruption pointer

I 001

LD

X2

Load NO contact X2

 

Interruption

 

subroutine

OUT

Y2

Drive Y2 coil

 

IRET

 

 

 

3 - 12

 

 

 

 

Page 128
Image 128
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Interrupt Pointers, P10, Fend, I001