Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual page 439

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Data Shift Instructions
Flags
Precautions
Examples
400
Lost
Name
Label
Error Flag
ER
Equals Flag
=
Carry Flag
CY
Negative Flag
N
For any bits which are shifted outside the specified word, the contents of the
last bit is shifted to the Carry Flag (CY), and all other data is lost.
When the number of bits to shift (specified in C) is "0," the data will not be
shifted. The appropriate flags will turn ON and OFF, however, according to
data in the specified word.
When the contents of the control word C is out of range, an error will be gen-
erated and the Error Flag will turn ON.
If as a result of the shift the contents of D is 0000 hex, the Equals Flag will
turn ON.
If as a result of the shift the contents of the leftmost bit of D is 1, the Negative
Flag will turn ON.
When CIO 000000 is ON, The contents of CIO 0100 is shifted 10 bits to the
left (from the rightmost bit to the leftmost bit). The number of bits to shift is
specified in bits 0 to 7 of word CIO 0300 (control data). The contents of bit 0 of
CIO 0100 is copied into bits from which data was shifted and the contents of
the rightmost bit which was shifted out of range is shifted into the Carry Flag
(CY). All other data is lost.
Shift n-bits
Contents of "a" or "0" shifted in
N bits
Operation
ON when the control word C (the number of bits to shift) is
not within range.
OFF in all other cases.
ON when the shift result is 0.
OFF in all other cases.
ON when 1 is shifted into the Carry Flag (CY).
OFF in all other cases.
ON when the leftmost bit is 1 as a result of the shift.
OFF in all other cases.
Section 3-9

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents