GE VersaMax PLC User Manual page 152

Table of Contents

Advertisement

Input/
Output
enable
Length
R
IN
ST
ok
Q
152
GFK-1503E
For public disclosure
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.
10.3.4.1 Parameters of the Shift Register Function
Choices
When enable is energized and R is not, the shift is
flow
performed.
The length of the shift register in bits or words.
1 to 256 bits / words.
Length is defined as the length of IN.
When R is energized, the shift register located at
flow
ST is filled with zeros.
IN contains the value to be shifted into the first bit
I, Q, M, T, S, G, R, AI,
or word of the shift register. For SHFR_BIT, any
AQ, constant
discrete reference may be used; it does not need
to be byte aligned.
ST contains the first bit or word of the shift
I, Q, M, T, SA, SB, SC,
register. For SHFR_BIT, any discrete reference
G, R, AI, AQ
may be used; it does not need to be byte aligned.
OK is energized whenever the function is enabled
flow, none
and R is not enabled.
Output Q contains the bit or word shifted out of
I, Q, M, T, SA, SB, SC,
the shift register. For SHFR_BIT, any discrete
G, R, AI, AQ
reference may be used; it does not need to be
byte aligned.
Caution
10.3.4.2 Example 1:
In the example, the shift register operates on register memory locations %R0001 through
%R0100. (%R0001 is defined as type Word of length 100). When the reset reference
CLEAR is active, the Shift Register words are set to zero.
When the NXT_CYC reference is active and CLEAR is not active, the word from output
status table location %Q0033 is shifted into the Shift Register at %R0001. The word
shifted out of the Shift Register from %R0100 is stored in output %M0005.
Description
The use of overlapping input and output reference
address ranges in multi-word functions is not
recommended; it may produce unexpected results.
VersaMax PLC User Manual

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents