FC 65 - Digital Sum with Gain

This function code computes a weighted sum of four boolean inputs using the following equation:

 

Output = S5<S1> + S6<S2> + S7<S3> + S8<S4>

 

It can be used to initiate a control action based on the number of boolean inputs that have a status of logic 1. These inputs could represent the status of pumps, valves, motors, etc.

 

Outputs:

Blk

Type

Description

N

R

S5<S1> + S6<S2> + S7<S3> + S8<S4>

 

 

Specifications:

Spec

Tune

Default

Type

Range

Description

S1

N

0

I

Note 1

Block address of <S1>

S2

N

0

I

Note 1

Block address of <S2>

S3

N

0

I

Note 1

Block address of <S3>

S4

N

0

I

Note 1

Block address of <S4>

S5

Y

1.000

R

Full

Gain parameter for <S1>

S6

Y

1.000

R

Full

Gain parameter for <S2>

S7

Y

1.000

R

Full

Gain parameter for <S3>

S8

Y

1.000

R

Full

Gain parameter for <S4>

 

NOTES:

1. Maximum values are: 9,998 for the BRC-100, IMMFP11/12 and 31,998 for the HAC

 

 

 

65.1   Applications

 

Figure 65-1 shows how to use function code 65 to determine flow rates from a digital indication of pump status. In the example, each operating pump provides a constant flow rate of 20 gallons per minute. An operating pump provides an output of logic 1. Specifications <S1> through <S4> provide the pump status inputs while S5 through S8 are pump flow rates. When pumps one, three and four are operating, the output is as follows.

 

Output          = S5 <S1> + S6 <S2> + S7 <S3> + S8 <S4>

 

 =  20 gal (1)  +  20 gal (0)  +  20 gal (1)  +  20 gal (1)

min               min                  min                min

 

=  60 gal

        min

 

Function code 65 can also be used for binary to real conversion. Binary to real conversion changes digital signals to analog signals (i.e., counters). Specifications <S1> through <S4> provide the binary inputs. Specifications S5 through S8 weight the inputs to achieve the desired real output. For example:

 

<S1> and <S4> = logic 1

<S2> and <S3> = logic 0

  S5 = 1.0

  S6 = 2.0

  S7 = 4.0

  S8 = 8.0

 

Output = S5 <S1> + S6 <S2> + S7 <S3> + S8 <S4>

            = 1.0(1) + 2.0(0) + 4.0(0) + 8.0(1)

            = 9.0