Table of Contents

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

InputType Description
IN ANY_BITInput value
N ANY_INTNumber of bits to rotate the input vector to the left

Outputs

OutputType Description
ANY_BITOutput value

Application example