Documentation

ROR

Function name

ROR

ST call

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

Description

The function rotates the input vector to the right.

Inputs

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

Outputs

Output Type Description
=> ANY_BIT Output value

Application example