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
Input/
Output
Choices
Description
enable
flow
When enable is energized and R is not, the shift is
performed.
Length
1 to 256 bits / words.
The length of the shift register in bits or words.
Length is defined as the length of IN.
R
flow
When R is energized, the shift register located at
ST is filled with zeros.
IN
I, Q, M, T, S, G, R, AI,
AQ, constant
IN contains the value to be shifted into the first bit
or word of the shift register. For SHFR_BIT, any
discrete reference may be used; it does not need
to be byte aligned.
ST
I, Q, M, T, SA, SB, SC,
G, R, AI, AQ
ST contains the first bit or word of the shift
register. For SHFR_BIT, any discrete reference
may be used; it does not need to be byte aligned.
ok
flow, none
OK is energized whenever the function is enabled
and R is not enabled.
Q
I, Q, M, T, SA, SB, SC,
G, R, AI, AQ
Output Q contains the bit or word shifted out of
the shift register. For SHFR_BIT, any discrete
reference may be used; it does not need to be
byte aligned.
Caution
The use of overlapping input and output reference
address ranges in multi-word functions is not
recommended; it may produce unexpected results.
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.
152
GFK-1503E
VersaMax PLC User Manual
For public disclosure
Summary of Contents for VersaMax PLC
Page 16: ...Notes 16 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 38: ...Notes 38 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 50: ...Notes 50 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 92: ...Notes 92 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 112: ...Notes 112 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 224: ...Notes 224 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 292: ...Notes 292 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 316: ...Notes 316 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 317: ......