3. Instruction Set

API

11

 

Mnemonic

 

Operands

Function

 

 

 

 

 

 

D

ZCP

 

P

 

Zone Compare

 

 

 

 

 

 

Controllers

ES2/EX2

SS2

SA2

SX2

SE

 

Type

 

Bit Devices

 

 

 

Word devices

 

 

 

 

 

 

Program Steps

 

OP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

Y

M

S

K

H

KnX

KnY

KnM

KnS

T

C

D

E

F

ZCP, ZCPP: 9 steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S1

 

 

 

 

 

 

*

*

*

*

*

*

*

*

*

 

*

*

DZCP, DZCPP: 17 steps

S2

 

 

 

 

 

 

*

*

*

*

*

*

*

*

 

*

*

*

 

 

 

 

 

 

 

 

 

 

 

 

 

S

 

 

 

 

 

 

*

*

*

*

*

*

*

*

*

 

*

*

 

 

 

 

 

 

D

 

 

*

*

*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PULSE

 

 

 

16-bit

 

 

 

 

32-bit

 

 

 

 

 

 

 

 

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

 

SA2

SX2

ES2/EX2

SS2

 

SA2

SX2

 

 

 

 

 

 

SE

 

SE

 

SE

Operands:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S1: Lower bound of zone comparison

S2: Upper bound of zone comparison S: Comparison

value D: Comparison result

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Explanations:

1.S is compared with its lower bound S1 and upper bound S2. D stores the comparison results.

2.The comparison values are signed binary values. If b15=1 in 16-bit instruction or b31=1 in 32-bit instruction, the comparison will regard the value as a negative binary value.

3.Operand S1 should be smaller than operand S2. When S1 > S2, the instruction takes S1 as the 1st comparison value and performs normal comparison similar to CMP instruction.

4.If operand S1, S2 , and S use index register F, only 16-bit instruction is available.

5.Operand D occupies 3 continuous devices. D, D +1, D +2 hold the comparison results,

D = ON if S1 > S, D +1 = ON if S1 S S2, D +2 = ON if S2 < S

Program example:

1.If D is set as M0, then M0, M1, M2 will work as the program example below.

2.When X0 = ON, ZCP instruction is driven and one of M0, M1, M2 is ON. When X0 = OFF,

ZCP instruction is not driven and M0, M1, M2 remain in the previous status.

X0

ZCP

K10

K100

C10

M0

M0

If C10 < K10, M0 = On

M1

If K10 < C10 < K100, M1 = On

= =

M2

If C10 > K100, M2 = On

3.Use RST or ZRST instruction to reset the comparison result.

3 - 6 1

Page 177
Image 177
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Mnemonic Operands Function, Zcp