2 Instruction Descriptions
2-358
NJ-series Instructions Reference Manual (W502)
These instructions shift the upper Size elements in shift register array InOut[] by Num elements.
The values that are shifted out of the array are discarded.
The default value for the data type of InOut[] is stored in the empty elements. If an initial value attribute
is set for InOut[], the specified initial value is used. If an initial value attribute is not set, the default value
for the data type is used. If InOut[] is an array of structures, the members of the structures in all ele-
ments are initialized.
The default values for the data types are given below.
z ArySHL
The ArySHL instruction shifts the array to the left (toward the higher elements of the array).
z ArySHR
The ArySHR instruction shifts the array to the right (toward the lower elements of the array).
The following example shows the ArySHL instruction when Size is UINT#6 and Num is UINT#2.
Function
Data type of InOut Default
BOOL FALSE
BYTE, WORD, DWORD, or LWORD 16#0
USINT, UINT, UDINT, ULINT, SINT, INT, DINT, LINT,
REAL, or LREAL
0
TIME T#0ms
DATE D#1970-1-1
TOD TOD#0:0:0
DT DT#1970-1-1-0:0:0
STRING ''
ArySHL(abc[1], UINT#6, UINT#2);
LD ST
abc[1] abc[1]
UINT#6
UINT#2
ArySHL
EN ENO
InOut
Size
Num