Documentation

ROL

Function name

ROL

ST call

PROGRAM ROL_DEMO
VAR
WORD1,WORD2: WORD;
INT1: INT;
END_VAR
WORD2:= ROL(IN:=WORD1,N:=INT1);
END_PROGRAM

Description

The function rotates the input vector to the left.

Inputs

Input Type Description
IN ANY_BIT Input value
N ANY_INT Number of bits to rotate the input vector to the left

Outputs

Output Type Description
=> ANY_BIT Output value

Application example