EasyManuals Logo

Allen-Bradley SLC 500 Series User Manual

Allen-Bradley SLC 500 Series
694 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #69 background imageLoading...
Page #69 background image
Publication 1747-RM001G-EN-P - November 2008
Math Instructions 4-7
Example of 32-bit Addition
The following example shows how a 16-bit signed integer is added to a 32-bit
signed integer. Remember that S:2/14 must be set for 32-bit addition.
Note that the value of the most significant 16 bits (B3:3) of the 32-bit number
is increased by 1 if the carry bit S:0/0 is set and it is decreased by 1 if the
number being added (B3:1) is negative.
To avoid a major error from occurring at the end of the scan, you must
unlatch overflow trap bit S:5/0 as shown in the example ladder diagram to
follow.
TIP
The largest possible number is 2,147,483,647
(7FFF FFFF)h.
Table 4.6 Add 16-bit value B3:1 to 32-bit value B3:3 B3:2
Add Operation Binary Hex
Decimal
(1)
Addend
Addend
B3:3 B3:2
B3:1
0000 0000 0000 0011 0001 1001 0100 0000
0101 0101 1010 1000
0003 1940
55A8
203,072
21,928
Sum B3:3 B3:2 0000 0000 0000 0011 0110 1110 1110 1000 0003 6EE8 225,000
(1)
The programming device displays 16-bit decimal values only. The decimal value of a 32-bit integer is derived from the displayed binary or hex value. For example, 0003
1940 Hex is 16
4
x3 +16
3
x1 + 16
2
x9 + 16
1
x4 + 16
0
x0 = 203,072.

Table of Contents

Other manuals for Allen-Bradley SLC 500 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley SLC 500 Series and is the answer not in the manual?

Allen-Bradley SLC 500 Series Specifications

General IconGeneral
Programming SoftwareRSLogix 500
SeriesSLC 500
CategoryController
ManufacturerAllen-Bradley (Rockwell Automation)
I/O CapacityUp to 4096 I/O points
Communication PortsDH-485
Programming LanguagesLadder Logic
Operating Temperature0 to 60 °C (32 to 140 °F)
Relative Humidity5% to 95% (non-condensing)
Memory4K to 64K words (depending on the processor)
Power SupplyAC or DC (depending on the module)

Related product manuals