Watlow CPC400 User Manual

Page 93

Advertising
background image

CPC400 Series User’s Guide

Chapter 3: Operation and Setup

Doc. 0600-2900-2000

Watlow Anafaze

79

For example, the bit that indicates whether or not the high
deviation alarm has been acknowledged is the forth bit in
the alarm acknowledge word for each channel. To deter-
mine if the high deviation alarm has been acknowledged
for a channel, extract the fourth bit from that channel’s
alarm acknowledge parameter by ANDing it with a word
that is all zeros except the fourth bit (0000 0000 0000 1000,
or 8 in decimal). If the result of the calculation is 0 the
fourth bit was not set. If the result of the calculation is 8 the
bit was set.

0000 0000 0011 1100

(60 decimal) channel’s alarm ac-
knowledge parameter value

AND

0000 0000 0000 1000

(8 decimal) mask for the fourth bit

----------------------------

is

0000 0000 0000 1000

(8 decimal) The resulting value in-
dicates that the bit was set.

To set a bit use the CALC function block’s “OR” operator
and the appropriate mask word to change the value of the
word. For example, to enable the low deviation alarm for a
channel, you must set the third bit of that channel’s alarm
enable parameter:

0000 0001 1111 1000

(504 decimal) channel’s alarm en-
able parameter value

OR

0000 0000 0000 0100

(4 decimal) mask for the third bit

----------------------

is

0000 0000 1111 1100

(508 decimal) The new value is un-
changed except for the third bit.

To clear a bit use the CALC function block’s “AND” opera-
tor and an inverse mask. For example, to set the alarm
function for a channel’s low deviation alarm to “boost,” you
must clear the third bit of that channel’s alarm function pa-
rameter:

0000 0000 0000 1100

(12 decimal) channel’s alarm func-
tion parameter value

AND

1111 1111 1111 1011

(65,531 decimal) the inverse mask
for the third bit

----------------------

is

0000 0000 0000 1000

(8 decimal) The new value is un-
changed except for the third bit.

NOTE!

Throughout this manual, we refer to the least sig-
nificant bit as the first bit.

Advertising