12 bit shift right instruction (shftr) – Yaskawa Ladder Works Programming Manual User Manual
Page 118

6.12 BIT SHIFT RIGHT Instruction (SHFTR)
6-21
6.12 BIT SHIFT RIGHT Instruction (SHFTR)
[Outline]
The SHFTR instruction shifts the bit sequence designated by the leading bit address (Head Bit
Address) and bit width to (Bit Width) the right the designated number of bits (Number of Shifts).
[Format]
Symbol : SHFTR
Full Name : Bit Shift Right
Category : MOVE
Icon :
[Parameter]
Parameter Name
Setting
Head Bit Address
· Any bit type register (except for # and C registers)
· Any bit type register with subscript (except for # and C registers)
Number of Shifts
· Any integer type register
· Any integer type register with subscript
· Constant
Bit Width
· Any integer type register
· Any integer type register with subscript
· Constant
[Program Example]
A five-bit wide section of data with MB0005 (bit A of MW00000) as the head is shifted three bits to
the right.
5
0 is entered.
Note: The lower three bits are thrown away.
1
1
1
1
1
・・・・・・・・・・
0
0
0
1
1
・・・・・・・・・・
・・・・・・・・・・・・・
・・・・・・・・・・・・・
2
MW00000
MW00000