SHL (Shift Left Arithmetic or Shift Left Signed)

Shifts the 32 bits of an integer to the left and places a 0 in the least significant bit.
lrsf_sh2
lrsf_sh1
Arguments
IN
IN
DINT
Any integer value
NbS
NbS
DINT
Number of 1 bit shifts (in set [1..31])
SHL
Q
DINT
Left shifted value
no effect if NbS <= 0
0 replaces the least significant bit
Example
(* FBD Program using "SHL" Function *)
lrsf_sh3
(* ST Equivalence: *)
result := SHL (register,1); (* register = 2#0100_1101_0011_0101 *) (* result = 2#1001_1010_0110_1010 *)
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal