2 Instruction Descriptions
2-354
NJ-series Instructions Reference Manual (W502)
AryShiftRegLR
The AryShiftRegLR instruction shifts a bit string one bit to the left or right and inserts the input value to
the least-significant or most-significant bit. The bit string consists of array elements.
Instruction Name FB/FUN Graphic expression ST expression
AryShiftRegLR Reversible Shift
Register
FB AryShiftRegLR_instance
(ShiftL, ShiftR,Reset, In,
InOut, Size);
Variables
Name Meaning I/O Description Valid range Unit Default
ShiftL Left shift
Input
Shifted left when signal
changes to TRUE.
Depends on data type.
---
FALSE
ShiftR Right shift Shifted right when signal
changes to TRUE.
Reset Reset TRUE: Register is reset.
In Input value Value to insert to least-sig-
nificant or most-significant
bit of InOut[]
Size Number of
elements in
array of bit
strings
Number of elements to use
as a shift register in InOut[].
1
InOut[]
(array)
Array of bit
strings
In-out Array of bit strings Depends on data type.
---
---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
ShiftL OK
ShiftR OK
Reset OK
In OK
Size OK
InOut[]
(array)
OK OK OK OK OK
AryShiftRegLR
AryShiftRegLR_instance
ShiftL ENO
ShiftR
Reset
In
InOut
Size