Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 341

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Data Shift Instructions
Description
Flags
Precautions
Examples
308
NSFR(579) shifts the specified number of bits by the shift data length (N) from
the beginning bit (C) in the rightmost word as designated by D one bit to the
right (towards the rightmost word and the rightmost bit). "0" will be placed into
the beginning bit and the contents of the rightmost bit in the shift area will be
shifted to the Carry Flag (CY).
N-1 bit
N-1 bit
Name
Label
Error Flag
ER
Carry Flag
CY
When the shift data length (N) is 0, the contents of the beginning bit will be
copied to the Carry Flag (CY), and its contents will not be changed.
Only the bits shifted into rightmost word in the shift area (i.e. leftmost word
data) will be changed.
When CIO 0.00 is ON, all bits from the beginning bit 2 to end of the shift data
length 11 bits (B hex), will be shifted one bit to the right , (from the leftmost bit
to the rightmost bit). "0" is shifted into bit 12 of CIO 1000. The contents of the
rightmost bit in the shift area (bit 2 of CIO 1000) are copied into the Carry Flag
(CY).
0.00
1000
&2
&11
D: CIO 1000
D: CIO 1000
0
Shifts one bit to the right
Operation
ON when C data is not between 0000 and 000F hex.
OFF in all other cases.
ON when 1 is shifted into the Carry Flag (CY).
OFF in all other cases.
C: Starting from bit 2
N: 11 bits
Section 3-8

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents