![background image](http://html1.mh-extra.com/html/omron/sysmac-cs-series/sysmac-cs-series_reference-manual_742030442.webp)
402
Data Shift Instructions
Section 3-9
Flags
Precautions
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 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 is 0000, the Equals Flag will turn
ON.
If as a result of the shift the contents of the leftmost bit of D, D +1 is 1, the
Negative Flag will turn ON.
Examples
When CIO 000000 is ON, CIO 0100 and CIO 0101 will be shifted to the left
(from the rightmost bit to the leftmost bit) by 10 bits. 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.
Name
Label
Operation
Error Flag
ER
ON when the control word C (the number of bits to shift) is
not within range.
OFF in all other cases.
Equals Flag
=
ON when the shift result is 0.
OFF in all other cases.
Carry Flag
CY
ON when 1 is shifted into the Carry Flag (CY).
OFF in all other cases.
Negative Flag
N
ON when the leftmost bit is 1 as a result of the shift.
OFF in all other cases.
15
8
0
11
3
7
4
12
C
0
8
0
A
No. of bits to shift: 10 bits (0A Hex)
Always 0.
Data shifted into register
8 Hex: Contents of right-
most bit shifted in
Содержание SYSMAC CS Series
Страница 2: ......
Страница 4: ...iv ...
Страница 30: ...xxx ...
Страница 186: ...146 List of Instructions by Function Code Section 2 4 ...
Страница 194: ...154 3 35 4 MOVE BIT MOVBC 568 1273 3 35 5 BIT COUNTER BCNTC 621 1275 3 35 6 GET VARIABLE ID GETID 286 1277 ...
Страница 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Страница 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Страница 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Страница 1392: ...1352 ASCII Code Table Appendix A ...
Страница 1404: ...1364 Revision History ...