beautypg.com

Inputs, Output, Calculation (calc) – Watlow LogicPro User Manual

Page 175: Figure 10.40— the comparison function block

background image

LogicPro User’s Guide

Chapter 10: Function Blocks

Doc.# 28002-00 Rev 3.00

Watlow Anafaze

159

Figure 10.40 The Comparison Function Block

Inputs

EN-- is the CMP function block’s enable bit. It allows the
comparison to be performed if True.

A-- is the CMP function’s first argument.

B-- is the CMP function’s second argument.

Output

Q-- is the CMP function’s output bit. The output bit is disabled
if the enable bit is False, as well as if the logical operation
performed computes to False.

Calculation (CALC)

symbol1 = CALC

This function block, shown in Figure 10.41 on page 160,
implements simple arithmetic and logic computations on
integer inputs A and B and reports the result in the integer
output C. The calculation is performed if and only if the enable
bit EN is True.

symbol2 = W, L, WP, or LP

The Variables A, B, and C need to be declared as integer type,
of size specified in this symbol, as follows. Two memory
models are available for these integers, word-length W (16-
bit) and long-word L (32-bit). If the calculation to be
performed is division (SYM3=“/”) or multiplication
(SYM3=“*”), and the second symbol is L, the outcome of the
computation will be a double (64-bit) integer. In addition, the
function block’s calculation can be performed continuously,
or only as pulses, when the enable bit (EN) switches value
from false to true. In the continuous computation case,
integers are marked as W or L, while in the Pulse computation
case, they are marked as WP or LP.