Data Move Functions Shift Register - Emerson PaCSystems VersaMax Series User Manual

Table of Contents

Advertisement

User Manual
GFK-1503F
10.3.4

Data Move Functions Shift Register

The Shift Register function shifts one or more data words or data bits from a reference
location into a specified area of memory. For example, one word might be shifted into an
area of memory with a specified length of five words. As a result of this shift, another word
of data would be shifted out of the end of the memory area.
The reset input (R) takes precedence over the function enable input. When the reset is
active, all references beginning at the shift register (ST) up to the length specified for LEN,
are filled with zeros. If the function receives power flow and reset is not active, each bit or
word of the shift register is moved to the next highest reference. The last element in the
shift register is shifted into Q. The highest reference of the shift register element of IN is
shifted into the vacated element starting at ST. The contents of the shift register are
accessible throughout the program because they are overlaid on absolute locations in logic
addressable memory.
Figure 106
For VersaMax CPUs, when this function is used to rotate a bit sequence around a range of
discrete references, separate references must be used for ST and Q, and additional logic
must be provided to copy the output word from the Q reference back to the ST reference.
This function may be used, for example, to control the repetition of a fixed sequence of
actions. In this example, each of the discrete references in the range of the SHFR_BIT
instruction would be used as the permissive contact for one of the repeated actions.
Parameters of the Shift Register Function
Input/
Output
enable
Length
R
IN
Instruction Set Reference
Choices
Description
flow
When enable is energized and R is not, the shift is performed.
1 to 256 bits /
The length of the shift registers in bits or words. Length is
defined as the length of IN.
words.
flow
When R is energized, the shift register located at ST is filled with
zeros.
I, Q, M, T, S, G, R,
IN contains the value to be shifted into the first bit or word of the
AI, AQ, constant
shift register. For SHFR_BIT, any discrete reference may be used;
it does not need to be byte aligned.
Chapter 10
Jan 2020
130

Advertisement

Table of Contents
loading

Table of Contents