Rockwell Automation 1772-AF4,D17726.5.3 User Manual, AUX FUNCT PROM User Manual

Page 17

Advertising
background image

Programming

Chapter 3

3Ć9

Status Bits

The most significant four bits of the most significant word of the result data
area are reserved for status bits. These bits have the following meanings:

Enable - bit 17
Sign - bit 16
Done - bit 15
Error bit - bit 14

The enable bit is set at the start of an AF4 function and reset upon completion.

The sign bit, if set, indicates a negative value.

The done bit is reset at the start of an AF4 function and set upon completion.

The error bit is a general error flag that indicates overflow and invalid operand
or result errors. Individual functions determine the actual state of this bit.

Throughout this manual, unused status bits are shown blank for the following
reasons:

Whether the content of an unused status bit is an input word is 0 or 1 is

irrelevant as such bits are ignored in AF4 function execution.

The AF4 reset unused status bits in result words. For simplicity these bits are

left blank.

Accuracy

In the series A, revision A AF4, the typical error is +1 in the least significant
digit (LSD). However, two functions have errors which exceed this limit.
Function 32, e

+x

, has error limits of +8 and -1 in the least significant digit for a

range of x from 0.00 to -9.99.

Function 33, y

+x

, has error limits of +6 and -1 in the least significant digit when

x is negative.

AF4 Addition Function

An AF4 addition function operates on two 6-digit BCD numbers and presents
the result in a third 6-digit BCD number.

(+xxx xxx.) + (+xxx xxx.) = +xxx xxx.

Advertising