Attention

IronPLC implements many parts of the IEC 61131-3 standard and is working toward full Structured Text support. Key features still missing include arrays and structures. Try it out in the IronPLC Playground.

ROR

Rotates a bit string right by a specified number of positions.

IEC 61131-3

Section 2.5.1.5.6

Support

Supported

Signatures

#

Input (IN)

Input (N)

Return Type

Support

1

BYTE

INT

BYTE

Supported

2

WORD

INT

WORD

Supported

3

DWORD

INT

DWORD

Supported

4

LWORD

INT

LWORD

Supported

Description

Rotates the bit string IN right by N positions. Bits shifted out of the rightmost position wrap around to the leftmost position. No bits are lost.

Example

See Also

  • ROL — rotate left

  • SHR — shift right

  • SHL — shift left