Updates To Math Status Bits - Allen-Bradley MicroLogix 1100 Instruction Set Reference Manual

Hide thumbs Also See for MicroLogix 1100:
Table of Contents

Advertisement

efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive
Updates to Math Status
Bits
After a math instruction is executed, the arithmetic status bits in the status
file are updated. The arithmetic status bits are in word 0 in the processor
status file (S2).
Math Status Bits
With this Bit:
S:0/0
Carry
S:0/1
Overflow
S:0/2
Zero Bit
S:0/3
Sign Bit
S:2/14
Math Overflow
(1)
Selected
S:5/0
(1)
Overflow Trap
(1) Control bits.
Overflow Trap Bit, S:5/0
Minor error bit (S:5/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 an unlatch (OTU) instruction with
address S:5/0 in your program. The rung must be between the overflow
point and the END or TND statement.
The following illustration shows the rung you can use to unlatch the
overflow trap bit.
The Controller:
sets if carry is generated; otherwise resets
sets when the result of a math instruction does not fit into the
destination, otherwise resets
sets if result is zero, otherwise resets
sets if result is negative (MSB is set), otherwise resets
examines the state of this bit to determine the value of the
result when an overflow occurs
sets if the Overflow Bit is set, otherwise resets
Publication 1763-RM001C-EN-P - October 2009
Math Instructions
189
S:5
U
0

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

1763-l16bbb1763-l16awa1763-l16bwa1763-l16dwd

Table of Contents