DECLARE SUB gettestparam () DECLARE SUB rt () DECLARE SUB imagramp (inom!) DECLARE SUB fileheaderii (logfile$, mn$, pr$, op$, ts$, dv$, rn$, cm$, n1%, i1!(), n2%, i2!()) DECLARE SUB fileinitldp (magname$, run$, test$, logfile$, datfile$, pltfile$, ok$) DECLARE SUB gpibinit () DECLARE SUB dac488hrinit () DECLARE SUB dac488hrsetupv1 () DECLARE SUB hp3457init () DECLARE SUB k7011init () '**************************************************************************** 'Program ALINERT 'This program is used to make resistance and temperature measurements 'on the A-Line magnets. ' 'Zachary Wolf '3/23/95 '**************************************************************************** 'Include the constants used in the program REM $INCLUDE: 'param.inc' 'Prepare the screen CLS 'Initialize the GPIB CALL gpibinit 'Initialize the DAC CALL dac488hrinit CALL dac488hrsetupv1 'Initialize the HP3457 CALL hp3457init 'Initialize the K7011 CALL k7011init 'Print a message about the program PRINT PRINT "Program ALINERT" PRINT "This program measures the resistance and temperature of the" PRINT "A-Line dipoles as a function of time for a given current." 'Get test parameters from the operator testparam: CALL gettestparam 'Initialize the log, data, and plot files CALL fileinitldp(magnameP$, runP$, "rt", logfileP$, datfileP$, pltfileP$, ok$) IF ok$ <> "y" THEN PRINT PRINT "Problem initializing the data files." PRINT "Make sure you are using a new run number." GOTO testparam: END IF 'Write headers to the log and data files CALL fileheaderii(logfileP$, magnameP$, projectP$, operatorP$, teststandP$, coilP$, runP$, commentP$, nimagstandP%, imagstandP!(), nimagblP%, imagblP!()) CALL fileheaderii(datfileP$, magnameP$, projectP$, operatorP$, teststandP$, coilP$, runP$, commentP$, nimagstandP%, imagstandP!(), nimagblP%, imagblP!()) 'Standardize the magnet 'CALL imagstandardize 'Do the measurements CALL rt 'Ramp to 0 amps CALL imagramp(0!) 'Message PRINT "The test is complete." END SUB gettestparam '**************************************************************************** 'This subroutine prompts the operator for the magnet name and other 'parameters of the test. ' 'Outputs put in the /testparam/ common block: ' magnameP$, name of magnet ' operatorP$, name of the operator doing the test ' runP$, run number ' commentP$, comment about the test ' 'Zachary Wolf '11/25/94 '**************************************************************************** begin: 'Get the name of the magnet PRINT PRINT "What is the name of the magnet?" PRINT "(8 characters or less): ["; magnameP$; "]"; INPUT magname$ magname$ = UCASE$(magname$) IF magname$ <> "" THEN magnameP$ = magname$ 'Get the operator's name(s) PRINT "Enter the operator(s) name(s): ["; operatorP$; "]"; INPUT operator$ IF operator$ <> "" THEN operatorP$ = operator$ 'Get the run number PRINT "What is the run number (1, 2, 3, ...): ["; runP$; "]"; INPUT run$ IF run$ <> "" THEN runP$ = run$ 'Get a comment PRINT "Enter any comment about the run: ["; commentP$; "]"; LINE INPUT comment$ IF comment$ <> "" THEN commentP$ = comment$ 'See if everything was entered correctly PRINT INPUT "Do you wish to make any changes to the values entered (Y or N): ", yn$ IF yn$ = "Y" OR yn$ = "y" THEN GOTO begin END SUB