You are on page 1of 6

# Function Code 1 Function Generator

GENERAL DESCRIPTION
S1 (1) N

F(X)

This function approximates a nonlinear output to input relationship. The input range is divided into five sections and a linear input to output relationship is set up for each of the five sections. This function then computes an output that is related to the input according to the five linear relationships.

UTILIZATION
CBC01 CLC01 CLC02 CLC03 CLC04 CSC01 IMAMM03 IMCOM03 IMCOM04 IMLMM02 IMMFC03 IMMFC04 IMMFC05 IMMFP01 IMMFP02 IMMFP03 IMMPC01 IMQRC01 INIIT02 INIPT01 INIPT02 INPPT01 INSEM01 NAMM02 NCOM02 NGCM01 NGCM02 NLMM01 NMFC01 NMFC02 SLC01 SLC21

OUTPUTS
Blk
N

Type
R Output value of function

Description

SPECIFICATIONS
Spec
S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S13

Tune
N Y Y Y Y Y Y Y Y Y Y Y Y

Default
0 4.0 E06 0.000 4.0 E06 0.000 4.0 E06 0.000 4.0 E06 0.000 4.0 E06 0.000 4.0 E06 0.000

Type
I R R R R R R R R R R R R

Range
Note 1 Full Full Full Full Full Full Full Full Full Full Full Full Block address of input Input coordinate

Description

Output coordinate for S2 Input coordinate Output coordinate for S4 Input coordinate Output coordinate for S6 Input coordinate Output coordinate for S8 Input coordinate Output coordinate for S10 Input coordinate Output coordinate for S12

NOTE: 1. Maximum values are: 254 for COM modules and CLC01/02/03/04 1023 for SLC01/21 2046 for NMFC01/02, IMMFC05 and CBC01 9998 for IMMFC03/04 and IMMFP01/02/03

I-E96-200B

## Function Generator 15 FEB 1995 1-1

Function Code 1

EXPLANATION
To set up this function, first determine what the output should be for a given range of input and draw a graph to show this relationship. Divide the graphed relationship into five sections, preferably into sections where straight lines can closely approximate the graph as shown in Figure 1-1.

Y AXIS
S13 (Y6) 15 S11 (Y5) 13

S9 (Y4)

S7 (Y3)

S5 (Y2) S3 (Y1)

## 2 1 2 (X1) S2 6 (X2) S4 10 (X3) S6 12 (X4) S8 18 (X5) S10 30 (X6) S12

X AXIS

INPUT

TP45101A

Figure 1-1. Graph of Input Versus Output The coordinates of the end points of the sections are used as entries for S2 through S13. The even-numbered specifications are the X-axis coordinates and the odd-numbered are the Y-axis coordinates. Consequently, when the X-axis input value is at S2, the output will be the value of S3 as shown in the graph. This divides the graph into five linear (straightline) sections, with each section having its own particular slope as shown in Figure 1-2.

Y AXIS
S13 (Y6) 15 S11 (Y5) 13

S9 (Y4)

S7 (Y3)

S5 (Y2) S3 (Y1)

2 1 0
2 (X 1 ) S2 6 (X 2 ) S4 10 12 (X 3 ) (X 4 ) S6 S8 18 (X 5 ) S10 30 (X 6 ) S12

X AXIS

INPUT

TP45102A

## Function Generator 15 FEB 1995 1-2

I-E96-200B

Function Code 1

If the input value is between two X-axis points, the output will be determined by the equation:
( Yn Yn 1 ) Block Output = ( Y n 1 ) + ------------------------- ( X X n 1 ) ( Xn Xn 1 )

where:

X Xn Xn-1 Yn Yn-1
( Yn Yn 1 ) ------------------------( Xn Xn 1 )

= Present input value. = X-axis specification point just to the right of the present input value. = X-axis specification point just to the left of the present input value. = Y-axis coordinate that corresponds to Xn. = Y-axis coordinate that corresponds to Xn-1. = Slope of the particular graph segment between (Xn,Yn) and (Xn-1,Yn-1). This is the unit output change per unit input change. = Amount that the input is above the next lower specification point.

X Xn-1

