ROL is an IEC operator in CODESYS that performs a bitwise rotation of an operand to the left. It moves the input value n bit positions to the left and places the bits shifted out of the leftmost position back in from the right. The result is assigned to an output variable; permitted data types are BYTE, WORD, DWORD and LWORD.
| Language | iec 61131 3 |
|---|---|
| Code | ROL |
| Syntax | erg := ROL(in, n) |
| Dialect | CODESYS |
| Name | Data type | Description |
|---|---|---|
| in | BYTE, WORD, DWORD, LWORD | Operand to be rotated left; its data type determines the number of bits used. |
| n | BYTE | Number of bit positions the operand is rotated to the left. |