VERSION 5.00 Begin VB.Form Form0 Appearance = 0 'Flat BackColor = &H80000005& BorderStyle = 3 'Fixed Dialog Caption = "Choose the Data Directory for a Particular microMETER Unit" ClientHeight = 4020 ClientLeft = 1305 ClientTop = 1485 ClientWidth = 7155 BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000008& LinkTopic = "Form2" MaxButton = 0 'False MinButton = 0 'False MousePointer = 1 'Arrow PaletteMode = 1 'UseZOrder ScaleHeight = 4020 ScaleWidth = 7155 Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 375 Left = 2400 TabIndex = 10 Text = "0" Top = 2880 Width = 375 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 375 Left = 4440 TabIndex = 7 Text = "ATDT 9,999 9999" Top = 3480 Width = 2295 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 375 Left = 2400 TabIndex = 6 Text = "0" Top = 3480 Width = 375 End Begin VB.DirListBox Dir1 Appearance = 0 'Flat Height = 2055 Left = 1800 TabIndex = 3 Top = 600 Width = 1815 End Begin VB.DriveListBox Drive1 Appearance = 0 'Flat Height = 315 Left = 360 TabIndex = 2 Top = 600 Width = 1215 End Begin VB.CommandButton Command2 Appearance = 0 'Flat Caption = "Cancel" Height = 495 Left = 4680 TabIndex = 1 Top = 1320 Width = 1215 End Begin VB.CommandButton Command1 Appearance = 0 'Flat Caption = "OK" Height = 495 Left = 4680 TabIndex = 0 Top = 600 Width = 1215 End Begin VB.Label Label4 Appearance = 0 'Flat BackColor = &H80000005& Caption = "Select COM port (default in setup)" ForeColor = &H80000008& Height = 375 Left = 360 TabIndex = 9 Top = 2880 Width = 1935 WordWrap = -1 'True End Begin VB.Label Label3 Appearance = 0 'Flat BackColor = &H80000005& Caption = "Dial:" ForeColor = &H80000008& Height = 375 Left = 3960 TabIndex = 8 Top = 3480 Width = 495 End Begin VB.Label Label2 Appearance = 0 'Flat BackColor = &H80000005& Caption = "Select Unit 0-F (hex)" ForeColor = &H80000008& Height = 375 Left = 360 TabIndex = 5 Top = 3480 Width = 1935 End Begin VB.Label Label1 Appearance = 0 'Flat BackColor = &H80000005& Caption = "Default c:\micromtr\mm01 " ForeColor = &H80000008& Height = 255 Left = 4080 TabIndex = 4 Top = 2160 Width = 2295 End End Attribute VB_Name = "Form0" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub command1_click() file1FileName = "" If (Right$(Dir1.Path, 1) = "\") Then filename$ = Dir1.Path + file1FileName Else filename$ = Dir1.Path + "\" + file1FileName End If Form0.Hide End Sub Private Sub Command2_Click() Form0.Hide End Sub Private Sub Dir1_Change() file1Path = Dir1.Path End Sub Private Sub Drive1_Change() Dir1.Path = Drive1.Drive End Sub Private Sub File1_DblClick() command1_click End Sub VERSION 5.00 Begin VB.Form Form1 Appearance = 0 'Flat BackColor = &H00C0C0C0& Caption = "microMETER 32" ClientHeight = 5355 ClientLeft = 645 ClientTop = 1305 ClientWidth = 8085 BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000008& Icon = "FORM1.frx":0000 LinkTopic = "Form1" PaletteMode = 1 'UseZOrder ScaleHeight = 5355 ScaleWidth = 8085 Begin VB.TextBox Text10 Appearance = 0 'Flat BackColor = &H00C0C0C0& BorderStyle = 0 'None Height = 195 Left = 3120 TabIndex = 111 Text = "kwh" Top = 480 Width = 975 End Begin VB.TextBox Text9 Appearance = 0 'Flat BackColor = &H00C0C0C0& BorderStyle = 0 'None Height = 195 Left = 2280 TabIndex = 110 Text = "amps" Top = 480 Width = 615 End Begin VB.PictureBox Comm1 Appearance = 0 'Flat BackColor = &H80000005& ForeColor = &H80000008& Height = 480 Left = 7200 ScaleHeight = 450 ScaleWidth = 1170 TabIndex = 115 Top = 4560 Width = 1200 End Begin VB.TextBox Text8 Appearance = 0 'Flat Height = 285 Left = 6840 TabIndex = 101 TabStop = 0 'False Top = 5010 Width = 1215 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Left = 3000 TabIndex = 100 Top = 5010 Width = 1215 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 16 Left = 1920 TabIndex = 98 TabStop = 0 'False Top = 4680 Width = 975 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 16 Left = 3000 TabIndex = 97 TabStop = 0 'False Top = 4680 Width = 1215 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 16 Left = 4320 TabIndex = 96 TabStop = 0 'False Top = 4680 Width = 1215 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 15 Left = 120 TabIndex = 95 Top = 4320 Width = 2055 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 15 Left = 2280 TabIndex = 94 TabStop = 0 'False Top = 4320 Width = 735 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 15 Left = 3120 TabIndex = 93 TabStop = 0 'False Top = 4320 Width = 975 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 15 Left = 4200 TabIndex = 92 TabStop = 0 'False Top = 4320 Width = 975 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 15 Left = 5280 TabIndex = 91 TabStop = 0 'False Top = 4320 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 15 Left = 5880 TabIndex = 90 TabStop = 0 'False Top = 4320 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 14 Left = 120 TabIndex = 89 Top = 4080 Width = 2055 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 14 Left = 2280 TabIndex = 88 TabStop = 0 'False Top = 4080 Width = 735 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 14 Left = 3120 TabIndex = 87 TabStop = 0 'False Top = 4080 Width = 975 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 14 Left = 4200 TabIndex = 86 TabStop = 0 'False Top = 4080 Width = 975 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 14 Left = 5280 TabIndex = 85 TabStop = 0 'False Top = 4080 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 14 Left = 5880 TabIndex = 84 TabStop = 0 'False Top = 4080 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 13 Left = 120 TabIndex = 83 Top = 3840 Width = 2055 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 13 Left = 2280 TabIndex = 82 TabStop = 0 'False Top = 3840 Width = 735 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 13 Left = 3120 TabIndex = 81 TabStop = 0 'False Top = 3840 Width = 975 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 13 Left = 4200 TabIndex = 80 TabStop = 0 'False Top = 3840 Width = 975 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 13 Left = 5280 TabIndex = 79 TabStop = 0 'False Top = 3840 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 13 Left = 5880 TabIndex = 78 TabStop = 0 'False Top = 3840 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 12 Left = 120 TabIndex = 77 Top = 3600 Width = 2055 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 12 Left = 2280 TabIndex = 76 TabStop = 0 'False Top = 3600 Width = 735 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 12 Left = 3120 TabIndex = 75 TabStop = 0 'False Top = 3600 Width = 975 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 12 Left = 4200 TabIndex = 74 TabStop = 0 'False Top = 3600 Width = 975 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 12 Left = 5280 TabIndex = 73 TabStop = 0 'False Top = 3600 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 12 Left = 5880 TabIndex = 72 TabStop = 0 'False Top = 3600 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 11 Left = 120 TabIndex = 71 Top = 3360 Width = 2055 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 11 Left = 2280 TabIndex = 70 TabStop = 0 'False Top = 3360 Width = 735 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 11 Left = 3120 TabIndex = 69 TabStop = 0 'False Top = 3360 Width = 975 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 11 Left = 4200 TabIndex = 68 TabStop = 0 'False Top = 3360 Width = 975 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 11 Left = 5280 TabIndex = 67 TabStop = 0 'False Top = 3360 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 11 Left = 5880 TabIndex = 66 TabStop = 0 'False Top = 3360 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 10 Left = 120 TabIndex = 65 Top = 3120 Width = 2055 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 10 Left = 2280 TabIndex = 64 TabStop = 0 'False Top = 3120 Width = 735 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 10 Left = 3120 TabIndex = 63 TabStop = 0 'False Top = 3120 Width = 975 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 10 Left = 4200 TabIndex = 62 TabStop = 0 'False Top = 3120 Width = 975 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 10 Left = 5280 TabIndex = 61 TabStop = 0 'False Top = 3120 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 10 Left = 5880 TabIndex = 60 TabStop = 0 'False Top = 3120 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 9 Left = 120 TabIndex = 59 Top = 2880 Width = 2055 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 9 Left = 2280 TabIndex = 58 TabStop = 0 'False Top = 2880 Width = 735 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 9 Left = 3120 TabIndex = 57 TabStop = 0 'False Top = 2880 Width = 975 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 9 Left = 4200 TabIndex = 56 TabStop = 0 'False Top = 2880 Width = 975 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 9 Left = 5280 TabIndex = 55 TabStop = 0 'False Top = 2880 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 9 Left = 5880 TabIndex = 54 TabStop = 0 'False Top = 2880 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 8 Left = 120 TabIndex = 53 Top = 2640 Width = 2055 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 8 Left = 2280 TabIndex = 52 TabStop = 0 'False Top = 2640 Width = 735 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 8 Left = 3120 TabIndex = 51 TabStop = 0 'False Top = 2640 Width = 975 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 8 Left = 4200 TabIndex = 50 TabStop = 0 'False Top = 2640 Width = 975 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 8 Left = 5280 TabIndex = 49 TabStop = 0 'False Top = 2640 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 8 Left = 5880 TabIndex = 48 TabStop = 0 'False Top = 2640 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 7 Left = 120 TabIndex = 47 Top = 2400 Width = 2055 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 7 Left = 2280 TabIndex = 46 TabStop = 0 'False Top = 2400 Width = 735 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 7 Left = 3120 TabIndex = 45 TabStop = 0 'False Top = 2400 Width = 975 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 7 Left = 4200 TabIndex = 44 TabStop = 0 'False Top = 2400 Width = 975 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 7 Left = 5280 TabIndex = 43 TabStop = 0 'False Top = 2400 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 7 Left = 5880 TabIndex = 42 TabStop = 0 'False Top = 2400 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 6 Left = 120 TabIndex = 41 Top = 2160 Width = 2055 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 6 Left = 2280 TabIndex = 40 TabStop = 0 'False Top = 2160 Width = 735 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 6 Left = 3120 TabIndex = 39 TabStop = 0 'False Top = 2160 Width = 975 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 6 Left = 4200 TabIndex = 38 TabStop = 0 'False Top = 2160 Width = 975 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 6 Left = 5280 TabIndex = 37 TabStop = 0 'False Top = 2160 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 6 Left = 5880 TabIndex = 36 TabStop = 0 'False Top = 2160 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 5 Left = 120 TabIndex = 35 Top = 1920 Width = 2055 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 5 Left = 2280 TabIndex = 34 TabStop = 0 'False Top = 1920 Width = 735 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 5 Left = 3120 TabIndex = 33 TabStop = 0 'False Top = 1920 Width = 975 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 5 Left = 4200 TabIndex = 32 TabStop = 0 'False Top = 1920 Width = 975 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 5 Left = 5280 TabIndex = 31 TabStop = 0 'False Top = 1920 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 5 Left = 5880 TabIndex = 30 TabStop = 0 'False Top = 1920 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 4 Left = 120 TabIndex = 29 Top = 1680 Width = 2055 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 4 Left = 2280 TabIndex = 28 TabStop = 0 'False Top = 1680 Width = 735 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 4 Left = 3120 TabIndex = 27 TabStop = 0 'False Top = 1680 Width = 975 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 4 Left = 4200 TabIndex = 26 TabStop = 0 'False Top = 1680 Width = 975 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 4 Left = 5280 TabIndex = 25 TabStop = 0 'False Top = 1680 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 4 Left = 5880 TabIndex = 24 TabStop = 0 'False Top = 1680 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 3 Left = 120 TabIndex = 23 Top = 1440 Width = 2055 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 3 Left = 2280 TabIndex = 22 TabStop = 0 'False Top = 1440 Width = 735 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 3 Left = 3120 TabIndex = 21 TabStop = 0 'False Top = 1440 Width = 975 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 3 Left = 4200 TabIndex = 20 TabStop = 0 'False Top = 1440 Width = 975 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 3 Left = 5280 TabIndex = 19 TabStop = 0 'False Top = 1440 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 3 Left = 5880 TabIndex = 18 TabStop = 0 'False Top = 1440 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 2 Left = 120 TabIndex = 17 Top = 1200 Width = 2055 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 2 Left = 2280 TabIndex = 16 TabStop = 0 'False Top = 1200 Width = 735 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 2 Left = 3120 TabIndex = 15 TabStop = 0 'False Top = 1200 Width = 975 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 2 Left = 4200 TabIndex = 14 TabStop = 0 'False Top = 1200 Width = 975 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 2 Left = 5280 TabIndex = 13 TabStop = 0 'False Top = 1200 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 2 Left = 5880 TabIndex = 12 TabStop = 0 'False Top = 1200 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 1 Left = 120 TabIndex = 11 Top = 960 Width = 2055 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 1 Left = 2280 TabIndex = 10 TabStop = 0 'False Top = 960 Width = 735 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 1 Left = 3120 TabIndex = 9 TabStop = 0 'False Top = 960 Width = 975 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 1 Left = 4200 TabIndex = 8 TabStop = 0 'False Top = 960 Width = 975 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 1 Left = 5280 TabIndex = 7 TabStop = 0 'False Top = 960 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 1 Left = 5880 TabIndex = 6 TabStop = 0 'False Top = 960 Width = 2175 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 0 Left = 5880 TabIndex = 5 TabStop = 0 'False Top = 720 Width = 2175 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat Height = 285 Index = 0 Left = 5280 TabIndex = 4 TabStop = 0 'False Top = 720 Width = 495 End Begin VB.TextBox Text4 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 0 Left = 4200 TabIndex = 3 TabStop = 0 'False Top = 720 Width = 975 End Begin VB.TextBox Text3 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 0 Left = 3120 TabIndex = 2 TabStop = 0 'False Top = 720 Width = 975 End Begin VB.TextBox Text2 Alignment = 1 'Right Justify Appearance = 0 'Flat Height = 285 Index = 0 Left = 2280 TabIndex = 1 TabStop = 0 'False Top = 720 Width = 735 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 0 Left = 120 TabIndex = 0 Text = "r <-- selective resets " Top = 720 Width = 2055 End Begin VB.Label Label14 Appearance = 0 'Flat BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "reset on / prev,curr " ForeColor = &H80000008& Height = 255 Left = 5880 TabIndex = 114 Top = 480 Width = 2175 End Begin VB.Label Label13 Appearance = 0 'Flat BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "%" ForeColor = &H80000008& Height = 255 Left = 5280 TabIndex = 113 Top = 480 Width = 495 End Begin VB.Label Label12 Appearance = 0 'Flat BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "amount" ForeColor = &H80000008& Height = 255 Left = 4200 TabIndex = 112 Top = 480 Width = 975 End Begin VB.Label Label9 Appearance = 0 'Flat BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "# circuit name" ForeColor = &H80000008& Height = 255 Left = 120 TabIndex = 109 Top = 480 Width = 2175 End Begin VB.Label Label8 Appearance = 0 'Flat BackColor = &H00C0C0C0& Caption = "mM" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty ForeColor = &H00808080& Height = 360 Left = 1440 TabIndex = 108 Top = 4980 Width = 1455 End Begin VB.Label Label7 Appearance = 0 'Flat BackColor = &H00C00000& Caption = " " ForeColor = &H80000008& Height = 255 Left = 6075 TabIndex = 107 Top = 5040 Width = 60 End Begin VB.Label Label6 Appearance = 0 'Flat BackColor = &H000080FF& Caption = " " ForeColor = &H80000008& Height = 255 Left = 5700 TabIndex = 106 Top = 5040 Width = 90 End Begin VB.Label Label5 Appearance = 0 'Flat BackColor = &H000000FF& ForeColor = &H80000008& Height = 255 Left = 1320 TabIndex = 105 Top = 5040 Width = 90 End Begin VB.Label Label4 Appearance = 0 'Flat BackColor = &H80000005& Caption = " v1.14win32" BeginProperty Font Name = "Arial" Size = 9 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C00000& Height = 255 Left = 120 TabIndex = 104 Top = 5040 Width = 1215 End Begin VB.Label Label3 Appearance = 0 'Flat BackColor = &H0080FFFF& Caption = "<<-reconcile to" ForeColor = &H80000008& Height = 255 Left = 4320 TabIndex = 103 Top = 5040 Width = 1400 End Begin VB.Label Label2 Appearance = 0 'Flat BackColor = &H00C0C000& Caption = "Scale2:" ForeColor = &H80000008& Height = 255 Left = 6120 TabIndex = 102 Top = 5040 Width = 735 End Begin VB.Label Label1 Appearance = 0 'Flat BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "Totals:" ForeColor = &H80000008& Height = 255 Left = 240 TabIndex = 99 Top = 4680 Width = 1335 End Begin VB.Menu mn1 Caption = "&File" Begin VB.Menu mn11 Caption = "&Unit and Directory" End Begin VB.Menu mn14 Caption = "&Dial Modem" Enabled = 0 'False End Begin VB.Menu mn12 Caption = "&Capture" Enabled = 0 'False End Begin VB.Menu mn16 Caption = "&24 Hour Demand" Enabled = 0 'False End Begin VB.Menu mn15 Caption = "&Hang Up Modem" Enabled = 0 'False End Begin VB.Menu mn13 Caption = "&Exit" End End Begin VB.Menu mn4 Caption = "&Display" Begin VB.Menu mn41 Caption = "&KWH" End Begin VB.Menu mn42 Caption = "&Alternate Display Select" End Begin VB.Menu mn43 Caption = "&Reconcile To" End Begin VB.Menu mn44 Caption = "&Temperatures" Enabled = 0 'False End End Begin VB.Menu mn2 Caption = "&Setup" Begin VB.Menu mn21 Caption = "&CT's" End Begin VB.Menu mn22 Caption = "µMETER" End End Begin VB.Menu mn3 Caption = "&Reset" Begin VB.Menu mn31 Caption = "&Selective (r)" End Begin VB.Menu mn32 Caption = "&All" End Begin VB.Menu mn34 Caption = "&Print Bills" End Begin VB.Menu mn33 Caption = "&Unreset All" End End Begin VB.Menu mn9 Caption = "&About" End Begin VB.Menu mn5 Caption = "&Help" Begin VB.Menu mn51 Caption = "Readme" End Begin VB.Menu mn52 Caption = "Readme2" End End Begin VB.Menu mn7 Caption = "&24 Hour Demand" Begin VB.Menu mn71 Caption = "&Process New Demand Data" End Begin VB.Menu mn72 Caption = "&View Processed Demand Data" End Begin VB.Menu mn78 Caption = "&Instantaneous Select" End Begin VB.Menu mn73 Caption = "&15 Minute Interval Select" End Begin VB.Menu mn74 Caption = "&30 Minute Interval Select" End Begin VB.Menu mn75 Caption = "&60 Minute Interval Select" End Begin VB.Menu mn76 Caption = "Process &Interval Demand" End End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub Comm1_InQueue(Queued As Integer) S$ = Comm1_DataStr If S$ = "," And CS = -1 Then CS = 1 If S$ = Chr$(10) And CS = 1 Then ii = ii + 1: Print #3, Time$ + " " + Date$ If S$ = Chr$(10) And CS = 1 Then GoSub CS50 'If S$ = Chr$(13) And CS = 1 And Len(SS$) > 8 Then SS$ = "" If ii > 1 Then Print #2, S$;: Print S$;: SS$ = SS$ + S$ If ii < 18 And CAP24 = -1 Then GoTo CS100 If ii < 8642 And CAP24 = 1 Then GoTo CS100 CS = 0: ii = 0 'Comm1.Enable = 0 Beep: Beep: Beep: Beep: Beep: Beep If CAP24 = -1 Then Print "Done - Please click DISPLAY." If CAP24 = 1 Then Print "Done - Please click 24 HOUR DEMAND." GoTo CS100 CS50: If Len(SS$) < 9 Then GoTo CS55 Open filename$ + "TEMP" For Output As #4 Print #4, SS$ Close #4 Open filename$ + "TEMP" For Input As #4 Input #4, A, B: ',C, D If B < Val(Mid$(re2$(A), 41, 3)) Then Beep: Beep If B > Val(Mid$(re2$(A), 45, 3)) Then Beep: Beep: Beep: Beep: Beep Close #4 SS$ = "" Cls CS55: Return CS100: End Sub Private Sub Form_Load() If filename$ = "" Then filename$ = "c:\micromtr\mm01\" SW = 1 CAP24 = -1 End Sub Private Sub mn11_Click() Form0.Show End Sub Private Sub mn12_Click() Cls If CAP24 = -1 Then Print "Please wait for 3 minutes ... beeps when complete." If CAP24 = 1 Then Print "Please minimize this window until tomorrow at this time." If CAP24 = 1 Then Print "You must then do a normal 3-minute capture to update DISPLAY." CS = -1: ii = 0 N = 16: CP = 1: SEL$ = "" file$ = filename$ + "MICRO.DAT" If CAP24 = -1 Then fil2$ = filename$ + "CT.CAP": fil3$ = filename$ + "MICRO2.CAP" If CAP24 = 1 Then fil2$ = filename$ + "USAGE.CAP": fil3$ = filename$ + "USAGE.DTE" fil4$ = filename$ + "XX.CAP" fil5$ = filename$ + "CT.DAT" Close Open file$ For Input As #1 Input #1, SCAL Input #1, SCA2 Input #1, PRICE Input #1, CP If Form0.Text3 <> 0 Then CP = Form0.Text3 Close Open fil5$ For Input As #1 For i = 1 To 16 Line Input #1, re2$(i) If Mid$(re2$(i), 27, 1) = "," Then Mid$(re2$(i), 27, 1) = "0" If Mid$(re2$(i), 37, 3) = " " Then Mid$(re2$(i), 36, 4) = ",120" If Mid$(re2$(i), 41, 3) = " " Then Mid$(re2$(i), 40, 4) = ",000" If Mid$(re2$(i), 45, 3) = " " Then Mid$(re2$(i), 44, 4) = ",999" Next i Close Open fil2$ For Output As #2 Open fil3$ For Output As #3 If CP < 5 Then GoTo S209: Open fil4$ For Input As #1 For i = 1 To 16 Line Input #1, xx$ Print xx$ Print #2, xx$; Print #3, Time$ + " " + Date$ Next i Beep: Beep GoTo S210 S209: CP1 = CP - 1 ii = 0 If Comm1_Enable <> 0 Then GoTo S210 Comm1_Comport = CP1 Comm1_Enable = 1 Comm1_DataStr = Form0.Text1 S210: End Sub Private Sub mn13_Click() End End Sub Private Sub mn14_Click() Cls Print "Please watch for connection. Click CAPTURE when online." N = 16: CP = 1: SEL$ = "" CS = 0: ii = 0 file$ = filename$ + "MICRO.DAT" Close Open file$ For Input As #1 Input #1, SCAL Input #1, SCA2 Input #1, PRICE Input #1, CP If Form0.Text3 <> 0 Then CP = Form0.Text3 If CP > 4 Then CP = 4 Close CP1 = CP - 1 If Comm1_Enable <> 0 Then GoTo M210 Comm1_Comport = CP1 Comm1_Enable = 1 M210: 'Comm1.DataStr = "ATE0 S7=60 S11=55 V1 X1 S0=0" + Chr$(13) + Chr$(10) Comm1_DataStr = Form0.Text2 + Chr$(13) + Chr$(10) End Sub Private Sub mn15_Click() T1 = Val(Mid$(Time$, 7, 2)) Comm1_DataStr = "+++" tloop: T2 = Val(Mid$(Time$, 7, 2)) d2 = T2 - T1 If d2 < 0 Then d2 = -d2 If d2 < 5 Then GoTo tloop Comm1_DataStr = "ATH" + Chr$(13) + Chr$(10) End Sub Private Sub mn16_Click() CAP24 = CAP24 * -1 If CAP24 = 1 Then Cls: Print "24 hour demand capture enabled." If CAP24 = -1 Then Cls: Print "Normal 3-minute capture enabled" Print "Proceed with capture or toggle this setting." End Sub Private Sub mn21_Click() 'SETUP CT Unload Form1 Open filename$ + "ct.dat" For Input As #1 For i = 1 To 16 Line Input #1, rec$ re2$(i) = rec$ If Mid$(re2$(i), 27, 1) = "," Then Mid$(re2$(i), 27, 1) = "0" If Mid$(re2$(i), 36, 4) = " " Then Mid$(re2$(i), 36, 4) = ",120" If Mid$(re2$(i), 40, 4) = " " Then Mid$(re2$(i), 40, 4) = ",000" If Mid$(re2$(i), 44, 4) = " " Then Mid$(re2$(i), 44, 4) = ",999" j = i - 1 Form2.Text1(j) = Mid$(re2$(i), 1, 5) Form2.Text2(j) = Mid$(re2$(i), 7, 19) Form2.Text3(j) = Mid$(re2$(i), 27, 4) Form2.Text4(j) = Mid$(re2$(i), 32, 4) Form2.Text5(j) = Mid$(re2$(i), 37, 3) Form2.Text6(j) = Mid$(re2$(i), 41, 3) Form2.Text7(j) = Mid$(re2$(i), 45, 3) Next i Close Form2.Show End Sub Private Sub mn22_Click() 'SETUP GLOBAL Open filename$ + "micro.dat" For Input As #1 For i = 1 To 7 Line Input #1, rec$ re3$(i) = rec$ Next i Form4.Text1(0) = Mid$(re3$(1), 2, 9) Form4.Text1(1) = Mid$(re3$(2), 2, 9) Form4.Text1(2) = Mid$(re3$(3), 2, 9) Form4.Text1(3) = Mid$(re3$(4), 2, 9) Close Unload Form1 Form4.Show End Sub Private Sub mn31_Click() 'RESET selected file$ = filename$ + "MICRO.DAT" fil2$ = filename$ + "CT.DAT" fil3$ = filename$ + "CT.CAP" fil4$ = filename$ + "CT.RES" fil5$ = filename$ + "CT.DTE" fil6$ = filename$ + "CT.BIL" fil7$ = filename$ + "CT.BI2" fil8$ = filename$ + "MICRO2.CAP" Cls Static A(16), B(16), C(16), D(16), E(16), F(16), G(16), H(16) Static T$(16), TA(4), TB(16), BK(16), pf(16), lv(16), DTE$(16) Static AA(16), BB(16), EE(16), DTC$(16) Close Open fil6$ For Output As #2 GoSub S560 GoSub S490 GoSub S320 Close Open fil6$ For Append As #2 Open fil7$ For Append As #4 GoSub S260 GoSub S670 GoTo S998 S260: For i = 1 To 16 k = i - 1 ii = i If Left(Form1.Text1(k), 1) <> "r" Then GoTo S310 'single resets GoSub S870 AA(ii) = A(i) BB(ii) = B(i) EE(ii) = E(i) DTE$(ii) = DTC$(ii): 'Time$ + " " + Date$ S310: Next i Return S320: 'get kwh - unordered files Close Open fil3$ For Input As #2 Open fil4$ For Input As #3 Open fil8$ For Input As #4 For i = 1 To 16 Input #2, j, A(j), B(j), E(j) Input #3, k, AA(k), BB(k), EE(k) Input #4, DTC$(j) Next i For i = 1 To 16 BTMP = B(i) - BB(i) ETMP = E(i) - EE(i) F(i) = BTMP + ETMP * 65536! G(i) = (F(i) / SCA2 * BK(i) / 20 * pf(i) * lv(i) / 120): 'Scale to kwh C(i) = PRICE * G(i) / 100 Next i Return S490: 'load1 - global Close Open file$ For Input As #1 Input #1, SCAL Input #1, SCA2 Input #1, PRICE If SC3 > 0 Then SCA2 = SC3 Return S560: 'load2 - ordered files Close Open fil2$ For Input As #1 Open fil5$ For Input As #2 For i = 1 To 16 Line Input #1, T$(i) BK(i) = Val(Mid$(T$(i), 27, 4)) pf(i) = Val(Mid$(T$(i), 32, 4)) lv(i) = Val(Mid$(T$(i), 37, 3)) If lv(i) = 0 Then lv(i) = 120 Line Input #2, DTE$(i) Next i Return S670: 'put out reset file Close Open fil4$ For Output As #2 Open fil5$ For Output As #3 For i = 1 To 16 Print #2, i; ","; AA(i); ","; BB(i); ","; EE(i) Print #3, DTE$(i) Next i Return S870: 'put out bill PL1$ = Mid$(T$(i), 1, 25) + " " + Mid$(DTE$(i), 10, 10) + " to " + Mid$(DTC$(i), 10, 10) + " " PL2$ = Format$(G(i), "000000") PL3$ = " kwh $" PL4$ = Format$(C(i), "000000.00") If Mid$(PL2$, 1, 5) = "00000" Then Mid$(PL2$, 1, 5) = " " If Mid$(PL2$, 1, 4) = "0000" Then Mid$(PL2$, 1, 4) = " " If Mid$(PL2$, 1, 3) = "000" Then Mid$(PL2$, 1, 3) = " " If Mid$(PL2$, 1, 2) = "00" Then Mid$(PL2$, 1, 2) = " " If Mid$(PL2$, 1, 1) = "0" Then Mid$(PL2$, 1, 1) = " " If Mid$(PL4$, 1, 5) = "00000" Then Mid$(PL4$, 1, 5) = " " If Mid$(PL4$, 1, 4) = "0000" Then Mid$(PL4$, 1, 4) = " " If Mid$(PL4$, 1, 3) = "000" Then Mid$(PL4$, 1, 3) = " " If Mid$(PL4$, 1, 2) = "00" Then Mid$(PL4$, 1, 2) = " " If Mid$(PL4$, 1, 1) = "0" Then Mid$(PL4$, 1, 1) = " " Print #2, PL1$ + PL2$ + PL3$ + PL4$ Print #4, PL1$ + PL2$ + PL3$ + PL4$ Return S998: End Sub Private Sub mn32_Click() 'RESET all file$ = filename$ + "MICRO.DAT" fil2$ = filename$ + "CT.DAT" fil3$ = filename$ + "CT.CAP" fil4$ = filename$ + "CT.RES" fil5$ = filename$ + "CT.DTE" fil6$ = filename$ + "CT.BIL" fil7$ = filename$ + "CT.BI2" fil8$ = filename$ + "MICRO2.CAP" Cls Static A(16), B(16), C(16), D(16), E(16), F(16), G(16), H(16) Static T$(16), TA(4), TB(16), BK(16), pf(16), lv(16), DTE$(16) Static AA(16), BB(16), EE(16), DTC$(16) Close Open fil6$ For Output As #2 GoSub T560 GoSub T490 GoSub T320 Close Open fil6$ For Append As #2 Open fil7$ For Append As #4 GoSub T760 GoSub T670 GoTo T999 T320: 'get kwh - unordered files Close Open fil3$ For Input As #2 Open fil4$ For Input As #3 Open fil8$ For Input As #4 For i = 1 To 16 Input #2, j, A(j), B(j), E(j) Input #3, k, AA(k), BB(k), EE(k) Input #4, DTC(j) Next i For i = 1 To 16 BTMP = B(i) - BB(i) ETMP = E(i) - EE(i) F(i) = BTMP + ETMP * 65536! G(i) = (F(i) / SCA2 * BK(i) / 20 * pf(i) * lv(i) / 120): 'Scale to kwh C(i) = PRICE * G(i) / 100 Next i Return T490: 'load1 - global Close Open file$ For Input As #1 Input #1, SCAL Input #1, SCA2 Input #1, PRICE If SC3 > 0 Then SCA2 = SC3 Return T560: 'load2 - ordered files Close Open fil2$ For Input As #1 Open fil5$ For Input As #2 For i = 1 To 16 Line Input #1, T$(i) BK(i) = Val(Mid$(T$(i), 27, 4)) pf(i) = Val(Mid$(T$(i), 32, 4)) lv(i) = Val(Mid$(T$(i), 37, 3)) If lv(i) = 0 Then lv(i) = 120 Line Input #2, DTE$(i) Next i Return T670: 'put out reset file Close Open fil4$ For Output As #2 Open fil5$ For Output As #3 For i = 1 To 16 Print #2, i; ","; AA(i); ","; BB(i); ","; EE(i) Print #3, DTE$(i) Next i Return T760: 'reset all Close Open fil6$ For Output As #2 Open fil7$ For Append As #4 For i = 1 To 16 GoSub T870 AA(i) = A(i) BB(i) = B(i) EE(i) = E(i) DTE$(i) = DTC$(i): 'Time$ + " " + Date$ Next i Return T870: 'put out bill PL1$ = Mid$(T$(i), 1, 25) + " " + Mid$(DTE$(i), 10, 10) + " to " + Mid$(DTC$(i), 10, 10) + " " PL2$ = Format$(G(i), "000000") PL3$ = " kwh $" PL4$ = Format$(C(i), "000000.00") If Mid$(PL2$, 1, 5) = "00000" Then Mid$(PL2$, 1, 5) = " " If Mid$(PL2$, 1, 4) = "0000" Then Mid$(PL2$, 1, 4) = " " If Mid$(PL2$, 1, 3) = "000" Then Mid$(PL2$, 1, 3) = " " If Mid$(PL2$, 1, 2) = "00" Then Mid$(PL2$, 1, 2) = " " If Mid$(PL2$, 1, 1) = "0" Then Mid$(PL2$, 1, 1) = " " If Mid$(PL4$, 1, 5) = "00000" Then Mid$(PL4$, 1, 5) = " " If Mid$(PL4$, 1, 4) = "0000" Then Mid$(PL4$, 1, 4) = " " If Mid$(PL4$, 1, 3) = "000" Then Mid$(PL4$, 1, 3) = " " If Mid$(PL4$, 1, 2) = "00" Then Mid$(PL4$, 1, 2) = " " If Mid$(PL4$, 1, 1) = "0" Then Mid$(PL4$, 1, 1) = " " Print #2, PL1$ + PL2$ + PL3$ + PL4$ Print #4, PL1$ + PL2$ + PL3$ + PL4$ Return T999: End Sub Private Sub mn33_Click() 'UNRESET fil4$ = filename$ + "CT.RES" fil5$ = filename$ + "CT.DTE" Cls Static DTE$(16) Static AA(16), BB(16), EE(16) Close GoSub U970 GoSub U670 GoTo U999 U670: 'put out reset file Close Open fil4$ For Output As #2 Open fil5$ For Output As #3 For i = 1 To 16 Print #2, i; ","; AA(i); ","; BB(i); ","; EE(i) Print #3, DTE$(i) Next i Return U970: 'unreset all For i = 1 To 16 AA(i) = 0 BB(i) = 0 EE(i) = 0 DTE$(i) = "00:00:00 MM-DD-YYYY" Next i Return U999: End Sub Private Sub mn34_Click() 'prtbill - print bill file - microMETER Corp. (C) 1995 fil1$ = filename$ + "CT.BIL" fil2$ = filename$ + "MICRO.TXT" fil3$ = filename$ + "BILLS.OUT" fil4$ = filename$ + "MICRO.DAT" Close Open fil1$ For Input As #1 Open fil2$ For Input As #2 Open fil3$ For Output As #3 Open fil4$ For Input As #4 N = 0 CL$ = Chr$(10) + Chr$(13) Line Input #4, xx$ Line Input #4, xx$ Line Input #4, P1$ Line Input #2, T1$ Line Input #2, T2$ Line Input #2, T3$ Line Input #2, T4$ Line Input #2, T5$ Line Input #2, T6$ Line Input #2, T7$ LOOP1: N = N + 1 If EOF(1) <> 0 Then GoTo SKIP1 Line Input #1, BL$ T9$ = Mid$(T7$, 1, 55) + P1$ + Mid$(T7$, 60, 18) KWH = Val(Mid$(BL$, 51, 7)) If SC3 <> 0 Then KWH = KWH * SC2 / SC3 PRICE = Val(P1$) TOTAL = KWH * PRICE / 100 PL4$ = Format$(TOTAL, "000000.00") If Mid$(PL4$, 1, 5) = "00000" Then Mid$(PL4$, 1, 5) = " " If Mid$(PL4$, 1, 4) = "0000" Then Mid$(PL4$, 1, 4) = " " If Mid$(PL4$, 1, 3) = "000" Then Mid$(PL4$, 1, 3) = " " If Mid$(PL4$, 1, 2) = "00" Then Mid$(PL4$, 1, 2) = " " If Mid$(PL4$, 1, 1) = "0" Then Mid$(PL4$, 1, 1) = " " Print #3, T1$ Printer.Print T1$ Print #3, T2$ Printer.Print T2$ Print #3, T3$ Printer.Print T3$ Print #3, T4$ Printer.Print T4$ Print #3, T5$ Printer.Print T5$ Print #3, T6$ Printer.Print T6$ Print #3, Mid$(BL$, 1, 65) + PL4$ Printer.Print Mid$(BL$, 1, 65) + PL4$ Print #3, T9$ Printer.Print T9$ For i = 1 To 3 Print #3, " " Printer.Print " " Next i If N > 3 Then Printer.NewPage: N = 0 GoTo LOOP1 SKIP1: Close End Sub Private Sub mn41_Click() 'DISPLAY file$ = filename$ + "MICRO.DAT" fil2$ = filename$ + "CT.DAT" fil3$ = filename$ + "CT.CAP" fil4$ = filename$ + "CT.RES" fil5$ = filename$ + "CT.DTE" fil6$ = filename$ + "MICRO.PRT" fil7$ = filename$ + "MICRO2.CAP" fil8$ = filename$ + "MICRO.TXT" CL$ = Chr$(13) + Chr$(10) Cls GoSub S780 Static A(16), B(16), C(16), D(16), E(16), F(16), G(16) Static T$(16), TA(6), TB(16), BK(16), pf(16), lv(16), DTE$(16) Static AA(16), BB(16), EE(16), FF(16), GG(16) Close Open fil6$ For Output As #1: Close S130: 'RECONCILE LOOP GoSub S850 GoSub S590 Open fil6$ For Append As #1 TA(1) = 0: TA(2) = 0: TA(3) = 0: TA(4) = 0: TA(5) = 0 Print TXT1$: Print #1, TXT1$ 'L1$ = "Summary as of " 'PL1$ = "<> microMETER <> - System Summary as of " PL1$ = filename$ + " System Summary as of " PL2$ = TIM2$ + " " + DAT2$ + " @" + Str$(PRICE) + " cts/kwh" Print PL1$ + PL2$: Print #1, PL1$ + PL2$ Print #1, " " PL0$ = " # Circuit kw " PL1$ = " # Circuit amps " KL2$ = "kwh" If SCA2 < 10 Then KL2$ = " wh" If SCA2 > 10000 Then KL2$ = "mwh" PL2$ = " " + KL2$ + " amt % reset " PL3$ = " " + KL2$ + " amt % prev , curr " Form1.Text10 = KL2$ 'If SW = 1 Then Print PL1$ + PL2$ If SW = 1 Then Print #1, PL1$ + PL2$: Form1.Text9 = "amps" 'If SW = -1 Then Print PL0$ + PL3$ If SW = -1 Then Print #1, PL0$ + PL3$: Form1.Text9 = "kw " For i = 1 To 16 TA(1) = C(i) + TA(1) TA(2) = A(i) + TA(2) TA(3) = G(i) + TA(3) Next i For i = 1 To 16 j = i - 1 v$ = Mid$(T$(i), 1, 25) TB(i) = C(i) / (TA(1) + 0.0000000001) * 100 PL0$ = "" Form1.Text1(j) = v$ PL0$ = PL0$ + Mid$(v$, 1, 24) x$ = Format$(A(i), "####.0") y$ = Format$(A(i), "0000.0") If Mid$(y$, 1, 3) = "000" Then Mid$(y$, 1, 3) = " " If Mid$(y$, 1, 2) = "00" Then Mid$(y$, 1, 2) = " " If Mid$(y$, 1, 1) = "0" Then Mid$(y$, 1, 1) = " " PL0$ = PL0$ + y$ If A(i) < 1 Then x$ = " " + x$ If A(i) < 10 Then x$ = " " + x$ If A(i) < 100 Then x$ = " " + x$ Form1.Text2(j) = x$ If A(i) = 0 Then Form1.Text2(j) = " " x$ = Format$(G(i), "########.0") y$ = Format$(G(i), "00000000.0") If Mid$(y$, 1, 7) = "0000000" Then Mid$(y$, 1, 7) = " " If Mid$(y$, 1, 6) = "000000" Then Mid$(y$, 1, 6) = " " If Mid$(y$, 1, 5) = "00000" Then Mid$(y$, 1, 5) = " " If Mid$(y$, 1, 4) = "0000" Then Mid$(y$, 1, 4) = " " If Mid$(y$, 1, 3) = "000" Then Mid$(y$, 1, 3) = " " If Mid$(y$, 1, 2) = "00" Then Mid$(y$, 1, 2) = " " If Mid$(y$, 1, 1) = "0" Then Mid$(y$, 1, 1) = " " PL0$ = PL0$ + y$ If G(i) < 1 Then x$ = " " + x$ If G(i) < 10 Then x$ = " " + x$ If G(i) < 100 Then x$ = " " + x$ If G(i) < 1000 Then x$ = " " + x$ If G(i) < 10000 Then x$ = " " + x$ If G(i) < 100000 Then x$ = " " + x$ Form1.Text3(j) = x$ If G(i) = 0 Then Form1.Text3(j) = " " x$ = Format$(C(i), "########.00") y$ = Format$(C(i), "00000000.00") If Mid$(y$, 1, 7) = "0000000" Then Mid$(y$, 1, 7) = " " If Mid$(y$, 1, 6) = "000000" Then Mid$(y$, 1, 6) = " " If Mid$(y$, 1, 5) = "00000" Then Mid$(y$, 1, 5) = " " If Mid$(y$, 1, 4) = "0000" Then Mid$(y$, 1, 4) = " " If Mid$(y$, 1, 3) = "000" Then Mid$(y$, 1, 3) = " " If Mid$(y$, 1, 2) = "00" Then Mid$(y$, 1, 2) = " " If Mid$(y$, 1, 1) = "0" Then Mid$(y$, 1, 1) = " " PL0$ = PL0$ + y$ + " " If C(i) < 1 Then x$ = " " + x$ If C(i) < 10 Then x$ = " " + x$ If C(i) < 100 Then x$ = " " + x$ If C(i) < 1000 Then x$ = " " + x$ If C(i) < 10000 Then x$ = " " + x$ Form1.Text4(j) = x$ If C(i) = 0 Then Form1.Text4(j) = " " x$ = Format$(TB(i), "###") y$ = Format$(TB(i), "000") If Mid$(y$, 1, 2) = "00" Then Mid$(y$, 1, 2) = " " If Mid$(y$, 1, 1) = "0" Then Mid$(y$, 1, 1) = " " PL0$ = PL0$ + y$ + " " If TB(i) < 1 Then x$ = "" + x$ If TB(i) < 10 Then x$ = " " + x$ If TB(i) < 100 Then x$ = " " + x$ Form1.Text5(j) = x$ If TB(i) = 0 Then Form1.Text5(j) = " " If SW = 1 Then Form1.Text6(j) = DTE$(i) If SW = 1 Then PL0$ = PL0$ + DTE$(i) G2 = GG(i) + G(i) TA(4) = TA(4) + GG(i) TA(5) = TA(5) + G2 If SW = -1 Then Form1.Text6(j) = Format$(GG(i), "########.0") + " " + Format$(G2, "########.0") If SW = -1 Then PL0$ = PL0$ + Form1.Text6(j) Print #1, PL0$ Next i Form1.Text2(16) = Format$(TA(2), "#####.0") Form1.Text3(16) = Format$(TA(3), "#########.0") Form1.Text4(16) = Format$(TA(1), "#########.00") PL0$ = " totals " + Form1.Text2(16) + " " + Form1.Text3(16) + " " + Form1.Text4(16) Print #1, PL0$ Form1.Text7 = Format$(TA(3), "#########.0") Form1.Text8 = SCA2 PL0$ = " " + Form1.Text7 + " scale2: " + Form1.Text8 Print #1, PL0$ GoTo S999 S590: 'redisplay - unordered files Close Open fil3$ For Input As #2 Open fil4$ For Input As #3 Open fil7$ For Input As #4 For i = 1 To 16 Input #2, j, A(j), B(j), E(j) Input #3, k, AA(k), BB(k), EE(k) Next i Input #4, TIM3$ TIM2$ = Mid$(TIM3$, 1, 8) DAT2$ = Mid$(TIM3$, 10, 10) For i = 1 To 16 B(i) = B(i) - BB(i) E(i) = E(i) - EE(i) F(i) = B(i) + E(i) * 65536! FF(i) = BB(i) + EE(i) * 65536! A(i) = A(i) / SCAL * BK(i) / 20: 'Scale to amps If SW = -1 Then A(i) = A(i) * pf(i) * lv(i) / 1000 If pf(i) < 0.1 Then A(i) = 0 G(i) = (F(i) / SCA2 * BK(i) / 20 * pf(i) * lv(i) / 120): 'Scale to kwh GG(i) = (FF(i) / SCA2 * BK(i) / 20 * pf(i) * lv(i) / 120) C(i) = PRICE * G(i) / 100 Next i Return S780: 'load1 - global Close Open file$ For Input As #1 Input #1, SCAL Input #1, SCA2 Input #1, PRICE Input #1, COL Input #1, C00, C01, C02, C03 Input #1, C04, C05, C06, C07 SC2 = SCA2 If SC3 <> 0 Then SCA2 = SC3 Close Open fil8$ For Input As #1 Line Input #1, TXT1$ Return S850: 'load2 - ordered files Close Open fil2$ For Input As #1 Open fil5$ For Input As #2 For i = 1 To 16 Line Input #1, T$(i) BK(i) = Val(Mid$(T$(i), 27, 4)) pf(i) = Val(Mid$(T$(i), 32, 4)) lv(i) = Val(Mid$(T$(i), 37, 3)) If lv(i) = 0 Then lv(i) = 120 Line Input #2, DTE$(i) Next i Return S999: Close End Sub Private Sub mn42_Click() SW = -SW End Sub Private Sub mn43_Click() 'RECONCILE TA3 = Val(Form1.Text3(16)): 'total KWH KWH = Val(Form1.Text7): 'recon KWH Temp1 = 0.3 * TA3: 'test for recon PRICE 'If $ amount is placed in recon KWH window ... If KWH < Temp1 And PRICE > 0 Then KWH = KWH / PRICE * 100 End If SC2 = Val(Form1.Text8) If KWH <> 0 Then SC3 = SC2 * TA3 / KWH If KWH <> 0 Then Form1.Text8 = SC3 End Sub Private Sub mn44_Click() 'TEMPERATURES file$ = filename$ + "MICRO.DAT" fil2$ = filename$ + "CT.DAT" fil3$ = filename$ + "CT.CAP" fil4$ = filename$ + "CT.RES" fil5$ = filename$ + "CT.DTE" fil6$ = filename$ + "MICRO.PRT" fil7$ = filename$ + "MICRO2.CAP" fil8$ = filename$ + "MICRO.TXT" CL$ = Chr$(13) + Chr$(10) Cls GoSub V780 Static A(16), B(16), C(16), D(16), E(16), F(16), G(16) Static T$(16), TA(6), TB(16), BK(16), pf(16), lv(16), DTE$(16) Static AA(16), BB(16), EE(16), FF(16), GG(16) Close Open fil6$ For Output As #1: Close V130: GoSub V850 GoSub V590 Open fil6$ For Append As #1 Print TXT1$: Print #1, TXT1$ 'L1$ = "Summary as of " 'PL1$ = "<> microMETER <> - System Summary as of " PL1$ = filename$ + " System Summary as of " PL2$ = TIM2$ + " " + DAT2$ Print PL1$ + PL2$ Print #1, PL1$ + PL2$ Print #1, " " PL0$ = " # Circuit degC " PL1$ = " # Circuit degF " PL2$ = " avg dif reset " PL3$ = " avg dif reset " Form1.Text10 = "avg" 'If SW = 1 Then Print PL1$ + PL2$ If SW = 1 Then Print #1, PL1$ + PL2$: Form1.Text9 = "degF" 'If SW = -1 Then Print PL0$ + PL3$ If SW = -1 Then Print #1, PL0$ + PL3$: Form1.Text9 = "degC" For i = 1 To 16 j = i - 1 PL0$ = "" v$ = Mid$(T$(i), 1, 25) Form1.Text1(j) = v$ PL0$ = PL0$ + Mid$(v$, 1, 24) x$ = Format$(A(i), "####.0") y$ = Format$(A(i), "0000.0") If Mid$(y$, 1, 3) = "000" Then Mid$(y$, 1, 3) = " " If Mid$(y$, 1, 2) = "00" Then Mid$(y$, 1, 2) = " " If Mid$(y$, 1, 1) = "0" Then Mid$(y$, 1, 1) = " " PL0$ = PL0$ + y$ x$ = Format$(A(i), "####.0") If A(i) < 1 Then x$ = " " + x$ If A(i) < 10 Then x$ = " " + x$ If A(i) < 100 Then x$ = " " + x$ Form1.Text2(j) = x$ If A(i) = 0 Then Form1.Text2(j) = " " x$ = Format$(G(i), "########.0") y$ = Format$(G(i), "00000000.0") If Mid$(y$, 1, 7) = "0000000" Then Mid$(y$, 1, 7) = " " If Mid$(y$, 1, 6) = "000000" Then Mid$(y$, 1, 6) = " " If Mid$(y$, 1, 5) = "00000" Then Mid$(y$, 1, 5) = " " If Mid$(y$, 1, 4) = "0000" Then Mid$(y$, 1, 4) = " " If Mid$(y$, 1, 3) = "000" Then Mid$(y$, 1, 3) = " " If Mid$(y$, 1, 2) = "00" Then Mid$(y$, 1, 2) = " " If Mid$(y$, 1, 1) = "0" Then Mid$(y$, 1, 1) = " " PL0$ = PL0$ + y$ If G(i) < 1 Then x$ = " " + x$ If G(i) < 10 Then x$ = " " + x$ If G(i) < 100 Then x$ = " " + x$ If G(i) < 1000 Then x$ = " " + x$ If G(i) < 10000 Then x$ = " " + x$ If G(i) < 100000 Then x$ = " " + x$ Form1.Text3(j) = x$ If G(i) = 0 Then Form1.Text3(j) = " " x$ = Format$(C(i), "########.00") y$ = Format$(C(i), "00000000.00") If Mid$(y$, 1, 7) = "0000000" Then Mid$(y$, 1, 7) = " " If Mid$(y$, 1, 6) = "000000" Then Mid$(y$, 1, 6) = " " If Mid$(y$, 1, 5) = "00000" Then Mid$(y$, 1, 5) = " " If Mid$(y$, 1, 4) = "0000" Then Mid$(y$, 1, 4) = " " If Mid$(y$, 1, 3) = "000" Then Mid$(y$, 1, 3) = " " If Mid$(y$, 1, 2) = "00" Then Mid$(y$, 1, 2) = " " If Mid$(y$, 1, 1) = "0" Then Mid$(y$, 1, 1) = " " PL0$ = PL0$ + y$ + " " If C(i) < 1 Then x$ = " " + x$ If C(i) < 10 Then x$ = " " + x$ If C(i) < 100 Then x$ = " " + x$ If C(i) < 1000 Then x$ = " " + x$ If C(i) < 10000 Then x$ = " " + x$ Form1.Text4(j) = x$ If C(i) = 0 Then Form1.Text4(j) = " " x$ = Format$(TB(i), "###") y$ = Format$(TB(i), "000") If Mid$(y$, 1, 2) = "00" Then Mid$(y$, 1, 2) = " " If Mid$(y$, 1, 1) = "0" Then Mid$(y$, 1, 1) = " " PL0$ = PL0$ + y$ + " " If TB(i) < 1 Then x$ = " " + x$ If TB(i) < 10 Then x$ = " " + x$ If TB(i) < 100 Then x$ = " " + x$ Form1.Text5(j) = x$ If TB(i) = 0 Then Form1.Text5(j) = " " Form1.Text6(j) = DTE$(i) PL0$ = PL0$ + DTE$(i) G2 = GG(i) + G(i) TA(4) = TA(4) + GG(i) TA(5) = TA(5) + G2 Print #1, PL0$ Next i Form1.Text2(16) = Format$(TA(2), "#####.0") Form1.Text3(16) = Format$(TA(3), "#########.0") Form1.Text4(16) = Format$(TA(1), "#########.00") Form1.Text7 = Format$(TA(3), "#########.0") Form1.Text8 = " " PL0$ = " " + Form1.Text2(16) + " " + Form1.Text3(16) + " " + Form1.Text7 Print #1, PL0$ GoTo V999 V590: 'redisplay - unordered files Close Open fil3$ For Input As #2 Open fil4$ For Input As #3 Open fil7$ For Input As #4 For i = 1 To 16 Input #2, j, A(j), B(j), E(j) Input #3, k, AA(k), BB(k), EE(k) Next i Input #4, TIM3$ TIM2$ = Mid$(TIM3$, 1, 8) DAT2$ = Mid$(TIM3$, 10, 10) For i = 1 To 16 B(i) = B(i) - BB(i) E(i) = E(i) - EE(i) F(i) = B(i) + E(i) * 65536! If F(i) = 0 Then F(i) = A(i) Next i d2 = 0 If d2 = 0 Then d2 = A(D1) UPDS = 1 If d2 > 0 And D1 > 0 Then UPDS = F(D1) / d2 For i = 1 To 16 If pf(i) > 0.1 Then A(i) = 0 If pf(i) > 0.1 Then G(i) = 0 If pf(i) < 0.1 Then A(i) = A(i) / SCAL * BK(i) / 20 + lv(i) / 10 - 12#: 'Scale to DEG C If pf(i) < 0.1 Then A(i) = A(i) - SCA2 If SW = 1 And pf(i) < 0.1 Then A(i) = A(i) * 9 / 5 + 32 If pf(i) < 0.1 And F(i) > 0 Then G(i) = (F(i) / SCAL * BK(i) / 20 * 1# / UPDS) + lv(i) / 10 - 12#: 'Scale to avg If pf(i) < 0.1 And F(i) > 0 Then G(i) = G(i) - SCA2 If SW = 1 And pf(i) < 0.1 Then G(i) = G(i) * 9 / 5 + 32 C(i) = A(i) - G(i) Next i Return V780: 'load1 - global Close Open file$ For Input As #1 Input #1, SCAL Input #1, SCA2 SCAL = 2.2791: SCA2 = 50.62 Input #1, PRICE Input #1, COL Input #1, C00, C01, C02, C03 Input #1, C04, C05, C06, C07 Input #1, C2, C3, D1, d2 If SC3 <> 0 Then SCA2 = SC3 Close Open fil8$ For Input As #1 Line Input #1, TXT1$ Return V850: 'load2 - ordered files Close Open fil2$ For Input As #1 Open fil5$ For Input As #2 For i = 1 To 16 Line Input #1, T$(i) BK(i) = Val(Mid$(T$(i), 27, 4)) pf(i) = Val(Mid$(T$(i), 32, 4)) lv(i) = Val(Mid$(T$(i), 37, 3)) If lv(i) = 0 Then lv(i) = 120 Line Input #2, DTE$(i) Next i Return V999: Close End Sub Private Sub mn51_Click() RetVal = Shell("notepad C:\micromtr\readme.txt", 3) End Sub Private Sub mn52_Click() RetVal = Shell("notepad c:\micromtr\readme2.txt", 3) End Sub Private Sub mn71_Click() 'USAG2 - plot microMETER data - CJC 1995 (C) Static A0$(60), A1$(60), A2$(60), A3$(60), A4$(60) Static A5$(60), A6$(60), A7$(60), A8$(60), A9$(60) Static BK(17), pf(17), lv(17), T$(17), CK$(17) fil1$ = filename$ + "USAGE.CAP" fil2$ = filename$ + "CT.DAT" CK$(17) = "Entire System ": BMX = 0 Cls: ii = 0: NN = 0: rec = 0 Close Open fil2$ For Input As #1 For i = 1 To 16 Line Input #1, T$(i) CK$(i) = Mid$(T$(i), 1, 20) BK(i) = Val(Mid$(T$(i), 27, 4)) pf(i) = Val(Mid$(T$(i), 32, 4)) lv(i) = Val(Mid$(T$(i), 37, 3)) If lv(i) = 0 Then lv(i) = 120 BK(17) = BK(17) + BK(i) Next i Close For ct = 1 To 17 If ct = 1 Then file$ = filename$ + "USAGE.P01" If ct = 2 Then file$ = filename$ + "USAGE.P02" If ct = 3 Then file$ = filename$ + "USAGE.P03" If ct = 4 Then file$ = filename$ + "USAGE.P04" If ct = 5 Then file$ = filename$ + "USAGE.P05" If ct = 6 Then file$ = filename$ + "USAGE.P06" If ct = 7 Then file$ = filename$ + "USAGE.P07" If ct = 8 Then file$ = filename$ + "USAGE.P08" If ct = 9 Then file$ = filename$ + "USAGE.P09" If ct = 10 Then file$ = filename$ + "USAGE.P10" If ct = 11 Then file$ = filename$ + "USAGE.P11" If ct = 12 Then file$ = filename$ + "USAGE.P12" If ct = 13 Then file$ = filename$ + "USAGE.P13" If ct = 14 Then file$ = filename$ + "USAGE.P14" If ct = 15 Then file$ = filename$ + "USAGE.P15" If ct = 16 Then file$ = filename$ + "USAGE.P16" If ct = 17 Then file$ = filename$ + "USAGE.P17" S21: Open fil1$ For Input As #1 Open file$ For Output As #2 Cls Print "Processing "; CK$(ct) S22: If EOF(1) <> 0 Then GoTo S99 Input #1, A, B, C, D rec = rec + 1 If A <> ct And ct <> 17 Then GoTo S22 B3 = B * BK(A) / 20 * lv(A) / 120 / 12.75 If ct <> 17 Then GoTo S33 'SYSTEM ONLY ii = ii + 1 B2 = B3 + B2 If ii < 16 Then GoTo S22 ii = 0 B3 = B2 B2 = 0 'SINGLE AND SYSTEM S33: L = L + 1: j = j + 1 Print #2, B3 NN = NN + 1 GoTo S22 S99: Close Next ct Beep End Sub Private Sub mn72_Click() Form6.Show End Sub Private Sub mn73_Click() GR = 20 End Sub Private Sub mn74_Click() GR = 40 End Sub Private Sub mn75_Click() GR = 60 End Sub Private Sub mn76_Click() 'DEMAND - convert microMETER data to demand format - CJC 1995 (C) fil1$ = filename$ + "CT.DAT" fil2$ = filename$ + "USAGE.CAP" fil3$ = filename$ + "DEMAND.OUT" Static BK(17), pf(17), lv(17), B2(17), T$(17), A2(17), CK$(17), B4(17), DM(17) CK$(17) = "Entire System ": M1$ = "*": M2$ = "*": BMX = 0 Cls Close Open fil1$ For Input As #1 For i = 1 To 16 Line Input #1, T$(i) CK$(i) = Mid$(T$(i), 1, 20) BK(i) = Val(Mid$(T$(i), 27, 4)) pf(i) = Val(Mid$(T$(i), 32, 4)) lv(i) = Val(Mid$(T$(i), 37, 3)) If lv(i) = 0 Then lv(i) = 120 BKT = BKT + BK(i) Next i BK(17) = BKT Close If GR < 28 Then DP = 15: GoTo D22 If GR < 48 Then DP = 30: GoTo D22 DP = 60 D22: Print "Computing ... " Open fil2$ For Input As #1 Open fil3$ For Output As #2 D1 = DP / 60 * 22.5: D3 = 3: D4 = 176 If DP = 15 Then D4 = 80: D3 = 1 If DP = 60 Then D4 = 352: D3 = 1 D5 = D4 + 16 D60: 'MAIN LOOP R1 = R1 + 1 If EOF(1) <> 0 Then GoTo D89 Input #1, A, B, C, D AMP = B * BK(A) / 20 / 12.75 / D1: 'amps / # in interval so sum is avg kw = AMP * pf(A) * lv(A) / 1000 j = j + 1 'PRINT "J", J, K: '11 11 11 12 22 23 5 6 5 6 5 6 5 6 -1 ' 176 192 352 368 80 96 DM(A) = DM(A) + kw: 'sum of samples is avg If j < D4 And k < D3 Then GoTo D60: '16*11*3 + If j < D5 And k = D3 Then GoTo D60: '16*12 = 45 in 2 hrs j = 0 k = k + 1: If k > D3 Then k = 0 GoSub D90: 'process the periods in 2 hrs GoTo D60 D89: Close: Print R2; " Records for "; DP; " minute demand periods" Beep GoTo D99 D90: 'Build total and emit demand period For i = 1 To 16 DM(17) = DM(17) + DM(i) Next i For i = 1 To 17 If R2 > 1631 Then GoTo D97 R2 = R2 + 1 Print #2, i; ","; DM(i) D97: DM(i) = 0 Next i Return D99: 'DSPLIT - split demand format data - CJC 1995 (C) fil1$ = filename$ + "DEMAND.OUT" DP2$ = "00" If DP = 15 Then DP2$ = "15" If DP = 30 Then DP2$ = "30" If DP = 60 Then DP2$ = "60" Cls Print "Building interval files..." Close For ct = 1 To 17 R2 = 0 If ct = 1 Then C2$ = "01" If ct = 2 Then C2$ = "02" If ct = 3 Then C2$ = "03" If ct = 4 Then C2$ = "04" If ct = 5 Then C2$ = "05" If ct = 6 Then C2$ = "06" If ct = 7 Then C2$ = "07" If ct = 8 Then C2$ = "08" If ct = 9 Then C2$ = "09" If ct = 10 Then C2$ = "10" If ct = 11 Then C2$ = "11" If ct = 12 Then C2$ = "12" If ct = 13 Then C2$ = "13" If ct = 14 Then C2$ = "14" If ct = 15 Then C2$ = "15" If ct = 16 Then C2$ = "16" If ct = 17 Then C2$ = "17" Open fil1$ For Input As #1 fil2$ = filename$ + "DEM" + DP2$ + ".P" + C2$ Open fil2$ For Output As #2 DS0: 'MAIN LOOP If EOF(1) <> 0 Then GoTo DS7 Input #1, A, B R1 = R1 + 1 If A <> ct Then GoTo DS0 If R2 > 96 Then GoTo DS7 Print #2, B R2 = R2 + 1 GoTo DS0 DS7: Close Next ct Beep Print "I/O ", R1, R2 End Sub Private Sub mn78_Click() GR = 0 End Sub Private Sub mn9_Click() Form3.Show End Sub VERSION 5.00 Begin VB.Form Form2 Appearance = 0 'Flat BackColor = &H00E0FFF0& Caption = "CT Setup" ClientHeight = 5130 ClientLeft = 330 ClientTop = 1770 ClientWidth = 8580 BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000008& LinkTopic = "Form2" PaletteMode = 1 'UseZOrder ScaleHeight = 5130 ScaleWidth = 8580 Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 15 Left = 7800 TabIndex = 113 TabStop = 0 'False Top = 4680 Width = 495 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 14 Left = 7800 TabIndex = 112 TabStop = 0 'False Top = 4440 Width = 495 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 13 Left = 7800 TabIndex = 111 TabStop = 0 'False Top = 4200 Width = 495 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 12 Left = 7800 TabIndex = 110 TabStop = 0 'False Top = 3960 Width = 495 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 11 Left = 7800 TabIndex = 109 TabStop = 0 'False Top = 3720 Width = 495 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 10 Left = 7800 TabIndex = 108 TabStop = 0 'False Top = 3480 Width = 495 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 9 Left = 7800 TabIndex = 107 TabStop = 0 'False Top = 3240 Width = 495 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 8 Left = 7800 TabIndex = 106 TabStop = 0 'False Top = 3000 Width = 495 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 7 Left = 7800 TabIndex = 105 TabStop = 0 'False Top = 2760 Width = 495 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 6 Left = 7800 TabIndex = 104 TabStop = 0 'False Top = 2520 Width = 495 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 5 Left = 7800 TabIndex = 103 TabStop = 0 'False Top = 2280 Width = 495 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 4 Left = 7800 TabIndex = 102 TabStop = 0 'False Top = 2040 Width = 495 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 3 Left = 7800 TabIndex = 101 TabStop = 0 'False Top = 1800 Width = 495 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 2 Left = 7800 TabIndex = 100 TabStop = 0 'False Top = 1560 Width = 495 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 1 Left = 7800 TabIndex = 99 TabStop = 0 'False Top = 1320 Width = 495 End Begin VB.TextBox Text7 Appearance = 0 'Flat Height = 285 Index = 0 Left = 7800 TabIndex = 98 TabStop = 0 'False Top = 1080 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 15 Left = 6960 TabIndex = 97 TabStop = 0 'False Top = 4680 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 14 Left = 6960 TabIndex = 96 TabStop = 0 'False Top = 4440 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 13 Left = 6960 TabIndex = 95 TabStop = 0 'False Top = 4200 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 12 Left = 6960 TabIndex = 94 TabStop = 0 'False Top = 3960 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 11 Left = 6960 TabIndex = 93 TabStop = 0 'False Top = 3720 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 10 Left = 6960 TabIndex = 92 TabStop = 0 'False Top = 3480 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 9 Left = 6960 TabIndex = 91 TabStop = 0 'False Top = 3240 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 8 Left = 6960 TabIndex = 90 TabStop = 0 'False Top = 3000 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 7 Left = 6960 TabIndex = 89 TabStop = 0 'False Top = 2760 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 6 Left = 6960 TabIndex = 88 TabStop = 0 'False Top = 2520 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 5 Left = 6960 TabIndex = 87 TabStop = 0 'False Top = 2280 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 4 Left = 6960 TabIndex = 86 TabStop = 0 'False Top = 2040 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 3 Left = 6960 TabIndex = 85 TabStop = 0 'False Top = 1800 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 2 Left = 6960 TabIndex = 84 TabStop = 0 'False Top = 1560 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 1 Left = 6960 TabIndex = 83 TabStop = 0 'False Top = 1320 Width = 495 End Begin VB.TextBox Text6 Appearance = 0 'Flat Height = 285 Index = 0 Left = 6960 TabIndex = 82 TabStop = 0 'False Top = 1080 Width = 495 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 15 Left = 6120 TabIndex = 80 TabStop = 0 'False Top = 4680 Width = 495 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 15 Left = 5160 TabIndex = 79 TabStop = 0 'False Top = 4680 Width = 615 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 15 Left = 4200 TabIndex = 78 TabStop = 0 'False Top = 4680 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 15 Left = 1680 TabIndex = 77 Top = 4680 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 15 Left = 840 TabIndex = 76 TabStop = 0 'False Top = 4680 Width = 615 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 14 Left = 6120 TabIndex = 75 TabStop = 0 'False Top = 4440 Width = 495 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 14 Left = 5160 TabIndex = 74 TabStop = 0 'False Top = 4440 Width = 615 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 14 Left = 4200 TabIndex = 73 TabStop = 0 'False Top = 4440 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 14 Left = 1680 TabIndex = 72 Top = 4440 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 14 Left = 840 TabIndex = 71 TabStop = 0 'False Top = 4440 Width = 615 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 13 Left = 6120 TabIndex = 70 TabStop = 0 'False Top = 4200 Width = 495 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 13 Left = 5160 TabIndex = 69 TabStop = 0 'False Top = 4200 Width = 615 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 13 Left = 4200 TabIndex = 68 TabStop = 0 'False Top = 4200 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 13 Left = 1680 TabIndex = 67 Top = 4200 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 13 Left = 840 TabIndex = 66 TabStop = 0 'False Top = 4200 Width = 615 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 12 Left = 6120 TabIndex = 65 TabStop = 0 'False Top = 3960 Width = 495 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 12 Left = 5160 TabIndex = 64 TabStop = 0 'False Top = 3960 Width = 615 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 12 Left = 4200 TabIndex = 63 TabStop = 0 'False Top = 3960 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 12 Left = 1680 TabIndex = 62 Top = 3960 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 12 Left = 840 TabIndex = 61 TabStop = 0 'False Top = 3960 Width = 615 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 11 Left = 6120 TabIndex = 60 TabStop = 0 'False Top = 3720 Width = 495 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 11 Left = 5160 TabIndex = 59 TabStop = 0 'False Top = 3720 Width = 615 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 11 Left = 4200 TabIndex = 58 TabStop = 0 'False Top = 3720 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 11 Left = 1680 TabIndex = 57 Top = 3720 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 11 Left = 840 TabIndex = 56 TabStop = 0 'False Top = 3720 Width = 615 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 10 Left = 6120 TabIndex = 55 TabStop = 0 'False Top = 3480 Width = 495 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 10 Left = 5160 TabIndex = 54 TabStop = 0 'False Top = 3480 Width = 615 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 10 Left = 4200 TabIndex = 53 TabStop = 0 'False Top = 3480 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 10 Left = 1680 TabIndex = 52 Top = 3480 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 10 Left = 840 TabIndex = 51 TabStop = 0 'False Top = 3480 Width = 615 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 9 Left = 6120 TabIndex = 50 TabStop = 0 'False Top = 3240 Width = 495 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 9 Left = 5160 TabIndex = 49 TabStop = 0 'False Top = 3240 Width = 615 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 9 Left = 4200 TabIndex = 48 TabStop = 0 'False Top = 3240 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 9 Left = 1680 TabIndex = 47 Top = 3240 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 9 Left = 840 TabIndex = 46 TabStop = 0 'False Top = 3240 Width = 615 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 8 Left = 6120 TabIndex = 45 TabStop = 0 'False Top = 3000 Width = 495 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 8 Left = 5160 TabIndex = 44 TabStop = 0 'False Top = 3000 Width = 615 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 8 Left = 4200 TabIndex = 43 TabStop = 0 'False Top = 3000 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 8 Left = 1680 TabIndex = 42 Top = 3000 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 8 Left = 840 TabIndex = 41 TabStop = 0 'False Top = 3000 Width = 615 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 7 Left = 6120 TabIndex = 40 TabStop = 0 'False Top = 2760 Width = 495 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 7 Left = 5160 TabIndex = 39 TabStop = 0 'False Top = 2760 Width = 615 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 7 Left = 4200 TabIndex = 38 TabStop = 0 'False Top = 2760 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 7 Left = 1680 TabIndex = 37 Top = 2760 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 7 Left = 840 TabIndex = 36 TabStop = 0 'False Top = 2760 Width = 615 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 6 Left = 6120 TabIndex = 35 TabStop = 0 'False Top = 2520 Width = 495 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 6 Left = 5160 TabIndex = 34 TabStop = 0 'False Top = 2520 Width = 615 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 6 Left = 4200 TabIndex = 33 TabStop = 0 'False Top = 2520 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 6 Left = 1680 TabIndex = 32 Top = 2520 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 6 Left = 840 TabIndex = 31 TabStop = 0 'False Top = 2520 Width = 615 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 5 Left = 6120 TabIndex = 30 TabStop = 0 'False Top = 2280 Width = 495 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 5 Left = 5160 TabIndex = 29 TabStop = 0 'False Top = 2280 Width = 615 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 5 Left = 4200 TabIndex = 28 TabStop = 0 'False Top = 2280 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 5 Left = 1680 TabIndex = 27 Top = 2280 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 5 Left = 840 TabIndex = 26 TabStop = 0 'False Top = 2280 Width = 615 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 4 Left = 6120 TabIndex = 25 TabStop = 0 'False Top = 2040 Width = 495 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 4 Left = 5160 TabIndex = 24 TabStop = 0 'False Top = 2040 Width = 615 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 4 Left = 4200 TabIndex = 23 TabStop = 0 'False Top = 2040 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 4 Left = 1680 TabIndex = 22 Top = 2040 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 4 Left = 840 TabIndex = 21 TabStop = 0 'False Top = 2040 Width = 615 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 3 Left = 6120 TabIndex = 20 TabStop = 0 'False Top = 1800 Width = 495 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 3 Left = 5160 TabIndex = 19 TabStop = 0 'False Top = 1800 Width = 615 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 3 Left = 4200 TabIndex = 18 TabStop = 0 'False Top = 1800 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 3 Left = 1680 TabIndex = 17 Top = 1800 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 3 Left = 840 TabIndex = 16 TabStop = 0 'False Top = 1800 Width = 615 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 2 Left = 6120 TabIndex = 15 TabStop = 0 'False Top = 1560 Width = 495 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 2 Left = 5160 TabIndex = 14 TabStop = 0 'False Top = 1560 Width = 615 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 2 Left = 4200 TabIndex = 13 TabStop = 0 'False Top = 1560 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 2 Left = 1680 TabIndex = 12 Top = 1560 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 2 Left = 840 TabIndex = 11 TabStop = 0 'False Top = 1560 Width = 615 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 1 Left = 6120 TabIndex = 10 TabStop = 0 'False Top = 1320 Width = 495 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 1 Left = 5160 TabIndex = 9 TabStop = 0 'False Top = 1320 Width = 615 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 1 Left = 4200 TabIndex = 8 TabStop = 0 'False Top = 1320 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 1 Left = 1680 TabIndex = 7 Top = 1320 Width = 2175 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 1 Left = 840 TabIndex = 6 TabStop = 0 'False Top = 1320 Width = 615 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 285 Index = 0 Left = 840 TabIndex = 1 TabStop = 0 'False Top = 1080 Width = 615 End Begin VB.TextBox Text2 Appearance = 0 'Flat Height = 285 Index = 0 Left = 1680 TabIndex = 2 Top = 1080 Width = 2175 End Begin VB.TextBox Text3 Appearance = 0 'Flat Height = 285 Index = 0 Left = 4200 TabIndex = 3 TabStop = 0 'False Top = 1080 Width = 615 End Begin VB.TextBox Text4 Appearance = 0 'Flat Height = 285 Index = 0 Left = 5160 TabIndex = 4 TabStop = 0 'False Top = 1080 Width = 615 End Begin VB.TextBox Text5 Appearance = 0 'Flat Height = 285 Index = 0 Left = 6120 TabIndex = 5 TabStop = 0 'False Top = 1080 Width = 495 End Begin VB.Label Label9 Appearance = 0 'Flat BackColor = &H80000005& Caption = "High" ForeColor = &H80000008& Height = 255 Left = 7800 TabIndex = 120 Top = 720 Width = 495 End Begin VB.Label Label8 Appearance = 0 'Flat BackColor = &H80000005& Caption = "Low" ForeColor = &H80000008& Height = 255 Left = 6960 TabIndex = 119 Top = 720 Width = 495 End Begin VB.Label Label7 Appearance = 0 'Flat BackColor = &H80000005& Caption = "Volts" ForeColor = &H80000008& Height = 255 Left = 6120 TabIndex = 118 Top = 720 Width = 495 End Begin VB.Label Label6 Appearance = 0 'Flat BackColor = &H80000005& Caption = "PF" ForeColor = &H80000008& Height = 255 Left = 5280 TabIndex = 117 Top = 720 Width = 615 End Begin VB.Label Label5 Appearance = 0 'Flat BackColor = &H80000005& Caption = "Amps" ForeColor = &H80000008& Height = 255 Left = 4200 TabIndex = 116 Top = 720 Width = 615 End Begin VB.Label Label4 Appearance = 0 'Flat BackColor = &H80000005& Caption = "Circuit Name" ForeColor = &H80000008& Height = 255 Left = 1680 TabIndex = 115 Top = 720 Width = 1575 End Begin VB.Label Label3 Appearance = 0 'Flat BackColor = &H80000005& Caption = " -- Alarm --" ForeColor = &H80000008& Height = 255 Left = 6960 TabIndex = 114 Top = 360 Width = 1335 End Begin VB.Label Label2 Appearance = 0 'Flat BackColor = &H80000005& Caption = " Please type items exactly, observing leading zeros and decimals." ForeColor = &H80000008& Height = 255 Left = 840 TabIndex = 81 Top = 240 Width = 5895 End Begin VB.Label Label1 Appearance = 0 'Flat BackColor = &H80000005& Caption = "CT # " ForeColor = &H80000008& Height = 255 Left = 840 TabIndex = 0 Top = 720 Width = 615 End Begin VB.Menu mn1 Caption = "&File" Begin VB.Menu mn11 Caption = "&Save" End Begin VB.Menu mn12 Caption = "&Nosave" End End End Attribute VB_Name = "Form2" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub mn11_Click() Open filename$ + "ct.dat" For Output As #1 For i = 1 To 16 j = i - 1 Mid$(re2$(i), 1, 5) = Form2.Text1(j) Mid$(re2$(i), 7, 18) = Form2.Text2(j) Mid$(re2$(i), 27, 4) = Form2.Text3(j) Mid$(re2$(i), 32, 4) = Form2.Text4(j) Mid$(re2$(i), 37, 3) = Form2.Text5(j) Mid$(re2$(i), 41, 3) = Form2.Text6(j) Mid$(re2$(i), 45, 3) = Form2.Text7(j) rec$ = re2$(i) Print #1, rec$ Next i Close Unload Form2 Form1.Show End Sub Private Sub mn12_Click() Unload Form2 Form1.Show End Sub VERSION 5.00 Begin VB.Form Form3 Appearance = 0 'Flat BackColor = &H00E0F0F0& Caption = "About microMETER" ClientHeight = 5310 ClientLeft = 1455 ClientTop = 1485 ClientWidth = 7275 FillStyle = 0 'Solid BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000008& LinkTopic = "Form3" PaletteMode = 1 'UseZOrder ScaleHeight = 5310 ScaleWidth = 7275 WindowState = 2 'Maximized Begin VB.Label Label3 Appearance = 0 'Flat BackColor = &H00C0FFC0& Caption = " " ForeColor = &H80000008& Height = 255 Left = 240 TabIndex = 2 Top = 360 Width = 3495 End Begin VB.Line Line16 X1 = 6720 X2 = 6960 Y1 = 4560 Y2 = 4800 End Begin VB.Line Line15 X1 = 6600 X2 = 6720 Y1 = 4680 Y2 = 4560 End Begin VB.Line Line14 X1 = 6120 X2 = 6600 Y1 = 4680 Y2 = 4680 End Begin VB.Line Line13 X1 = 5880 X2 = 6120 Y1 = 4560 Y2 = 4680 End Begin VB.Line Line12 X1 = 5640 X2 = 5880 Y1 = 4200 Y2 = 4560 End Begin VB.Line Line11 X1 = 5520 X2 = 5640 Y1 = 4440 Y2 = 4200 End Begin VB.Line Line10 X1 = 5400 X2 = 5520 Y1 = 4320 Y2 = 4440 End Begin VB.Line Line9 X1 = 5280 X2 = 5400 Y1 = 4320 Y2 = 4320 End Begin VB.Line Line8 X1 = 5160 X2 = 5280 Y1 = 4200 Y2 = 4320 End Begin VB.Line Line7 X1 = 5040 X2 = 5160 Y1 = 4440 Y2 = 4200 End Begin VB.Line Line6 X1 = 4920 X2 = 5040 Y1 = 4560 Y2 = 4440 End Begin VB.Line Line5 X1 = 4800 X2 = 4920 Y1 = 4320 Y2 = 4560 End Begin VB.Line Line4 X1 = 4680 X2 = 4800 Y1 = 5040 Y2 = 4320 End Begin VB.Line Line3 X1 = 4680 X2 = 7800 Y1 = 5040 Y2 = 5040 End Begin VB.Line Line2 X1 = 4680 X2 = 4680 Y1 = 3960 Y2 = 5040 End Begin VB.Shape Shape7 FillStyle = 0 'Solid Height = 135 Left = 4320 Shape = 3 'Circle Top = 2640 Width = 135 End Begin VB.Shape Shape6 FillStyle = 0 'Solid Height = 255 Left = 5880 Top = 1800 Width = 975 End Begin VB.Shape Shape5 FillStyle = 0 'Solid Height = 255 Left = 3480 Top = 1800 Width = 1335 End Begin VB.Shape Shape4 FillColor = &H00800000& FillStyle = 0 'Solid Height = 735 Left = 4560 Shape = 2 'Oval Top = 1560 Width = 255 End Begin VB.Shape Shape2 FillColor = &H00404040& FillStyle = 0 'Solid Height = 2415 Left = 4200 Shape = 2 'Oval Top = 720 Width = 975 End Begin VB.Shape Shape3 FillStyle = 0 'Solid Height = 2415 Left = 4680 Top = 720 Width = 735 End Begin VB.Shape Shape1 BorderColor = &H00000000& FillStyle = 0 'Solid Height = 2415 Left = 4920 Shape = 2 'Oval Top = 720 Width = 975 End Begin VB.Label Label2 Appearance = 0 'Flat BackColor = &H80000005& Caption = "microMETER Corporation - St. Petersburg, Florida (USA)" ForeColor = &H80000008& Height = 255 Left = 1200 TabIndex = 1 Top = 5640 Width = 7095 End Begin VB.Line Line1 X1 = 1320 X2 = 4320 Y1 = 2760 Y2 = 2760 End Begin VB.Label Label1 Appearance = 0 'Flat BackColor = &H00C0FFC0& Caption = "microMETER was developed in the USA with assistance from the D.O.E." BeginProperty Font Name = "Arial" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000008& Height = 855 Left = 240 TabIndex = 0 Top = 600 Width = 3495 End End Attribute VB_Name = "Form3" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False VERSION 5.00 Begin VB.Form Form4 Appearance = 0 'Flat BackColor = &H00F8F0F8& Caption = "microMETER Setup" ClientHeight = 4020 ClientLeft = 1575 ClientTop = 1770 ClientWidth = 6090 BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000008& LinkTopic = "Form4" PaletteMode = 1 'UseZOrder ScaleHeight = 4020 ScaleWidth = 6090 Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 375 Index = 3 Left = 3720 TabIndex = 4 Text = "5" Top = 2760 Width = 495 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 375 Index = 2 Left = 3720 TabIndex = 3 Text = "9.00" Top = 2280 Width = 735 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 375 Index = 1 Left = 3720 TabIndex = 1 Text = "2390.625" Top = 1560 Width = 975 End Begin VB.TextBox Text1 Appearance = 0 'Flat Height = 375 Index = 0 Left = 3720 TabIndex = 0 TabStop = 0 'False Text = "12.75" Top = 1080 Width = 735 End Begin VB.Label Label3 Appearance = 0 'Flat BackColor = &H80000005& Caption = "Comm Port 1-4, 5=demo" ForeColor = &H80000008& Height = 375 Left = 1200 TabIndex = 8 Top = 2760 Width = 2175 End Begin VB.Label Label2 Appearance = 0 'Flat BackColor = &H80000005& Caption = "Please carefully replace values, observing decimal placements and clearing excess digits." ForeColor = &H80000008& Height = 495 Left = 480 TabIndex = 7 Top = 240 Width = 5175 End Begin VB.Label Label1 Appearance = 0 'Flat BackColor = &H80000005& Caption = "Price in cents/kwh" ForeColor = &H80000008& Height = 375 Index = 2 Left = 1200 TabIndex = 6 Top = 2280 Width = 2175 End Begin VB.Label Label1 Appearance = 0 'Flat BackColor = &H80000005& Caption = "Scale 2 - affects kwh = 2390.625 @ 1.00 pf or in true power mode." ForeColor = &H80000008& Height = 615 Index = 1 Left = 1200 TabIndex = 5 Top = 1560 Width = 2175 End Begin VB.Label Label1 Appearance = 0 'Flat BackColor = &H80000005& Caption = "Scale 1 - affects amps normally = 12.75" ForeColor = &H80000008& Height = 375 Index = 0 Left = 1200 TabIndex = 2 Top = 1080 Width = 2175 End Begin VB.Menu mn1 Caption = "&File" Begin VB.Menu mn11 Caption = "&Save" End Begin VB.Menu mn12 Caption = "&Nosave" End End End Attribute VB_Name = "Form4" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub mn11_Click() Open filename$ + "micro.dat" For Output As #1 Mid$(re3$(1), 2, 9) = Form4.Text1(0) Mid$(re3$(2), 2, 9) = Form4.Text1(1) Mid$(re3$(3), 2, 9) = Form4.Text1(2) Mid$(re3$(4), 2, 9) = Form4.Text1(3) For i = 1 To 7 Print #1, re3$(i) Next i Close Unload Form4 Form1.Show End Sub Private Sub mn12_Click() Unload Form4 Form1.Show End Sub VERSION 2.00 Begin Form Form5 ClientHeight = 4020 ClientLeft = 1395 ClientTop = 1770 ClientWidth = 7050 FontBold = -1 'True FontItalic = 0 'False FontName = "Symbol" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 4710 Left = 1335 LinkTopic = "Form5" ScaleHeight = 4020 ScaleWidth = 7050 Top = 1140 Width = 7170 Begin Menu exit Caption = "&Exit" End End VERSION 5.00 Begin VB.Form Form6 Appearance = 0 'Flat BackColor = &H00E0FFF0& Caption = "View Demand Graphics" ClientHeight = 5445 ClientLeft = 585 ClientTop = 1470 ClientWidth = 8205 BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000008& LinkTopic = "Form6" PaletteMode = 1 'UseZOrder ScaleHeight = 5445 ScaleWidth = 8205 Begin VB.Menu mn1 Caption = "&View" Begin VB.Menu mn11 Caption = "&Next (or Start)" End Begin VB.Menu mn12 Caption = "&Skip to System Total" End Begin VB.Menu mn13 Caption = "&Exit" End End End Attribute VB_Name = "Form6" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub mn11_Click() 'PLOT4 - (C) microMETER - 19/20/95 GR = GR + 1 If GR = 78 Then GR = 61: GoTo L1 If GR = 58 Then GR = 41: GoTo L1 If GR = 38 Then GR = 21: GoTo L1 If GR = 18 Then GR = 1 L1: Form6.Show fil0$ = filename$ + "MICRO.TXT" fil1$ = filename$ + "CT.DAT" fil2$ = filename$ + "USAGE.DTE" Static lab$(17), ct(17), pf(17), lv(17), kw(17), kv(17) lab$(17) = " System Total " Open fil0$ For Input As #1 Line Input #1, Title$ Close Open fil1$ For Input As #1 For i = 1 To 16 Line Input #1, rec$ lab$(i) = Mid$(rec$, 1, 25) ct(i) = Val(Mid$(rec$, 27, 4)) pf(i) = Val(Mid$(rec$, 32, 4)) lv(i) = Val(Mid$(rec$, 37, 3)) kw(i) = ct(i) * pf(i) * lv(i) / 1000 kv(i) = ct(i) * lv(i) / 1000 Next i Close TL1$ = " 3p 4p 5p 6p 7p 8p 9p 10 11 12 1a 2a 3a 4a 5a 6a 7a 8a 9a 10 11 12 1p 2p" TL2$ = TL1$ + TL1$ + TL1$ Open fil2$ For Input As #1 Line Input #1, udte$ Close disp = Val(Mid$(udte$, 1, 2)) dis2 = 3 * disp + 29 TL3$ = Mid$(TL2$, dis2, 72) Cls For ii = 1 To 16 ct(17) = ct(17) + ct(ii) kw(17) = kw(17) + kw(ii) kv(17) = kv(17) + kv(ii) Next ii pf(17) = 1 If kv(17) <> 0 Then pf(17) = kw(17) / kv(17) ii = GR jj = GR km = 0: ka = 0: kc = 0 FF = 1 If ii > 20 Then ii = ii - 20: FF = 520 / 96 If ii > 20 Then ii = ii - 20: FF = 2 * FF If ii > 20 Then ii = ii - 20: FF = 2 * FF Print Title$ mm = kw(ii) If ii < 17 And FF = 1 Then Print mm If ii = 17 Or FF > 1 Then Print " ." For i = 1 To 6: Print " .": Next i Print " K." Print " i." Print " l." Print " o." Print " ." Print " w." Print " a." Print " t." Print " t." Print " s." For i = 1 To 6: Print " .": Next i For i = 1 To 1: Print " ": Next i Print " " + TL3$ Print " " Close If jj < 2 Then file$ = filename$ + "USAGE.P01" If jj = 2 Then file$ = filename$ + "USAGE.P02" If jj = 3 Then file$ = filename$ + "USAGE.P03" If jj = 4 Then file$ = filename$ + "USAGE.P04" If jj = 5 Then file$ = filename$ + "USAGE.P05" If jj = 6 Then file$ = filename$ + "USAGE.P06" If jj = 7 Then file$ = filename$ + "USAGE.P07" If jj = 8 Then file$ = filename$ + "USAGE.P08" If jj = 9 Then file$ = filename$ + "USAGE.P09" If jj = 10 Then file$ = filename$ + "USAGE.P10" If jj = 11 Then file$ = filename$ + "USAGE.P11" If jj = 12 Then file$ = filename$ + "USAGE.P12" If jj = 13 Then file$ = filename$ + "USAGE.P13" If jj = 14 Then file$ = filename$ + "USAGE.P14" If jj = 15 Then file$ = filename$ + "USAGE.P15" If jj = 16 Then file$ = filename$ + "USAGE.P16" If jj > 16 Then file$ = filename$ + "USAGE.P17" If jj = 21 Then file$ = filename$ + "DEM15.P01" If jj = 22 Then file$ = filename$ + "DEM15.P02" If jj = 23 Then file$ = filename$ + "DEM15.P03" If jj = 24 Then file$ = filename$ + "DEM15.P04" If jj = 25 Then file$ = filename$ + "DEM15.P05" If jj = 26 Then file$ = filename$ + "DEM15.P06" If jj = 27 Then file$ = filename$ + "DEM15.P07" If jj = 28 Then file$ = filename$ + "DEM15.P08" If jj = 29 Then file$ = filename$ + "DEM15.P09" If jj = 30 Then file$ = filename$ + "DEM15.P10" If jj = 31 Then file$ = filename$ + "DEM15.P11" If jj = 32 Then file$ = filename$ + "DEM15.P12" If jj = 33 Then file$ = filename$ + "DEM15.P13" If jj = 34 Then file$ = filename$ + "DEM15.P14" If jj = 35 Then file$ = filename$ + "DEM15.P15" If jj = 36 Then file$ = filename$ + "DEM15.P16" If jj > 36 Then file$ = filename$ + "DEM15.P17" If jj = 41 Then file$ = filename$ + "DEM30.P01" If jj = 42 Then file$ = filename$ + "DEM30.P02" If jj = 43 Then file$ = filename$ + "DEM30.P03" If jj = 44 Then file$ = filename$ + "DEM30.P04" If jj = 45 Then file$ = filename$ + "DEM30.P05" If jj = 46 Then file$ = filename$ + "DEM30.P06" If jj = 47 Then file$ = filename$ + "DEM30.P07" If jj = 48 Then file$ = filename$ + "DEM30.P08" If jj = 49 Then file$ = filename$ + "DEM30.P09" If jj = 50 Then file$ = filename$ + "DEM30.P10" If jj = 51 Then file$ = filename$ + "DEM30.P11" If jj = 52 Then file$ = filename$ + "DEM30.P12" If jj = 53 Then file$ = filename$ + "DEM30.P13" If jj = 54 Then file$ = filename$ + "DEM30.P14" If jj = 55 Then file$ = filename$ + "DEM30.P15" If jj = 56 Then file$ = filename$ + "DEM30.P16" If jj > 56 Then file$ = filename$ + "DEM30.P17" If jj = 61 Then file$ = filename$ + "DEM60.P01" If jj = 62 Then file$ = filename$ + "DEM60.P02" If jj = 63 Then file$ = filename$ + "DEM60.P03" If jj = 64 Then file$ = filename$ + "DEM60.P04" If jj = 65 Then file$ = filename$ + "DEM60.P05" If jj = 66 Then file$ = filename$ + "DEM60.P06" If jj = 67 Then file$ = filename$ + "DEM60.P07" If jj = 68 Then file$ = filename$ + "DEM60.P08" If jj = 69 Then file$ = filename$ + "DEM60.P09" If jj = 70 Then file$ = filename$ + "DEM60.P10" If jj = 71 Then file$ = filename$ + "DEM60.P11" If jj = 72 Then file$ = filename$ + "DEM60.P12" If jj = 73 Then file$ = filename$ + "DEM60.P13" If jj = 74 Then file$ = filename$ + "DEM60.P14" If jj = 75 Then file$ = filename$ + "DEM60.P15" If jj = 76 Then file$ = filename$ + "DEM60.P16" If jj > 76 Then file$ = filename$ + "DEM60.P17" Open file$ For Input As #1 L0: Input #1, A ' amps already has been multiplied by lv/120 in usag2 k = A If GR < 20 Then k = A * pf(ii) * 120 / 1000 If k > 0 Then ka = ka + k: kc = kc + 1 If k > km Then km = k If EOF(1) = 0 Then GoTo L0 Close 'end autoscale, start plot If kc > 0 Then ka = ka / kc 'Print " Max KW = "; Int(km * 100) / 100 + " " + lab$(ii) + " " + Mid$(udte$, 10, 10) + " Avg oper KW = " + Str$(Int(ka * 100) / 100) If ii < 17 And GR < 20 Then km = kw(ii) sf = 1 If km > 0 Then sf = 4300 / km If GR > 19 And km > 1 Then sf = sf * 7 Open file$ For Input As #1 xx = 250 yy = 4650 Line -(xx, yy), QBColor(15) L2: If EOF(1) <> 0 Then GoTo L3 i = i + 1 Input #1, A k = A * pf(ii) * 120 / 1000 E = 4650 - Int(k * sf) j = i * 12 * FF + 250 Line -(j, E), QBColor(0) GoTo L2 L3: Close End Sub Private Sub mn12_Click() If GR < 16 Then GR = 16: GoTo SM12 If GR < 36 Then GR = 36: GoTo SM12 If GR < 56 Then GR = 56: GoTo SM12 If GR < 76 Then GR = 76: GoTo SM12 SM12: End Sub Private Sub mn13_Click() GR = 0 Unload Form6 Form1.Show End Sub Attribute VB_Name = "MODULE11" Global filename$ Global re2$(16) Global re3$(16) Global SW, SC2, SC3, TA3 Global ii Global CS, CAP24 Global GR Global SS$ Global PRICE Global Comm1_DataStr, Comm1_Comport, Comm1_Enable