"==================== S U B - P R O G R A M S =======================
ROUTINE01: "table of sensor 231 (taken as example)
B(1)=00000:F(1)=000033:CF(1)=4.666e-2:Q(1)=00.000
B(2)=00033:F(2)=000250:CF(2)=9.953e-3:Q(2)=01.211
B(3)=00250:F(3)=000820:CF(3)=5.438e-3:Q(3)=02.340
B(4)=00820:F(4)=002640:CF(4)=3.022e-3:Q(4)=04.322
B(5)=02640:F(5)=011776:CF(5)=1.893e-3:Q(5)=07.300
B(6)=11776:F(6)=143360:CF(6)=1.294e-3:Q(6)=14.360
return
ROUTINE02:
print "setting up of RS232 on COM1..."
open "COM1:1200,N,8,1,RS" AS #1
return
ROUTINE03:
print #1,chr$(34);
if p=0 then A$=input$(1,#1):p=1 "delete the first byte
A$=input$(3,#1) : A$=left$(A$,2) "delete 3 byte and keep the first two
A1A2% = asc(left$(A$,1)) : B1B2% = asc(right$(A$,1))
A1% = fix(A1A2%/16) : B1% = fix(B1B2%/16)
A2% = A1A2% - 16*A1% : B2% = B1B2% - 16*B1%
R=((B2%*256+A1%*16+A2%)*2^B1%)/80
gosub ROUTINE04
return
ROUTINE04:
K=-1
for I=6 to 1 step -1
if R >= B(I) then
end if
next I
LABEL01:
return
K=R*CF(I)+Q(I)
ptr = I
goto LABEL01
77