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.


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 *)

(* ST Equivalence: *)
result := SHL (register,1); (* register = 2#0100_1101_0011_0101 *) (* result = 2#1001_1010_0110_1010 *)
Provide Feedback