Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual

Page 197

Advertising
background image

Chapter 11
Using Data Handling Instructions

11–14

Using Indexed Word Addresses

You have the option of using indexed word addresses for instruction
parameters specifying word addresses. Indexed addressing is discussed in
chapter 6.

Updates to Arithmetic Status Bits

The arithmetic status bits are found in Word 0, bits 0–3 in the controller
status file. After an instruction is executed, the arithmetic status bits in the
status file are updated:

Bit

Name

Description

S0/0

Carry (C)

Set if a carry is generated; otherwise cleared.

S0/1

Overflow (V)

Indicates that the actual result of a math instruction
does not fit in the designated destination.

S0/2

Zero (Z)

Indicates a 0 value after a math, move, or logic
instruction.

S0/3

Sign (S)

Indicates a negative (less than 0) value after a
math, move, or logic instruction.

Overflow Trap Bit, S5/0

Minor error bit (S5/0) is set upon detection of a mathematical overflow or
division by zero. If this bit is set upon execution of an END statement or a
Temporary End (TND) instruction, the recoverable major error code 0020 is
declared.

In applications where a math overflow or divide by zero occurs, you can
avoid a controller fault by using a reset (RST) instruction with address S5/0
in your program. The rung must be between the overflow point and the END
or TND statement.

Changes to the Math Register, S13 and S14

Move and logical instructions do not affect the math register.

Advertising