DECLARE SUB vaximagramp (imag!) DECLARE SUB blmeasbl (imag!, simag!, vt!, svt!, bl!, sbl!, tf!, stf!) DECLARE SUB coilplotv () DECLARE SUB gettestparam () DECLARE SUB measure () DECLARE SUB imagramp (inom!) DECLARE SUB fileheader (logfile$, mn$, pr$, op$, ts$, dv$, rn$, cm$) DECLARE SUB fileinitl (test$, run$, logfile$, ok$) DECLARE SUB gpibinit () DECLARE SUB dac488hrinit () DECLARE SUB dac488hrsetupv () DECLARE SUB hp3457init () '**************************************************************************** 'Program TEST 'This program is used to quickly test various aspects of the dipole 'measurements and measurement system. ' 'Zachary Wolf '5/15/94, 3/16/95 '**************************************************************************** 'Include the constants used in the program REM $INCLUDE: 'param.inc' 'Prepare the screen CLS 'Initialize the GPIB CALL gpibinit 'Initialize the HP3457 CALL hp3457init 'Print a message about the program PRINT PRINT "Program TEST" PRINT "This program is used to quickly test various aspects of the" PRINT "measurements and measurement system." PRINT 'Get test parameters from the operator testparam: CALL gettestparam 'Open the log file CALL fileinitl("test", runP$, logfileP$, ok$) IF ok$ <> "y" THEN PRINT : PRINT "Problem opening the log file. Try another run number.": PRINT GOTO testparam: END IF 'Write a header to the log file CALL fileheader(logfileP$, magnameP$, projectP$, operatorP$, teststandP$, coilP$, runP$, commentP$) 'Prompt the operator for a task q: PRINT PRINT "Do you wish to" PRINT "[R]amp the magnet." PRINT "[P]lot the coil voltage." PRINT "[M]easure the integrated voltage from a coil." PRINT "[E]nd the test." INPUT t$ t$ = UCASE$(MID$(t$, 1, 1)) PRINT 'Ramp IF t$ = "R" THEN qi: INPUT "What current do you wish to ramp to? (amps) ", curr! IF curr! < 0 OR curr! > 1000! THEN PRINT "The current must be between 0 "E" THEN GOTO q: 'Message 'PRINT 'PRINT "Ramping to 0 Amps." 'Ramp to 0 amps 'CALL imagramp(0!) 'Message PRINT "The test is finished." 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 1 ' operatorP$, name of the operator doing the test ' runP$, run number ' commentP$, comment about the test ' 'Zachary Wolf '4/16/94 '**************************************************************************** begin: 'Get the name of the magnet PRINT "What is the name of the magnet being used for this test?" 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 name of the test stand 'stand: 'PRINT "Enter which test stand is being used (D0, D1, or D2): ["; teststandP$; "]"; 'INPUT teststand$ 'teststand$ = UCASE$(teststand$) 'IF teststand$ <> "" THEN teststandP$ = teststand$ 'IF teststand$ <> "" AND teststand$ <> "D0" AND teststand$ <> "D1" AND teststand$ <> "D2" THEN GOTO stand 'IF teststandP$ = "" GOTO stand 'Get the name of the measurement coil 'meascoil: 'PRINT "Enter the name of the measurement coil (COIL0, COIL1, or COIL2): ["; coilP$; "]"; 'INPUT coil$ 'coil$ = UCASE$(coil$) 'IF coil$ <> "" THEN coilP$ = coil$ 'IF coil$ <> "" AND coil$ <> "COIL0" AND coil$ <> "COIL1" AND coil$ <> "COIL2" THEN GOTO meascoil 'IF coilP$ = "" GOTO meascoil '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