Download system setup - Sutron Corporation
Transcript
10
10 ' Canadian bilingual speech program - 8200 Tiny Basic
20 ' March 10, 1992, Sutron Corporation
30 '
100 ' Calculate Mins & Maxs should be run after each log
105 If #Hours=0 Then #Hours=12 ' Default # hours to go back when ting
106 If #Interval=0 Then #Interval=15 ' Default # minutes between log
107 If #Chart=0 Then #Chart=100.0 ' Default chart datum value
110 P = InAlarm(H, Stage) Or InAlarm(L, Stage) Or InAlarm(R, Stage)
120 If P Then Stop ' Detected a problem with the stage
130 N=1000 : X=-1000 ' Initialize min & max
140 For T=Time-#Hours*3600 To Time Step #Interval*60
150 R=ReadLog(T, Stage) : If Err Or Null Then Goto 180
160 If R>X Then X=R : ' If Reading > Max then Max = Reading
170 If R<N Then N=R ' If Reading > Min then Min = Reading
180 Next T
190 If N=1000 Or X=-1000 Then P=1 ' Found a problem
200 #Min=N : #Max=X
210 Stop
300 ' Subroutine to output the value in English
310 Print ":42:95" ' [Canadian Hydrographic] [Water level announcing
320 Print ",,:91:94:60:58" ' [The] [water] [level] [is]
330 Print S!1!2 ' Output current stage to 2 decimal points
340 Print ":66" ' [meters]
350 Print ",,:33:65:74" ' [a] [maximum] [of]
360 Print #Max!1!2 ' Output max reading to 2 decimal points
370 Print ":66:37:33:68:74" ' [meters] [and] [a] [minimum] [of]
380 Print #Min!1!2 ' Output min reading to 2 decimal points
390 Print ":66:84:45" ' [meters] [were recorded] [during the last]
400 Print #Hours!1!0 ' Output number of hours average is over
410 Print ":54,,:93:94:60:39" ' [hours] [these] [water] [levels] [are]
420 Print ":85:81:44," ' [relative to] [presently adopted] [chart datum]
430 Print ":97:58" ' [which] [is]
440 Print #Chart!1!2 ' Output chart datum value
450 Print ":66:34:55 19 55" ' [meters] [above] [IGLD] [19] [55]
460 Return
500 ' Subroutine to output the value in French
505 Print "(" ' Switch to french
510 Print ":42:95" ' [Canadian Hydrographic] [Water level announcing
520 Print ",,:91:60:80:94:58" ' [The] [level] [present] [water] [is]
530 Print S!1!2 ' Output current stage to 2 decimal points
540 Print ":66" ' [meters]
550 Print ",,:45 24 :54:91:60:65:84" '[dur last] 24 [hours] [the] [maximum]
[was recorded]
560 Print #Max!1!2 ' Output max reading to 2 decimal points
570 Print ":66:37:33:68" ' [meters] [and] [a] [minimum]
580 Print #Min!1!2 ' Output min reading to 2 decimal points
610 Print ":66,,:93:60:39" ' [these] [levels] [are]
620 Print ":85:91:44:81" ' [relative to][the] [presently adopted] [chart
630 Print ":97" ' [which is]
640 Print #Chart!1!2 ' Output chart datum value
650 Print ":66:34:55:83 55" ' [meters] [above] [IGLD] [mille neuf cent]
655 Print ")" ' Switch back to English
660 Return
1000 ' Speak [Hello] [press 1 for English] [poussez 2 pour Francais] you]
1010 Print ":52:82(:82)" : SetTimeout 3 : K=Input : SetTimeout 60 : :90"
1020 If K="1" Then L=1 : Z=2 : Stop ' Use English, answer voice
1030 If K="2" Then L=2 : Z=2 : Stop ' Use French, answer voice
1040 If K="7" Then L=0 : Z=1 : Stop ' Anwer in data mode
1050 L=3 : Z=2 : Stop ' Use English and then French, answer voice
1200 ' Routine executed to handle dial in with voice
1210 S=Measure(Stage) ' Measure current stage
1220 If P Then Z=0 : Stop ' If problem then use default message
1230 If L=1 or L=3 Then Gosub 300 ' Speak English message
1240 If L=2 or L=3 Then Gosub 500 ' Speak French message
1250 If Key Then K=Input : If (K <> "0") And (K <> 27) Then Goto 1210
1260 Z=1 : Stop
1400 ' Routine executed to handle dial in data
1410 Z=0 : Stop ' Use default method
1600 ' Routine executed to handle dial out voice
1610 Z=0 : Stop ' Use default method
1800 ' Routine executed to handle dial out data
1810 Z=0 : Stop ' Use default method
60000 Goto 1000 ' Branch to answer phone routine
60001 Goto 1200 ' Branch to voice dial in message
60002 Goto 1400 ' Branch to data dial in message
60003 Goto 1600 ' Branch to voice dial out message
10-10