DECLARE SUB PlotDataHAR (mag$) DECLARE SUB PlotDataRT (mag$) DECLARE SUB PlotDataBL (mag$) DECLARE SUB GetDate (plotdate$) DECLARE SUB GetTime (plottime$) DECLARE SUB PlotData (mag$) 'REFSUM: This program summarizes the measurements made on the ' reference magnet during RT, BL, and HAR runs. ' 'Phil Radusewicz 8/18/94 CALL PlotData(mag$) SUB GetDate (plotdate$) plotdate$ = DATE$ 'Reformat the file date: day$ = MID$(plotdate$, 1, 2) mon$ = MID$(plotdate$, 4, 2) year$ = MID$(plotdate$, 9, 2) plotdate$ = day$ + "/" + mon$ + "/" + year$ END SUB SUB GetTime (plottime$) T$ = TIME$ hr = VAL(T$) IF hr < 12 THEN ampm$ = " AM" ELSE ampm$ = " PM" IF hr > 12 THEN hr = hr - 12 plottime$ = STR$(hr) + RIGHT$(T$, 6) + ampm$ END SUB SUB PlotData (mag$) WHILE type$ <> "4" CLS PRINT PRINT "REFSUM: Plotting program used to examine test history of the" PRINT " REFERENCE MAGNET. The data is a summary taken from the" PRINT " RT, BL, and HAR measurements at 650A." PRINT PRINT "Select data to examine:" PRINT PRINT " 1) Hysteresis Measurements" PRINT " 2) Field Uniformity Measurements" PRINT " 3) Resistance and Temperature Measurements" PRINT " 4) EXIT" PRINT PRINT "Input selection: "; INPUT type$ type$ = UCASE$(type$) IF type$ = "1" THEN CALL PlotDataBL(mag$) IF type$ = "2" THEN CALL PlotDataHAR(mag$) IF type$ = "3" THEN CALL PlotDataRT(mag$) WEND END SUB SUB PlotDataBL (mag$) DIM yname$(8) yname$(1) = "Current (A)" yname$(2) = "Integrated Voltage (Vs)" yname$(3) = "Integral Bdl (Tm)" yname$(4) = "Transfer Function (Tm/kA)" group$ = "Summary File: BLREF.DAT" WHILE selection% <> 6 SHELL "cls" PRINT PRINT "REFSUM: Plot summary of measurements made at 650A on the" PRINT " REFERENCE MAGNET during HYSTERESIS (BL) measurements." PRINT PRINT "Select from the following:" PRINT PRINT " 1) Magnet Current" PRINT " 2) Integrated Voltage" PRINT " 3) Integral Bdl" PRINT " 4) Transfer Function" PRINT " 5) OUTPUT TO PRINTER" PRINT " 6) EXIT" PRINT PRINT "Input Selection: "; INPUT selection% IF selection% = 6 THEN EXIT SUB CALL GetTime(plottime$) CALL GetDate(plotdate$) IF selection% = 1 THEN or$ = "/or y 650.1 650.15" IF selection% = 2 THEN or$ = "/or y 0.9565 0.9570" IF selection% = 3 THEN or$ = "/or y 0.9930 0.9935" IF selection% = 4 THEN or$ = "/or y 1.5275 1.5280" oaas$ = "/oaas y 1,0.0001,5" IF selection% = 1 THEN oaas$ = " " plot% = 0 IF selection% = 5 THEN plot% = 1 PRINT "Input plot to print: "; INPUT selection% END IF offset% = 0 td$ = "ixiiiiiiiii" IF selection% = 2 THEN MID$(td$, 4 + selection%) = "e" IF selection% >= 3 THEN offset% = 1 MID$(td$, 3 + selection% + offset%) = "y" fileout% = FREEFILE outfile$ = "\philr\bfact\batch\epbatch.txt" OPEN outfile$ FOR OUTPUT AS fileout% PRINT #fileout%, "/fpo bg" PRINT #fileout%, "//rem_tmps" PRINT #fileout%, "//abs_err" PRINT #fileout%, "//half_err" PRINT #fileout%, " " IF plot% = 1 THEN PRINT #fileout%, "/fpp ps" PRINT #fileout%, "/ag" PRINT #fileout%, or$ PRINT #fileout%, oaas$ PRINT #fileout%, "/se y on" PRINT #fileout%, "/td ", td$ PRINT #fileout%, "/sc off" PRINT #fileout%, "/ac \philr\bfact\summary\blref.txt" PRINT #fileout%, "/et g 'Reference Magnet Measurements @ 650A: "; PRINT #fileout%, yname$(selection%); "'" PRINT #fileout%, "/et x 'Test Date'" PRINT #fileout%, "/et y "; "'"; yname$(selection%); "'" PRINT #fileout%, USING "/aa 0.02 0.02 'Date/Time: & &"; plotdate$; plottime$; PRINT #fileout%, "' A" PRINT #fileout%, "/aa 0.675 0.02 '"; group$; "' A" PRINT #fileout%, "//wait" IF plot% = 1 THEN PRINT #fileout%, "/fp p" PRINT #fileout%, "/ed g" PRINT #fileout%, "/fq y" CLOSE fileout% SHELL "\easyplot\ep \philr\bfact\batch\epbatch.txt" WEND END SUB SUB PlotDataHAR (mag$) DIM yname$(8) yname$(1) = "Current (A)" yname$(2) = "Integrated Voltage (Vs)" yname$(3) = "Integral Bdl (Tm)" yname$(4) = "Transfer Function (Tm/kA)" group$ = "Summary File: HARREF.TXT" WHILE selection% <> 6 SHELL "cls" PRINT PRINT "REFSUM: Plot summary of measurements made at 650A on the" PRINT " REFERENCE MAGNET during FIELD UNIFORMITY (HAR) measurements." PRINT PRINT "Select from the following:" PRINT PRINT " 1) Magnet Current" PRINT " 2) Integrated Voltage" PRINT " 3) Integral Bdl" PRINT " 4) Transfer Function" PRINT " 5) OUTPUT TO PRINTER" PRINT " 6) EXIT" PRINT PRINT "Input Selection: "; INPUT selection% IF selection% = 6 THEN EXIT SUB CALL GetTime(plottime$) CALL GetDate(plotdate$) IF selection% = 1 THEN or$ = "/or y 650.1 650.15" IF selection% = 2 THEN or$ = "/or y 0.9565 0.9570" IF selection% = 3 THEN or$ = "/or y 0.9930 0.9935" IF selection% = 4 THEN or$ = "/or y 1.5275 1.5280" oaas$ = "/oaas y 1,0.0001,5" IF selection% = 1 THEN oaas$ = " " plot% = 0 IF selection% = 5 THEN plot% = 1 PRINT "Input plot to print: "; INPUT selection% END IF offset% = 0 td$ = "ixiiiiiiiii" IF selection% = 2 THEN MID$(td$, 4 + selection%) = "e" IF selection% >= 3 THEN offset% = 1 MID$(td$, 3 + selection% + offset%) = "y" fileout% = FREEFILE outfile$ = "\philr\bfact\batch\epbatch.txt" OPEN outfile$ FOR OUTPUT AS fileout% PRINT #fileout%, "/fpo bg" PRINT #fileout%, "//rem_tmps" PRINT #fileout%, "//abs_err" PRINT #fileout%, "//half_err" PRINT #fileout%, " " IF plot% = 1 THEN PRINT #fileout%, "/fpp ps" PRINT #fileout%, "/ag" PRINT #fileout%, or$ PRINT #fileout%, oaas$ PRINT #fileout%, "/se y on" PRINT #fileout%, "/td ", td$ PRINT #fileout%, "/sc off" PRINT #fileout%, "/ac \philr\bfact\summary\harref.txt" PRINT #fileout%, "/et g 'Reference Magnet Measurements @ 650A: "; PRINT #fileout%, yname$(selection%); "'" PRINT #fileout%, "/et x 'Test Date'" PRINT #fileout%, "/et y "; "'"; yname$(selection%); "'" PRINT #fileout%, USING "/aa 0.02 0.02 'Date/Time: & &"; plotdate$; plottime$; PRINT #fileout%, "' A" PRINT #fileout%, "/aa 0.675 0.02 '"; group$; "' A" PRINT #fileout%, "//wait" IF plot% = 1 THEN PRINT #fileout%, "/fp p" PRINT #fileout%, "/ed g" PRINT #fileout%, "/fq y" CLOSE fileout% SHELL "\easyplot\ep \philr\bfact\batch\epbatch.txt" WEND END SUB SUB PlotDataRT (mag$) DIM yname$(8) yname$(1) = "Current (A)" yname$(2) = "Magnet Voltage (V)" yname$(3) = "Magnet Resistance (mOhm)" yname$(4) = "Inlet Coolant Temperature (C)" yname$(5) = "Outlet Coolant Temperature (C)" yname$(6) = "Magnet Iron Temperature (C)" yname$(7) = "Measuring Coil Temperature (C)" yname$(8) = "Room Temperature (C)" group$ = "Summary File: HARREF.TXT" WHILE selection% <> 10 SHELL "cls" PRINT PRINT "REFSUM: Plot summary of measurements made at 650A on the" PRINT " REFERENCE MAGNET during FIELD UNIFORMITY (HAR) measurements." PRINT PRINT "Select from the following:" PRINT PRINT " 1) Magnet Current" PRINT " 2) Magnet Voltage" PRINT " 3) Magnet Resistance" PRINT " 4) Inlet Coolant Temperature" PRINT " 5) Outlet Coolant Temperature" PRINT " 6) Magnet Iron Temperature" PRINT " 7) Measuring Coil Temperature" PRINT " 8) Room Temperature" PRINT " 9) OUTPUT TO PRINTER" PRINT " 10) EXIT" PRINT PRINT "Input Selection: "; INPUT selection% IF selection% = 10 THEN EXIT SUB CALL GetTime(plottime$) CALL GetDate(plotdate$) plot% = 0 IF selection% = 9 THEN plot% = 1 PRINT "Input plot to print: "; INPUT selection% END IF td$ = "ixiiiiiiiii" MID$(td$, 3 + selection%) = "y" fileout% = FREEFILE outfile$ = "\philr\bfact\batch\epbatch.txt" OPEN outfile$ FOR OUTPUT AS fileout% PRINT #fileout%, "/fpo bg" PRINT #fileout%, "//rem_tmps" PRINT #fileout%, "//abs_err" PRINT #fileout%, "//half_err" PRINT #fileout%, " " IF plot% = 1 THEN PRINT #fileout%, "/fpp ps" PRINT #fileout%, "/ag" PRINT #fileout%, "/se y on" PRINT #fileout%, "/td ", td$ PRINT #fileout%, "/sc off" PRINT #fileout%, "/ac \philr\bfact\summary\rtref.txt" PRINT #fileout%, "/et g 'Reference Magnet Measurements @ 650A: "; PRINT #fileout%, yname$(selection%); "'" PRINT #fileout%, "/et x 'Test Date'" PRINT #fileout%, "/et y "; "'"; yname$(selection%); "'" PRINT #fileout%, USING "/aa 0.02 0.02 'Date/Time: & &"; plotdate$; plottime$; PRINT #fileout%, "' A" PRINT #fileout%, "/aa 0.675 0.02 '"; group$; "' A" PRINT #fileout%, "//wait" IF plot% = 1 THEN PRINT #fileout%, "/fp p" PRINT #fileout%, "/ed g" PRINT #fileout%, "/fq y" CLOSE fileout% SHELL "\easyplot\ep \philr\bfact\batch\epbatch.txt" WEND END SUB