beautypg.com

Outputs, Subtract (sub), Inputs – Watlow LogicPro User Manual

Page 147: Figure 10.15—subtract function block

background image

LogicPro User’s Guide

Chapter 10: Function Blocks

Doc.# 28002-00 Rev 3.00

Watlow Anafaze

131

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.

Outputs

ENO is the Add enable out bit. This bit is enabled and passes
power when the enable bit is True, as long as the value of C
does not go out of range.

C is the ADD sum. C contains the sum of A and B, as long as the
enable bit is True. 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, ENO is disabled. C reverts to its last valid
value whenever ENO is disabled.

Subtract (SUB)

The Subtract (SUB) function block, shown in Figure 10.15,
produces the difference between two values.

SUB calculates the difference between 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 symbolic name, which
allows their value to change dynamically within the program.

Figure 10.15 Subtract Function Block

Inputs

EN is the Subtract enable bit. A True condition of this bit
causes the value of B to be subtracted from the value of A 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 the
function block. 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 a Ladder program, the value