3. Instruction Set

API

84

Mnemonic

 

Operands

Function

 

 

 

 

 

 

 

CCD

 

P

 

Check Code

 

 

 

 

 

 

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

CCD, CCDP: 7 steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S

 

 

 

 

 

 

 

*

*

*

 

*

 

*

 

*

*

 

 

 

 

 

 

 

 

 

D

 

 

 

 

 

 

 

 

 

 

*

 

*

 

*

 

*

*

 

 

 

 

 

 

 

 

 

n

 

 

 

 

 

*

*

 

 

 

 

 

 

 

 

 

 

*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

16-bit

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PULSE

 

 

 

 

 

 

 

32-bit

 

 

 

 

 

 

 

 

 

 

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

 

 

 

 

 

 

 

 

 

SE

SE

SE

Operands:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S: source data D: Destination device for storing check sum

n: Number of byte (n = 1~256)

 

Explanations:

1.This instruction performs a sum check for ensuring the validity of the communication data.

2.16-bit conversion: If M1161 = OFF, n bytes of data starting from low byte of S will be summed up, the checksum is stored in D and the parity bits are stored in D+1.

3.8-bit conversion: If M1161 = ON, n bytes of data starting from low byte of S (only low byte is valid) will be summed up, the check sum is stored in D and the parity bits are stored in D+1.

Program Example 1:

1.M1161 = OFF, 16-bit conversion.

2.When X0 = ON, 6 bytes from low byte of D0 to high byte of D2 will be summed up, and the checksum is stored in D100 while the parity bits are stored in D101.

M1000

M1161

X0

CCD

D0

D100

K6

(S)Content of data

D0 low byte

 

K100 = 0 1 1 0 0 1 0 0

 

 

 

 

 

 

 

 

 

 

 

D0 high byte

K111 = 0 1 1 0 1 1 1 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D1 low byte

 

K120 = 0 1 1 1 1 0 0 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D1 high byte

K202 = 1 1 0 0 1 0 1 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D2 low byte

 

K123 = 0 1 1 1 1 0 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D2 high byte

K211 = 1 1 0 1 0 0 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D100

 

 

K867

 

 

 

 

 

Total

 

 

 

 

 

 

 

 

D101

 

 

 

0 0 0 1 0 0 0 1

 

 

 

The parity is 1 when there is an odd number of 1.

 

 

 

 

 

 

 

 

 

 

 

The parity is 0 when there is an even number of 1.

D100

0

0

0

0

0

0

1

1

0

1

1

0

0

0

1

1

 

D101 0

0

0

0

0

0

0

0

0

0

0

1

0

0

0

1

Parity

3 - 2 3 5

Page 351
Image 351
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Ccd, Check Code