3 . Instruction Set

API

39

 

Mnemonic

 

Operands

Function

 

 

 

 

 

 

 

SFRD

 

P

 

Shift Register Read

 

 

 

 

 

 

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

SFRD, SFRDP: 7 steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S

 

 

 

 

 

 

 

 

 

*

*

*

*

*

*

 

 

 

 

 

 

 

 

 

D

 

 

 

 

 

 

 

 

 

*

*

*

*

*

*

 

*

*

 

 

 

 

 

 

n

 

 

 

 

 

 

*

*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PULSE

 

 

 

16-bit

 

 

 

 

32-bit

 

 

 

 

 

 

 

 

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

 

SA2

SX2

ES2/EX2

SS2

 

SA2

SX2

 

 

 

 

 

 

SE

 

SE

 

SE

Operands:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S: Head address of data stack

D: Destination device

 

n: Length of data stack

 

 

Explanation:

1.This instruction defines the data stack of n words starting from S as a FIFO data stack and specifies the first device as the pointer (S). The content of pointer indicates current length of the stack. When SFRDP is executed, first data (S+1) will be read out to D, all data in this stack moves up to fill the read device and content in pointer minuses 1. When the content in pointer = 0, the instruction stops and carry flag M1022= ON

2.This instruction is generally used in pulse execution mode (SFRDP).

3.Valid range of operand n: 2≤ n ≤512

Program Example:

1.When X0 goes from OFF to ON, D9~D2 are all shifted to the right and the pointer D0 is decremented by 1 when the content of D1 is read and moved to D21.

2.The figure below illustrates the shift and reading of the instruction. n The content of D1 is read and moved to D21.

o D9~D2 are all shifted to the right.

p The content of D0 is decremented by 1.

 

X0

 

 

SFRDP

 

D0

D21

 

K10

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

n = 10 points

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D9

D8

 

D7

 

D6

 

D5

D4

 

D3

D2

D1

D0

 

D21

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Pointer

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Data read

3 - 101

Page 217
Image 217
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Sfrd, Shift Register Read