SHL_RBIT_***: Left shift on an integer or double integer
Original instructions
Function description
The function SHL_RBIT_*** performs a shift to the left for an integer or a double integer, with recovery of the moved bits.
The additional parameters EN and ENO can be configured.
Available functions
List of available functions:
Representation in FBD
Representation applied to an integer:
Representation in LD
Representation applied to an integer:
Representation in IL
Representation applied to an integer:
LD Input_Var
SHL_RBIT_INT Shift_Num, Shifted_Var, Shifted_Bits
Representation in ST
Representation applied to an integer:
SHL_RBIT_INT(Input_Var, Shift_Num, Shifted_Var, Shifted_Bits);
Description of the parameters
The following table describes the input parameters:
Parameter
Type
Comment
Input_Var
Variable on which the shift is to be performed.
Example: Input_Var = 2#0001111101101000.
Shift_Num
Value of the shift to be performed.
Example: Shift_Num = 4.
The following table describes the output parameters:
Parameter
Type
Comment
Shifted_Var
Shifted_Var contains the value of Input_Var shifted by the number of bits given by Shift_Num. The shift register is filled with zeros.
Example: with the data examples of the previous table, the result is the following Shifted_Var = 2#1111011010000000
Shifted_Bits
Shifted_Bits contains the shifted bits.
Example: with the example values of the previous table, the result is the following Shifted_Bits = 2#0000000000000001