Chapter 6 Instruction Details
XBC E-Type Main Unit
6-156
Ver. 1
6.26.8 SR
Instruction
Area Available
Step
Flag
P M K F L T C S Z D.x R.x
Co
nst.
U N D R
Error
(F110)
Zero
(F111)
Carry
(F112)
SR
Db O O O - O -
-
-
- O O -
-
-
-
-
3
O
-
-
I
O O O - O O O -
- O O -
-
-
-
-
D O O O - O O O -
- O O -
-
-
-
-
N O O O - O O O - O -
- O O O O O
Operand
Description
Data Type
Db
Start bit of area to shift in bit unit
BIT
I
Data of input to shift in bit unit
D
Shift direction in bit unit
N
Number of bits to shift
WORD
[Flag Set]
Flag
Description
Device
Number
Error
Error Flag will be set if N value exceeds maximum ‘Db’ area when SR
instruction is executed.
F110
1) SR
(1) Shifts N data from Shift Start Bit Db when Input Signal, which is execution condition of SR instruction, is
changed to On from Off status.
(2) Shifts bits to the right if input direction bit is On, and to the left if off.
(3) The bits empty after data shifted will be filled with input data bit’s value.
2) Program Example
(1) If M00012=0 and M00013=0, when 1 initial Clock of Input Signal F00093 is changed to On from Off status, it
shifts 8-bit data to the left from D0000’s No. 0 bit and empty bit of input data is changed to 0.
(2) If Input bit data M00012=1, empty bit is charged ‘1’
(3) If shift direction bit M00013=1, direction of bit data is changed to the right and Bit Shift is executed with 1
second cycle.
F00093
SR D00000.0 M00012 M00013 8
SR
SR
D b
I
D
N
Command
D direction, shifted for S2
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...