Arithmetic Instructions - Allen-Bradley PLC-2/30 Programming And Operations Manual

Hide thumbs Also See for PLC-2/30:
Table of Contents

Advertisement

6.4

Arithmetic Instructions

Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
The PLC-2/30 processor can be programmed to perform arithmetic
operations with two BCD values using a set of arithmetic instructions and
can perform conversions from 12-bit binary to BCD and vice versa. These
output instructions are:
Add –(+)–
Subtract –(–)–
Multiply –(A x B)–
Divide –( )–
Convert BCD to BIN (Binary) and BIN to BCD
For arithmetic instructions, the two 3-digit BCD values to be operated on
are stored in two Get instruction words. The Get instructions, programmed
in the condition area of the ladder diagram rung, should be followed by
the arithmetic instruction. Other condition instructions, if used, should be
programmed before the Get instructions.
The arithmetic instructions are programmed in the output position of the
ladder diagram rung. They are assigned either one or two data table words
to store the computed result, depending on the arithmetic operation
performed. The Add and Subtract instructions use one data table word to
store the result. The Multiply and Divide use two data table words to store
the result.
The computed result is stored in BCD format in the lower 12 bits of the
arithmetic instruction word (Figure 6.12). Two of the remaining bits (bits
14 and 16) are used to indicate overflow and underflow conditions.
Chapter 6

Advertisement

Table of Contents
loading

Table of Contents