F125_DROR

Redundant instruction

NOTE

This is a redundant instruction. It is replaced by: ROR

The function rotates the value at output d to the right. The number of bits at output d to be rotated to the right is specified by the value assigned at input n. This shift can lie between 0 and 255 (only the lower value byte of n is effective). Right rotate means that the bits shifted out of bit position 0 (LSB) are shifted via bit position 31 (MSB) into the value at output d. When input n = 0, no rotation takes place. When at input n > 32, the same result is achieved as with a number n < 32: e.g. n = 32 produces the same result as when n = 0; n = 33 the same as n = 1. The bit at position n - 1 (the last bit shifted out to the right) is simultaneously stored in the system variable sys_bIsCarry (carry flag) so that it can be evaluated accordingly.

  1.  (1) data
  2.  (2) start: ON
  3.  (3) Carry flag

Parameters

Input

n (INT)

Number of bits to be rotated (range: 0 to 255)

Output

d (DWORD, DINT, UDINT, DATE, TOD, DT)

32-bit area

Error flags

sys_bIsCarry (turns to TRUE for one scan)

if the bit at position n - 1 of d has the value 1.

Related topics:

Modified on: 2019-01-24Feedback on this pagePanasonic hotline