5
Categories and Use of Basic Application Instructions
DVP-PM Operation Instruction
5-58
API Mnemonic
Operands
Function
39
SFRD P
Shift Register Read
Controllers
20PM
10PM
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX
KnY
KnM KnS T C D E F
S
* *
*
*
*
*
*
*
D
*
*
*
*
*
*
*
*
n
*
*
SFRD, SFRDP: 7 steps
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 M1970= ON
2.
This instruction is generally used in pulse execution mode (SFRDP).
3.
When SFRD is used as 16-bit instruction, Z device cannot be adopted; when SFRD is used as 32-bit
instruction, V device cannot be adopted.
4.
When specifying the bit device of KnX(Y/M/S), the starting No. should be a multiple of 16 in octal or decimal
format. For example, K1X0, K4Y20 (octal); K1M0, K4S16 (decimal).
5.
Valid range of operand
n
: 2
≤
n
≤
512
6. Flags:
OX
O100
Zero flag
M1808
M1968
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.
D9
D8
D7
D6
D5
D4
D3
D2
D1
D0
D21
X0
SFRDP
D0
K10
D21
n = 10 points
Data read
Pointer
Summary of Contents for DVP-10PM
Page 1: ......
Page 45: ...2 Hardware Specifications and Wiring DVP PM Application Manual 2 30 MEMO...
Page 125: ...3 Functions of Devices in DVP PM DVP PM Application Manual 3 80 MEMO...
Page 341: ...8 Application Examples DVP PM Application Manual 8 2 Trajectory 3 Trajectory 4...
Page 427: ...9 Electrical CAM DVP PM Application Manual 9 74...
Page 437: ...10 Encrypting User Program DVP PM Application Manual 10 10 MEMO...
Page 458: ...11 G code Application DVP PM Application Manual 11 21 B O100 main program...
Page 561: ...14 Appendix DVP PM Application Manual 14 4 MEMO...