Attention
IronPLC can only run very simple programs. The steps described are accurate but many language features are not yet supported.
SHL¶
Shifts a bit string left by a specified number of positions.
IEC 61131-3 |
Section 2.5.1.5.6 |
Support |
Not yet supported |
Signatures¶
# |
Input (IN) |
Input (N) |
Return Type |
Support |
|---|---|---|---|---|
1 |
|
|
|
Not yet supported |
2 |
|
|
|
Not yet supported |
3 |
|
|
|
Not yet supported |
4 |
|
|
|
Not yet supported |
Description¶
Shifts the bit string IN left by N positions. Vacated positions on the right are filled with zeros. Bits shifted beyond the leftmost position are discarded.
Example¶
result := SHL(BYTE#2#0000_0001, 3); (* result = 2#0000_1000 *)
result := SHL(WORD#16#00FF, 8); (* result = 16#FF00 *)