The function SHRZ_*** performs a shift to the right on an integer or a double integer and fills the shift register with zeros.
The additional parameters and can be configured.
List of available functions:
Representation applied to an integer:
Representation applied to an integer:
Representation applied to an integer:
LD Input_Var
SHRZ_INT Shift_Num
ST Shifted_Var
Representation applied to an integer:
Shifted_Var := SHRZ_INT(Input_Var, Shift_Num);
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#1000000011110001.
|
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#0000100000001111
|