DECLARE SUB bllogcalc (logfile$) DECLARE SUB imaggetiav (imag!, simag!) DECLARE SUB imagramp (imagtest!) DECLARE SUB muxsetchan (chan$) DECLARE SUB vtautogain () DECLARE SUB vtgetvthar1 (rotdir$, vtmag!, vtphase!) DECLARE SUB dpolcheckpar (ok$) DECLARE SUB dpoldatbl (datfile$, bl!, sbl!, th!, sth!) DECLARE SUB dpoldatblvsi (datfile$, imag!, simag!, bl!, sbl!, tf!, stf!) DECLARE SUB dpolgetbl (bl!, th!) DECLARE SUB dpolgetblav (bl!, sbl!, th!, sth!) DECLARE SUB dpollogbl (logfile$, coilconst!, vt1!, vtphase!, bl!, th!) DECLARE SUB dpollogblav (logfile$, bl!, sbl!, th!, sth!) DECLARE SUB dpollogcalc (logfile$) DECLARE SUB dpollogstrmeas (logfile$) DECLARE SUB dpolpltbl (pltfile$, bl!, sbl!, th!, sth!) DECLARE SUB dpolpltblvsi (pltfile$, imag!, bl!, sbl!, tf!, stf!) DECLARE SUB blcalcratio (nh%, bln!(), sbln!(), nmain%, rn!(), srn!()) DECLARE SUB bldatblhar (datfile$, nmain%, nh%, bln!(), sbln!(), thn!(), sthn!(), r!(), sr!()) DECLARE SUB bldatblvsihar (datfile$, imag!, simag!, nmain%, nh%, bln!(), sbln!(), thn!(), sthn!(), r!(), sr!()) DECLARE SUB blgetblnav (coilconfig$, nh%, bln!(), sbln!(), thn!(), sthn!()) DECLARE SUB blpltblhar (pltfile$, nh%, rn!(), srn!()) DECLARE SUB blpltblvsihar (pltfile$, legend$, nh%, rn!(), srn!()) DECLARE SUB pmtdattslice (logfile$, name1$, t1!, name2$, t2!, name3$, t3!) DECLARE SUB pmtgettslice (pmt1nameP$, t1!, pmt2nameP$, t2!, pmt3nameP$, t3!) DECLARE SUB filenewpage (filename$) '**************************************************************************** 'Module DPOL.BAS ' 'These subroutines perform calculations related to dipole magnet 'measurements. ' 'Zachary Wolf '11/25/95 '**************************************************************************** 'Put the required parameters for this module in a common block COMMON SHARED /dpol/ logfileP$, strdatfileP$, strpltfileP$, hardatfileP$, harpltfileP$, magnameP$, runP$, strdpolcoilconstP!, blnmeasaveP%, nimagtestP%, imagtestP!(), imagharflagP!(), nhardisplayP% SUB dpolcheckpar (ok$) '**************************************************************************** 'This subroutine checks that all required parameters have been assigned 'values. ' 'Output: ' ok$, "y" if parameter assignments are ok, "n" otherwise ' 'Zachary Wolf '9/18/95 '**************************************************************************** 'Default value ok$ = "n" 'Files IF logfileP$ = "" OR strdatfileP$ = "" OR strpltfileP$ = "" OR hardatfileP$ = "" OR harpltfileP$ = "" THEN PRINT "DPOL: required file not defined" EXIT SUB END IF 'Runinfo IF magnameP$ = "" OR runP$ = "" THEN PRINT "DPOL: required run parameter not defined" EXIT SUB END IF 'Coil IF strdpolcoilconstP! <= 0 THEN PRINT "DPOL: required coil parameter not defined" EXIT SUB END IF 'Measurement parameters IF blnmeasaveP% <= 0 OR nhardisplayP% <= 0 OR nimagtestP% <= 0 THEN PRINT "DPOL: required measurement parameter not defined" EXIT SUB END IF 'If we made it this far, all parameters have values ok$ = "y" END SUB SUB dpoldatbl (datfile$, bl!, sbl!, th!, sth!) '**************************************************************************** 'This subroutine writes a BL measurement to the data file. ' 'Input: ' datfile$, the name of the data file ' bl!, the integrated field strength at the measured current ' sbl!, the standard deviation of BL ' th!, south pole angle (deg) ' sth!, rms variation of TH ' 'Zachary Wolf '11/19/95, 10/23/96 '**************************************************************************** 'Keep track of Ncall so a header can be written on the first call STATIC ncall% ncall% = ncall% + 1 'Open the log file filenum% = FREEFILE OPEN datfile$ FOR APPEND AS filenum% 'On the first call, write a header for the hysteresis loop IF ncall% = 1 THEN ' PRINT #filenum%, ' PRINT #filenum%, ' PRINT #filenum%, " Coil Constant = "; strdpolcoilconstP!; " 1/m" PRINT #filenum%, PRINT #filenum%, PRINT #filenum%, "INTEGRATED FIELD STRENGTH AND SOUTH POLE ANGLE" PRINT #filenum%, PRINT #filenum%, " BL sigBL TH sTH " PRINT #filenum%, " (Tm) (Tm) (deg) (deg) " PRINT #filenum%, "------------+------------ --------+--------" END IF 'Write the result PRINT #filenum%, USING "#.######^^^^"; bl!; PRINT #filenum%, USING " #.######^^^^"; sbl!; PRINT #filenum%, USING " ####.###"; th!; PRINT #filenum%, USING " ####.###"; sth! 'Close the log file CLOSE filenum% END SUB SUB dpoldatblvsi (datfile$, imag!, simag!, bl!, sbl!, tf!, stf!) '**************************************************************************** 'This subroutine writes a BL measurement at Imag to the data file. ' 'Input: ' datfile$, the name of the data file ' imag!, the measured current ' simag!, the standard deviation of imag ' bl!, the integrated field strength at the measured current ' sbl!, the standard deviation of BL ' tf!, BL/I ' stf!, the standard deviation of TF ' 'Zachary Wolf '11/19/95 '**************************************************************************** 'Keep track of Ncall so a header can be written on the first call STATIC ncall% ncall% = ncall% + 1 'Open the log file filenum% = FREEFILE OPEN datfile$ FOR APPEND AS filenum% 'On the first call, write a header for the hysteresis loop IF ncall% = 1 THEN PRINT #filenum%, PRINT #filenum%, PRINT #filenum%, PRINT #filenum%, " INTEGRATED FIELD STRENGTH VS CURRENT" PRINT #filenum%, PRINT #filenum%, " Imag sigImag BL sigBL BL/I sigBL/I " PRINT #filenum%, " (A) (A) (Tm) (Tm) (Tm/kA) (Tm/kA) " PRINT #filenum%, "--------+-------- --------+-------- --------+--------" END IF 'Write the result PRINT #filenum%, USING "####.###"; imag!; PRINT #filenum%, USING " ####.###"; simag!; PRINT #filenum%, USING " ##.#####"; bl!; PRINT #filenum%, USING " ##.#####"; sbl!; PRINT #filenum%, USING " ###.####"; tf! * 1000!; PRINT #filenum%, USING " ###.####"; stf! * 1000! 'Close the log file CLOSE filenum% END SUB SUB dpolgetbl (bl!, th!) '**************************************************************************** 'This subroutine calculates the integrated dipole strength from the 'measured coil voltage at the first harmonic. ' 'Output: ' bl!, the integrated field strength (Tm) ' th!, south pole angle (deg) ' 'Zachary Wolf '11/19/95, 10/23/96 '**************************************************************************** 'Make sure all parameters have been defined with acceptable values CALL dpolcheckpar(ok$) IF ok$ <> "y" THEN EXIT SUB 'Calculation Of BL: 'VT1 = Nturns * B * L * Width ' = BL * (N * R + N * R) 'N at R and N at -R ' = BL * N * 2 * R 'BL = VT1 / (N * 2 * R) 'BL = CoilConst * VT1 'Calculation Of TH: '-sin[n (th - TH)] = cos(n th + vtphase) ' = -sin(n th + vtphase - pi/2) '-n TH = vtphase - pi/2 'TH = -(vtphase - pi/2) / n 'Get the coil integrated voltage at the first harmonic CALL vtgetvthar1("+", vtmagpos!, vtphasepos!) CALL vtgetvthar1("-", vtmagneg!, vtphaseneg!) vtmag! = (vtmagpos! + vtmagneg!) / 2! vtphase! = (vtphasepos! + vtphaseneg!) / 2! 'Compute BL bl! = strdpolcoilconstP! * vtmag! 'Compute TH th! = -(vtphase! - 90!) / 1! 'Log the result CALL dpollogbl(logfileP$, strdpolcoilconstP!, vtmag!, vtphase!, bl!, th!) END SUB SUB dpolgetblav (bl!, sbl!, th!, sth!) '**************************************************************************** 'This subroutine has BL and TH measured several times, then it computes the 'average and rms variation. ' 'Output: ' bl!, average of the BL measurements ' sbl!, rms variation of the BL measurements ' th!, angle of the first south pole ' sth!, rms variation of the TH measurements ' 'Zachary Wolf '11/21/95, 10/23/96 '**************************************************************************** 'Make sure all parameters have been defined with acceptable values CALL dpolcheckpar(ok$) IF ok$ <> "y" THEN EXIT SUB 'Log that a strength measurement is being made CALL dpollogstrmeas(logfileP$) 'Simplify the notation nm% = blnmeasaveP% 'Initialize data arrays DIM blmeas!(1 TO nm%) DIM thmeas!(1 TO nm%) 'Message about the measurement number PRINT PRINT "Performing BL measurement #"; 'Loop over the measurements FOR i% = 1 TO nm% 'Message about the measurement number PRINT USING " #"; i%; 'Measure BL CALL dpolgetbl(bl!, th!) 'Store the results blmeas!(i%) = bl! thmeas!(i%) = th! 'End the loop over the measurements NEXT i% 'End message info PRINT 'Compute BL average bl! = 0! FOR i% = 1 TO nm% bl! = bl! + blmeas!(i%) NEXT i% bl! = bl! / nm% 'Compute BL rms deviation sbl! = 0! FOR i% = 1 TO nm% sbl! = sbl! + (blmeas!(i%) - bl!) ^ 2 NEXT i% sbl! = SQR(sbl! / nm%) 'Compute TH average th! = 0! FOR i% = 1 TO nm% th! = th! + thmeas!(i%) NEXT i% th! = th! / nm% 'Compute TH rms deviation sth! = 0! FOR i% = 1 TO nm% sth! = sth! + (thmeas!(i%) - th!) ^ 2 NEXT i% sth! = SQR(sth! / nm%) 'Print the result to the screen PRINT "Integrated Field Strength BL = "; bl!; " +- "; sbl!; " Tm" PRINT "South Pole Angle TH = "; th!; " +- "; sth!; " deg" 'Log the result CALL dpollogblav(logfileP$, bl!, sbl!, th!, sth!) END SUB SUB dpollogbl (logfile$, coilconst!, vt1!, vtphase!, bl!, th!) '**************************************************************************** 'This subroutine writes a summary of an average BL measurement to the log file. ' 'Input: ' logfile$, the name of the log file ' coilconst!, coil constant ' vt1!, coil integrated voltage at the first harmonic ' vtphase!, coil integrated voltage phase angle (deg) ' bl!, integrated field strength ' th!, south pole angle (deg) ' 'Zachary Wolf '11/19/95 '**************************************************************************** 'Open the log file filenum% = FREEFILE OPEN logfile$ FOR APPEND AS filenum% 'Print the results PRINT #filenum%, TIME$; " Integrated Field Strength Measurement:" PRINT #filenum%, " CoilConst = "; coilconst!; " 1/m" PRINT #filenum%, " VT1 = "; vt1!; " Vs, VTphase = "; vtphase!; " deg" PRINT #filenum%, " BL = "; bl!; " Tm, TH = "; th!; " deg" 'Close the log file CLOSE filenum% END SUB SUB dpollogblav (logfile$, bl!, sbl!, th!, sth!) '**************************************************************************** 'This subroutine writes a summary of an average BL measurement to the log file. ' 'Input: ' logfile$, the name of the log file ' bl!, the average of the integrated field strength measurements ' sbl!, the rms variation of bl ' th!, the average of the field angle measurements ' sth!, the rms variation of th ' 'Zachary Wolf '11/19/95, 10/23/96 '**************************************************************************** 'Open the log file filenum% = FREEFILE OPEN logfile$ FOR APPEND AS filenum% 'Print the results PRINT #filenum%, TIME$; " Average Integrated Field Strength:" PRINT #filenum%, " BL = "; bl!; " +- "; sbl!; " Tm" PRINT #filenum%, " TH = "; th!; " +- "; sth!; " deg" 'Close the log file CLOSE filenum% END SUB SUB dpollogcalc (logfile$) '**************************************************************************** 'This subroutine summarizes the calculations used in the program. ' 'Inputs: ' logfile$, the name of the log file ' 'Zachary Wolf '9/22/94, 12/3/94 '**************************************************************************** 'Open the log file filenum% = FREEFILE OPEN logfile$ FOR APPEND AS filenum% 'Header PRINT #filenum%, PRINT #filenum%, " SUMMARY OF THE CALCULATIONS AND CONVENTIONS USED" 'Summarize the calculations used for BL vs I PRINT #filenum%, PRINT #filenum%, PRINT #filenum%, "Calculation Of BL:" PRINT #filenum%, "V1 = Nturns * velocity * B * L" PRINT #filenum%, " = Nturns * Rcoil * ang_freq * BL" PRINT #filenum%, "BL = V1 / (Nturns * Rcoil * ang_freq)" PRINT #filenum%, "For a double coil (for coil bowing correction)," PRINT #filenum%, "BL = ( (1 / Nturns * Rcoil)1 + (1 / Nturns * Rcoil)2 ) * (V1 / ang_freq)" PRINT #filenum%, "Let CoilConst = ( (1 / Nturns * Rcoil)1 + (1 / Nturns * Rcoil)2 )" PRINT #filenum%, "BL = CoilConst * V1 / ang_freq" 'Harmonics PRINT #filenum%, PRINT #filenum%, PRINT #filenum%, "Calculation Of The Harmonics:" PRINT #filenum%, "Magnitude, harmonic n:" PRINT #filenum%, "Vn = Nturns * velocity * Bn * L" PRINT #filenum%, " = Nturns * Rcoil * ang_freq * (BLn)" PRINT #filenum%, "BLn = Vn / (Nturns * Rcoil * ang_freq)" PRINT #filenum%, "Rn = BLn / BL1 = Vn / V1" PRINT #filenum%, PRINT #filenum%, "Phase, harmonic n:" PRINT #filenum%, "At the coil radius, the radial field as a function of angle is," PRINT #filenum%, "BLn(th) = BLn * cos(n*(th - THspole))" PRINT #filenum%, "The coil voltage Vn(th) = Nturns * velocity * BLn(th)" PRINT #filenum%, "Vn(th) = Nturns * Rcoil * ang_freq * BLn * cos(n*(th - THspole))" PRINT #filenum%, "The FFT gives Vn and PhiVn in the formula" PRINT #filenum%, "Vn(i) = Vn * cos(n*2pi*i/N + PhiVn)" PRINT #filenum%, "So, Nturns * Rcoil * ang_freq * BLn = Vn" PRINT #filenum%, " -n * THspole = PhiVn" PRINT #filenum%, "Or, BLn = Vn / (Nturns * Rcoil * ang_freq)" PRINT #filenum%, " THspole = -PhiVn / n" 'Close the log file CLOSE filenum% END SUB SUB dpollogstrmeas (logfile$) '**************************************************************************** 'This subroutine records a measurement to the log file. ' 'Input: ' logfile$, the name of the log file ' 'Zachary Wolf '11/25/95 '**************************************************************************** 'Open the log file filenum% = FREEFILE OPEN logfile$ FOR APPEND AS filenum% 'Print the results PRINT #filenum%, PRINT #filenum%, TIME$; " Magnet Strength Measurement..." 'Close the log file CLOSE filenum% END SUB SUB dpolmainbl '**************************************************************************** 'This subroutine controls the magnetic measurements of a dipole magnet. ' 'Zachary Wolf '1/4/95, 5/6/95, 8/18/96 '**************************************************************************** 'Make sure all parameters have been defined with acceptable values CALL dpolcheckpar(ok$) IF ok$ <> "y" THEN EXIT SUB 'Measure all temperatures CALL pmtgettslice(name1$, t1!, name2$, t2!, name3$, t3!) CALL pmtdattslice(strdatfileP$, name1$, t1!, name2$, t2!, name3$, t3!) CALL pmtdattslice(hardatfileP$, name1$, t1!, name2$, t2!, name3$, t3!) 'Message PRINT PRINT "Beginning the dipole field measurement cycle..." 'Simplify the notation nh% = nhardisplayP% 'Initialize data arrays DIM bln!(1 TO nh%) 'field strength at Rcoil of the n'th harmonic DIM sbln!(1 TO nh%) 'standard deviation of Bn DIM thn!(1 TO nh%) 'field angle DIM sthn!(1 TO nh%) 'standard deviation of THn DIM rn!(1 TO nh%) 'BLn/BL1 DIM srn!(1 TO nh%) 'standard deviation of rn 'Strength 'Message PRINT PRINT "Measuring the dipole strength..." 'Connect the dipole coil to the integrator CALL muxsetchan("dipole") 'Set the integrator gain CALL vtautogain 'Get the integrated field strength CALL dpolgetblav(bl!, sbl!, th!, sth!) 'Write the strength measurement to the data file CALL dpoldatbl(strdatfileP$, bl!, sbl!, th!, sth!) 'Write the strength measurement to the plot file CALL dpolpltbl(strpltfileP$, bl!, sbl!, th!, sth!) 'Harmonics 'Message PRINT PRINT "Measure BL1 with the main winding..." 'Connect the main coil to the integrator CALL muxsetchan("main") 'Set the integrator gain CALL vtautogain 'Get the field harmonics at the coil radius CALL blgetblnav("main", nh%, bln!(), sbln!(), thn!(), sthn!()) 'Keep the dipole terms bl1! = bln!(1) sbl1! = sbln!(1) th1! = thn!(1) sth1! = sthn!(1) 'Message PRINT PRINT "Measure BLn with the bucking winding..." 'Connect the main + dipole bucking coil to the integrator CALL muxsetchan("dbuck") 'Set the integrator gain CALL vtautogain 'Get the field harmonics at the coil radius CALL blgetblnav("dbuck", nh%, bln!(), sbln!(), thn!(), sthn!()) 'Fill in the dipole terms from using the main winding bln!(1) = bl1! sbln!(1) = sbl1! thn!(1) = th1! sthn!(1) = sth1! 'Compute the strength ratios of the harmonics CALL blcalcratio(nh%, bln!(), sbln!(), nmain%, rn!(), srn!()) 'Write the harmonics to the data file CALL bldatblhar(hardatfileP$, nmain%, nh%, bln!(), sbln!(), thn!(), sthn!(), rn!(), srn!()) 'Write the harmonics to the plot file CALL blpltblhar(harpltfileP$, nh%, rn!(), srn!()) 'Measure all temperatures again, after the coil measurements CALL pmtgettslice(name1$, t1!, name2$, t2!, name3$, t3!) CALL pmtdattslice(strdatfileP$, name1$, t1!, name2$, t2!, name3$, t3!) CALL pmtdattslice(hardatfileP$, name1$, t1!, name2$, t2!, name3$, t3!) 'Write a summary of the calculations to the BL data file CALL bllogcalc(strdatfileP$) 'Write a summary of the calculations to the harmonics data file CALL bllogcalc(hardatfileP$) END SUB SUB dpolmainblvsi '**************************************************************************** 'This subroutine controls the magnetic measurements of a dipole at 'various currents. ' 'Zachary Wolf '1/4/95, 5/6/95 '**************************************************************************** 'Make sure all parameters have been defined with acceptable values CALL dpolcheckpar(ok$) IF ok$ <> "y" THEN EXIT SUB 'Message PRINT PRINT "Beginning the dipole field measurement cycle..." 'Simplify the notation ni% = nimagtestP% nh% = nhardisplayP% 'Initialize data arrays DIM bln!(1 TO nh%) 'field strength at Rcoil of the n'th harmonic DIM sbln!(1 TO nh%) 'standard deviation of Bn DIM thn!(1 TO nh%) 'field angle DIM sthn!(1 TO nh%) 'standard deviation of THn DIM rn!(1 TO nh%) 'BLn/BL1 DIM srn!(1 TO nh%) 'standard deviation of rn 'Loop over test currents FOR i% = 1 TO ni% 'Ramp to the desired current CALL imagramp(imagtestP!(i%)) 'Measure the current CALL imaggetiav(imag!, simag!) 'Connect the dipole coil to the integrator CALL muxsetchan("dipole") 'Set the integrator gain CALL vtautogain 'Get the integrated field strength CALL dpolgetblav(bl!, sbl!, th!, sth!) 'Compute the transfer function tf! = bl! / imag! stf! = tf! * SQR((sbl! / bl!) ^ 2 + (simag! / imag!) ^ 2) 'Write the strength measurement to the data file CALL dpoldatblvsi(strdatfileP$, imag!, simag!, bl!, sbl!, tf!, stf!) 'Write the strength measurement to the plot file CALL dpolpltblvsi(strpltfileP$, imag!, bl!, sbl!, tf!, stf!) 'Do the following only if the harmonics are desired IF imagharflagP!(i%) > 0 THEN 'Connect the main coil to the integrator CALL muxsetchan("main") 'Set the integrator gain CALL vtautogain 'Get the field harmonics at the coil radius CALL blgetblnav("main", nh%, bln!(), sbln!(), thn!(), sthn!()) 'Compute the strength ratios of the harmonics CALL blcalcratio(nh%, bln!(), sbln!(), nmain%, rn!(), srn!()) 'Write the harmonics to the data file CALL bldatblvsihar(hardatfileP$, imag!, simag!, nmain%, nh%, bln!(), sbln!(), thn!(), sthn!(), rn!(), srn!()) 'Write the harmonics to the plot file legend$ = "I = " + STR$(imagtestP!(i%)) + " A" CALL blpltblvsihar(harpltfileP$, legend$, nh%, rn!(), srn!()) 'End harmonics check END IF 'End loop over currents NEXT i% 'Write a summary of the calculations to the BL data file CALL filenewpage(strdatfileP$) CALL dpollogcalc(strdatfileP$) 'Write a summary of the calculations to the harmonics data file CALL filenewpage(hardatfileP$) CALL dpollogcalc(hardatfileP$) END SUB SUB dpolpltbl (pltfile$, bl!, sbl!, th!, sth!) '**************************************************************************** 'This subroutine write a summary of the BL measurements for plotting. ' 'Input: ' pltfile$, the name of the plot file ' bl!, the integrated field strength at the measured current ' sbl!, the standard deviation of bl ' th!, south pole angle (deg) ' sth!, rms variation of TH ' 'Zachary Wolf '11/19/95, 10/23/96 '**************************************************************************** 'Keep track of Ncall for the header STATIC ncall% ncall% = ncall% + 1 'Open the plot file filenum% = FREEFILE OPEN pltfile$ FOR APPEND AS filenum% 'Write the title for plotting on the first call IF ncall% = 1 THEN PRINT #filenum%, "/et g '" + magnameP$ + ", Run " + runP$ + "'" PRINT #filenum%, ";bl sbl th sth" END IF 'Write the values PRINT #filenum%, USING " ###.########"; bl!; PRINT #filenum%, USING " ###.########"; sbl!; PRINT #filenum%, USING " ####.#####"; th!; PRINT #filenum%, USING " ####.#####"; sth! 'Close the log file CLOSE filenum% END SUB SUB dpolpltblvsi (pltfile$, imag!, bl!, sbl!, tf!, stf!) '**************************************************************************** 'This subroutine write a summary of the BL vs I measurements for plotting. ' 'Input: ' pltfile$, the name of the plot file ' imag!, the measured current ' bl!, the integrated field strength at the measured current ' sbl!, the standard deviation of bl ' tf!, the transfer function at the measured current ' stf!, the standard deviation of tf ' 'Zachary Wolf '11/19/95 '**************************************************************************** 'Keep track of Ncall for the header STATIC ncall% ncall% = ncall% + 1 'Open the plot file filenum% = FREEFILE OPEN pltfile$ FOR APPEND AS filenum% 'Write the title for plotting on the first call IF ncall% = 1 THEN PRINT #filenum%, "/et g '" + magnameP$ + ", Run " + runP$ + "'" PRINT #filenum%, ";i bl sbl tf stf" END IF 'Write the values PRINT #filenum%, USING "####.#"; imag!; PRINT #filenum%, USING " ##.#####"; bl!; PRINT #filenum%, USING " ##.#####"; sbl!; PRINT #filenum%, USING " ###.#####"; tf!; PRINT #filenum%, USING " ###.#####"; stf! 'Close the log file CLOSE filenum% END SUB SUB dpolsetpar (logfile$, strdatfile$, strpltfile$, hardatfile$, harpltfile$, magname$, run$, strdpolcoilconst!, blnmeasave%, nimagtest%, imagtest!(), imagharflag!(), nhardisplay%) '**************************************************************************** 'This subroutine sets the parameters required by this module. ' 'Input: ' logfile$, path and name of the log file ' strdatfile$, magnet strength data file ' strpltfile$, magnet strength plot file ' hardatfile$, harmonics data file ' harpltfile$, harmonics plot file ' magname$, magnet name ' run$, run number ' strdpolcoilconst!, strength coil dipole coil constant ' blnmeasave%, number of measurements for averaging ' nimagtest%, number of test currents ' imagtest!(), test currents ' imagharflag!(), flag for harmonics measurement ' nhardisplay%, number of harmonics to record ' 'Zachary Wolf '11/20/95 '**************************************************************************** 'Set the parameters logfileP$ = logfile$ strdatfileP$ = strdatfile$ strpltfileP$ = strpltfile$ hardatfileP$ = hardatfile$ harpltfileP$ = harpltfile$ magnameP$ = magname$ runP$ = run$ strdpolcoilconstP! = strdpolcoilconst! blnmeasaveP% = blnmeasave% nimagtestP% = nimagtest% DIM imagtestP!(1 TO nimagtestP%) DIM imagharflagP!(1 TO nimagtestP%) FOR i% = 1 TO nimagtestP% imagtestP!(i%) = imagtest!(i%) imagharflagP!(i%) = imagharflag!(i%) NEXT i% nhardisplayP% = nhardisplay% END SUB