Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 364

Table of Contents

Advertisement

3. Instructions
Function
NSFL
NSFL(578) 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 left (towards the leftmost word and the leftmost
bit). "0" is place into the beginning bit and the con-
tents of the leftmost bit in the shift area are shifted
to the Carry Flag (CY).
Note
• 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.
NSFR
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 right-
most 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).
Note
• 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
Example Programming
NSFL
When CIO 0.00 is ON, all bits from the beginning bit 3 to the shift data length (B hex) will be shifted one
bit to the left (from the rightmost bit to the leftmost bit). "0" will be placed into bit 3 of CIO 100. The
contents of the leftmost bit in the shift area (bit 13 of CIO 100) are copied into the Carry Flag (CY).
0.00
D
C
N
D: CIO 100
D: CIO 100
328
&3
&11
C: Starting from bit 3
N: 11 bits
0
N 1 bit
N 1 bit
N-1 bit
N-1 bit
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Shifts one bit to the left
Shifts one bit to the right

Advertisement

Table of Contents
loading

Table of Contents