Rotate Bits - GE PACSystems RX7i Cpu Programmer's Reference Manual

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

4.2.9

Rotate Bits

Mnemonics:
ROL_DWORD
ROL_WORD
ROR_DWORD
ROR_WORD
When receiving power flow, the Rotate Bits Right (ROR_DWORD and ROR_WORD) and Rotate Bits
Left (ROL_DWORD and ROL_WORD) functions rotate all the bits in a string of WORDs or DWORDs N
positions respectively to the right or to the left. When rotation occurs, the specified number of bits is
rotated out of the input string respectively to the right or to the left and back into the string on the
other side.
The Rotate Bits function passes power flow to the right, unless the number of bits to rotate is less
than 0, or is greater than the total length of the string. The result is placed in output string Q. If you
want the input string to be rotated, the output parameter Q must use the same memory location as
the input parameter IN. The entire rotated string is written on each scan that power is received.
A string length of 1 to 256 words or double words can be specified.
Operands for Rotate Bits
Parameter Description
Length (??) The number of WORDs or DWORDs in the
string to be rotated. 1  Length  256.
IN
The string to rotate
N
The number of positions to rotate. 0 ≤ N ≤
Length.
Q
The resulting rotated string
Example
Whenever input V_I0001 is set, the input bit string in
%R0001 is rotated left 3 bits and the result is placed
%R00002. The actual input bit string %R0001 is left
If the same reference had been used for IN and Q, a
would have occurred in place.
%R0001
%R0002 (after %I00001 is set)
GFK-2950C
Chapter 4. Ladder Diagram (LD) Programming
Allowed Operands
Constant
All. Constants are legal when Length is 1
All except variables in %S - %SC memories
All except constants and variables in %S
memory
MSB
MSB
February 2018
Optional
No
No
No
No
location
in
unchanged.
rotation
81

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents