beautypg.com

Output, Arithmetic, Add (add) – Watlow LogicPro User Manual

Page 146: Inputs, Figure 10.14—add function block

background image

Chapter 10: Function Blocks

LogicPro User’s Guide

130

Watlow Anafaze

Doc.# 28002-00 Rev 3.00

Output

Q is the Equal To output bit. This bit is enabled and passes
power when the enable bit is True and the value of A is equal
to the value of B.

Arithmetic

The following sections contain descriptions of function
blocks found in the standard category that perform arithmetic.

Add (ADD)

The Add (ADD) function block, shown in Figure 10.14,
produces the sum of two values.

ADD calculates the sum of one value (A) and another value (B)
and places the result in another Variable (C), when the enable
bit (EN) is True. The values of A and B can be preset to a
constant or assigned a Variable name, which allows their
value to change dynamically within the program.

Figure 10.14 ADD Function Block

Inputs

EN is the ADD enable bit. A True condition of this bit causes
the value of A to be added to the value of B and the result
stored in C. In a program using Ladder logic, the value of EN
is determined by the Boolean evaluation of elements placed
between the left power rail and EN in Ladder programs. In
FBD programs, the value of EN is determined by the Variable
connected to EN. If no contacts are placed on the rung before
EN in Ladder programs, the value of EN is always True.

A is one value to be added. The range of values this Variable
can assume is from -32,768 to 32,767, including 0 for INT type
Variables and -2,147,483,648 to 2,147,483,647, including 0
for LONG type Variables. If this Variable is assigned a value
out of these ranges, unpredictable results will occur.

B is another value to be added. The range of values this
Variable can assume is from -32,768 to 32,767, including 0