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

Page 168

Advertising
background image

Chapter 10
Using Math Instructions

10–2

The following general information applies to math instructions.

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).

You can return to previously entered operands by pressing this key:

Then if you want to edit that operand, press

DEL

or

FUN-DEL

and enter

new parameters. Press

ENT

to accept the operand and move on to the next

one. Once the entire instruction is entered, if you want to edit the
instruction’s parameters you must go into the overwrite mode. (See page
17–4.)

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:

With this Bit:

The Controller:

S0/0

Carry (C)

sets if 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.

Math Instructions Overview

Advertising