beautypg.com

Outputs, Negation (neg), Inputs – Watlow LogicPro User Manual

Page 181: Negation (neg) 1, Figure 10.47— the negation function block

background image

LogicPro User’s Guide

Chapter 10: Function Blocks

Doc.# 28002-00 Rev 3.00

Watlow Anafaze

165

N-- is an integer (

INT

) or long integer (

LONG

) specifying the

number of bits the shift should be done for per scan.

D-- is the

INT

or

LONG

integer Variable on which the shift is

to be performed (also an output).

Outputs

Q-- is the shift function’s output bit. The output bit is disabled
if the enable bit is False and is enabled as soon as the enable
bit is True.

D-- is the shift function’s output destination (as well as input).
The

INT

integer or

LONG

integer will be replaced with the

result of the shift operation.

Negation (NEG)

symbol1 = NEG

The NEG function block, shown in Figure 10.47, implements
a bitwise-NOT and complements the lowest bit (two’s
position).

symbol2 = W, L, WP

, or

LP

Variable A and B need to be declared as integer type, of size
specified in this symbol, as follows. Two memory sizes are
available for this integer, word-length W (16-bit) and long-
word L (32-bit). 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.

Figure 10.47 The Negation Function Block

Inputs

EN-- is the NEG function block’s enable bit: the conversion is
performed if it is True.

A-- is the integer (

INT

) or long integer (

LONG

) Variable to

have NEG performed on it.