beautypg.com

Inputs, Outputs, Figure 10.17—divide function block – Watlow LogicPro User Manual

Page 150

background image

Chapter 10: Function Blocks

LogicPro User’s Guide

134

Watlow Anafaze

Doc.# 28002-00 Rev 3.00

Figure 10.17 Divide Function Block

Inputs

EN is the Divide enable bit. A True condition of this bit causes
the value of A to be divided by 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 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 Diagrams program, the value of EN is always
True. In FBD, all inputs must be connected to a Variable.

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

B is the divisor. The range of values this Variable can assume
is from -32,768 to 32,767, excluding 0 for INT type Variables
and -2,147,483,648 to 2,147,483,647, excluding 0 for LONG
type Variables. If this Variable is assigned a value out of these
ranges, unpredictable results will occur. Also, if B is assigned
a value of zero (0), the enable out bit goes False and C retains
its previous value.

NOTE!

If the divisor is 0, an error occurs as per standard
mathematical convention.

Outputs

ENO is the Divide enable out bit. This bit is enabled and passes
power when the enable bit is True as long as the value of B is
non-zero and value of C does not go out of range.

C is the quotient. C contains the quotient 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. No remainders are stored in this
value; only the whole number value. If this Variable is