Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual page 447

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

Data Shift Instructions
Flags
Precautions
Examples
Contents of "a" or
"0" shifted in
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 or OFF, however, according to data
in the specified word.
When the contents of the control word C are 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 +1 is 00000000 hex, the Equals Flag
will turn ON.
If as a result of the shift the contents of the leftmost bit of D +1 is 1, the Nega-
tive Flag will turn ON.
When CIO 000000 is ON, CIO 0100 and CIO 0101 will be shifted 10 bits to
the right (from the leftmost bit to the rightmost bit). The number of bits to shift
is specified in bits 0 to 7 of word CIO 0300 (control data). The contents of bit
15 of CIO will be copied into the bits from which data was shifted and the con-
tents of the leftmost bit of data which was shifted out of range will be shifted
into the Carry Flag (CY). All other data is lost.
15
12
11
C
8
Data shifted into register
8 Hex: Contents of leftmost bit 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.
8
7
4
3
0
0
0
A
No. of bits to shift: 10 bits (0A Hex)
Always 0.
Section 3-9
Shift n-bits
Lost
407

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents