Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 349

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

3. Instructions
Function
ROL
ROL(027) shifts all bits of Wd including the
Carry Flag (CY) to the left (from rightmost bit
to leftmost bit).
ROLL
ROLL(572) shifts all bits of Wd and Wd +1
including the Carry Flag (CY) to the left (from
rightmost bit to leftmost bit).
Hint
It is possible to set the Carry Flag contents to 1 or 0 immediately before executing this instruction, by
using the Set Carry (STC(040)) or Clear Carry (CLC(041)) instructions.
Sample program
When CIO 0.00 is ON, word CIO 100 and the
Carry Flag (CY) will shift one bit to the left.
The contents of CIO 100.15 will be shifted to
the Carry Flag (CY) and the Carry Flag
contents will be shifted to CIO 100.00.
0.00
Wd
Wd:
312
CIO 100
Instruction executed once
Wd+1
When CIO 0.00 is ON, word CIO 100, CIO 101 and
the Carry Flag (CY) will shift one bit to the left. The
contents of CIO 100.15 will be shifted to the Carry
Flag (CY) and the Carry Flag contents will be shifted
to CIO 100.00.
0.00
Wd
Wd+1: CIO 101
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Wd
Wd: CIO 100
Instruction executed once

Advertisement

Table of Contents
loading

Table of Contents