
LINEARIZER (Cont’d)
40 DIM DA(30)
50 INPUT “ENTER CURVE FITTING ERROR (%)> ”,E
60 P = 10000
70 GOSUB 10000
75 CR=D/P
80 ER=D*E*.01
110 CLS
111 SG=SG+1
112 PRINT “
CALCULATING LINEAR SEGMENT ”;SG
115 IF P2=10000 THEN A=1:GOTO 1000
117 P2=P2+10
130 P=P1
140 GOSUB 10000
150 D1=D
170 P=P2
180 GOSUB 10000
190 D2=D
210 M=(D2-D1)/(P2-P1)
220 B=D1-(P1*M)
240 PT=P1
245 AD=(P2-P1)/6
250 PT=PT+AD
260 P=PT
270 GOSUB 10000
280 DT=D
290 DT1=(PT*M)+B
310 IF ABS(DT1-DT)>ER THEN 500
320 IF PT<P2 THEN GOTO 250
330 GOTO 115
500 P2=P2+10
510 D2=(P2*M)+B
515 P=P2
520 GOSUB 10000
550 IF ABS(D-D2)<ER THEN 500
1000 PA(SG)=P2/100
1020 DA(SG)=D2/CR/100
1200 P1=P2
1210 D1=D2
1216 IF A1 < >THEN GOTO 110
2000 CLS
2010 PRINT “NUMBER OF LINEAR SEGMENTS = ”;SG
2012 PRINT “CURVE FITTING ERROR (%) = ”;E
2015 PRINT “”
2016 PRINT “DISPLAY VALUES
PROCESS VALUES”
2017 PRINT “(% OF RANGE)
”;“(%) OF RANGE”
2018 PRINT “”
2019 FOR I=0 TO SG
2020 PRINT USING “###.##”;DA(I);
2022 PRINT “
”;
2025 PRINT USING “###.##”;PA(I)
2030 NEXT I
2040 END
10000 REM D=DISPLAY(Y), P=PROCESS(X)
10010 D= SQR(P)
10020 RETURN
PEAK/VALLEY
The indicator will record the lowest reading
(valley)
and the highest reading
(peak)
, automatically, for later recall. This information is valuable in monitoring
the limits of the process over any length of time since these values are stored at
power-down to span over shifts, days, etc. An external input can be programmed
to reset or engage the unit into a peak/valley reading indicator. Additionally, the
peak and valley can be viewed and reset from the front panel, if so programmed.
Note: The peak/valley measurement is not instantaneous, and is based on a
nominal 2 sec. response time.
TARE
The re-zero
(tare)
function can also be controlled externally or by the front
panel. This feature can quickly compensate for small shifts or drifts in the input
signal, by re-zeroing the input display. If the display error is greater than 10% of
span due to transducer drift, it is recommended to rescale the unit with
“Pro 1”
or
“Pro 2”
, rather than re-zero the input. The tare buffer can be cleared by
“walking”
through
“Pro 2”
, using the
“P”
button.
-24-