beautypg.com

Bit shift right (bsr), Preface, Operation – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual

Page 194

background image

Preface

MicroLogix 1000 Programmable Controllers User Manual

11–6

Bit Shift Right (BSR)

When the rung goes from false-to-true, the controller sets the enable bit (EN bit 15)
and the data block is shifted to the right (to a lower bit number) one bit position. The
specified bit at the bit address is shifted into the last bit position. The first bit is
shifted out of the array and stored in the unload bit (UL bit 10). The shift is
completed immediately.

For wraparound operation, set the bit address to the first bit of the array or to the UL
bit.

Operation

The following figure shows the operation of the BSR instruction shown above.

35 34 33

51 50 49 48

67 66 65 64

32

39 38 37

55 54 53 52

69 68

36

43 42 41

59 58 57 56

40

47 46 45

63 62 61 60

44

RESERVED

38 Bit Array
#B3:2

Source Bit
I:0/06

Unload Bit
(R6:04/10)

Data block is shifted one bit at a
time from bit B3/69 to bit B3/32.

If you wish to shift more than one bit per scan, you must create a loop in your
application using the JMP, LBL, and CTU instructions.

53.34+

3.98/word

Execution Times

(

µ

sec) when:

False

True

19.80

(DN)

BSR

BIT SHIFT RIGHT
File
Control
Bit Address
Length

(EN)