Chapter 4. Ladder Diagram (LD) Programming
GFK-2950C
February 2018
83
Operands for Shift Left, Shift Right, Shift Left and Shift Right
Parameter
Description
Allowed Operands
Optional
Length (??)
The number of WORDs or DWORDs in the string.
1
Length
256.
Constants.
No
IN
The string of WORDs or DWORDs to shift
All. Constants are legal
only when Length = 1.
No
N
The number of places (bits) to shift the array.
0
≤
N ≤ Length
If N is 0, no shift occurs, but power flow is
generated.
If N is greater than the number of bits in the
string (Length), all bits in Q are set to the value
B1, OK is set FALSE, and B2 is set to B1.
All except variables in
%S
—
%SC memories
No
B1
The bit value to shift into the array
flow
No
B2
The bit value of the last bit shifted out of the
array.
flow
Yes
Q
(Must be the same
data type as IN)
The first WORD or DWORD of the shifted array All except constants and
variables in %S memory.
No
Example
Whenever input V_I0001 is set, the bits in the input string that begins
at WORD1 are copied to the output bit string that starts at WORD2.
WORD2 is left-shifted by 8 bits, as specified by the input N. The
resulting open bits at the beginning of the output string are set to the
value of V_I0002.
Summary of Contents for PACSystems RX7i
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451...