Bit shift instructions overview – Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual

Page 228

Advertising
background image

Chapter 13
Using Application Specific Instructions

13–2

The following general information applies to bit shift instructions.

Entering Parameters

Enter the following parameters when programming these instructions:

File is the address of the bit array you want to manipulate. You must use
the file indicator (#) in the bit array address. (The HHP inserts the #
character automatically.)

Control is the address of the control element that stores the status byte of
the instruction, the size of the array (in number of bits). Note that the
control address should not be used for any other instruction.

The control element is shown below.

EN DN ER UL Not used

15 13 11 10 00

Size of bit array (number of bits)

Reserved

Word 0

Word 1

Word 2

Status bits of the control element may be addressed by mnemonic. They
include:

Unload Bit UL (bit 10) is the instruction’s output.

Error Bit ER (bit 11), when set, indicates the instruction detected an
error such as entering a negative number for the length or position.
Avoid using the unload bit when this bit is set.

Done Bit DN (bit 13), when set, indicates the bit array shifted one
position.

Enable Bit EN (bit 15) is set on a false-to-true transition of the rung
and indicates the instruction is enabled.

When the register shifts and input conditions go false, the enable, done,
and error bits are reset.

Bit Address is the address of the source bit. The status of this bit is
inserted in either the first (lowest) bit position (BSL) or last (highest) bit
position (BSR).

Length (size of bit array) is the number of bits in the bit array, up to 1680
bits. A length value of 0 causes the input bit to be transferred to the UL
bit.
A length value that points past the end of the programmed file causes a
major error to occur. If you alter a length value with your program, make
certain that the altered value is valid.

The instruction invalidates all bits beyond the last bit in the array (as
defined by the length) up to the next word boundary.

Entering the Instructions

The following items apply when entering the instructions:

Whenever you see asterisks on the display, the HHP is waiting for data
entry (i.e., a number).

Bit Shift Instructions
Overview

Advertising