For example, suppose the graph shown in Figure 1-1 is a graph of desired output values for input values. These values may represent any engineering units. First, the graph is divided into five sections as shown in Figure 1-2. The coordinates of the end points of these segments are then entered into the module. Suppose the input <S1> to the function block represented by Figure 1-2 is six units. This corresponds to point S4. Therefore, the output will be two units (S5). If the input is ten units (which corresponds to S6), the output will be five units and so on. If the input is between six units and ten units, for example seven units, the output is determined according to the function equation. The values for the equation become:

## Xinput Xn Xn-1 Yn Yn-1

=7 = S6 = 10 = S4 = 6 = S7 = 5 = S5 = 2

I-E96-200B

Function Code 1

## The equation becomes:

( S7 S5 ) ------Output = S5 + ------------- - ( 7 S4 ) ( S6 S4 ) 52 = 2 + ------------ ( 7 6 ) 10 6 = 2.75

## High and Low Limits

If the input <S1> goes higher than the S12 value, the output will remain at the S13 value for the high limit. If the input goes below the S2 value, the input will remain at the S3 value for the low limit.

APPLICATIONS
Five possible applications of function generators are illustrated in Figures 1-3, 1-4, 1-5, 1-6 and 1-7. Figures 1-6 and 1-7 illustrate the use of multiple function generators to achieve good resolution when representing a complex function.

## FLOW S1 OR DEMAND SIGNAL

F(X)

(1) N

S1 S2

(K)

(15) N

TRANSMITTER

TP45103A

Figure 1-3. Function Generator Used for Programming Set Point or Bias

GAIN = 1.0

(K)

(15) N

S1

F(X)

(1) N

TRANSMITTER
TP45104A

## Function Generator 15 FEB 1995 1-4

I-E96-200B

Function Code 1

SET POINT

S1 S2

(K)

(15) N

S1 S2

(16) N

TRANSMITTER

F(X)

(1) N
TP45105A

Figure 1-5. Function Generator Used to Obtain an Adaptive Gain for a Nonlinear Process

100 90 80 70 60 50 40 30 20 10 0 0 10 20 30 40 50 60 70 80 90 100

## S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S13

F(X) 1 S1

F(X) 2 (1) N S1 S2 S3 S4

## = BLOCK INPUT = 50 =0 = 60 = 30 = 70 = 50 = 80 = 50 = 90 = 40 = 100 = 70

F(X) 1

(14) N

INPUT

S1

F(X) 2

(1) N
TP45106B

Figure 1-6. Two Function Generators Used to Achieve Greater Curve Resolution

I-E96-200B

## Function Generator 15 FEB 1995 1-5

Function Code 1

100 90 80 70 60 50 40 30 20 10 0 0 10 20 30 40 50 60 70 80 90 100

SPECIFICATION SETTINGS
F(X) 1 S1 = BLOCK INPUT S2 = 0 S3 = 0 S4 = 5 S5 = 5 S6 = 10 S7 = 7 S8 = 15 S9 = 10 S10 = 20 S11 = 15 S12 = 25 S13 = 18 F(X) 2 S1 = BLOCK INPUT S2 = 25 S3 = 18 S4 = 30 S5 = 20 S6 = 35 S7 = 25 S8 = 40 S9 = 40 S10 = 45 S11 = 42 S12 = 50 S13 = 48 F(X) 3 S1 = BLOCK INPUT S2 = 50 S3 = 48 S4 = 55 S5 = 55 S6 = 60 S7 = 55 S8 = 65 S9 = 70 S10 = 70 S11 = 75 S12 = 75 S13 = 80 F(X) 4 S1 = BLOCK INPUT S2 = 75 S3 = 80 S4 = 80 S5 = 87 S6 = 85 S7 = 95 S8 = 90 S9 = 97 S10 = 95 S11 = 98 S12 = 100 S13 = 100

F(X) 1

F(X) 2

F(X) 3

F(X) 4

BLOCK INPUT

ANALOG N

S1

F(X) 1

(1) N

S1 S2 S3 S4

(10) N

S1

F(X) 2

(1) N

S1

F(X) 3

(1) N

S1

F(X) 4

(1) N
TP22011A

Figure 1-7. Four Function Generators Used to Achieve Greater Curve Resolution

I-E96-200B