DECLARE SUB pt2025user () DECLARE SUB pt2025getb (b!) DECLARE SUB pt2025search () DECLARE SUB pt2025setcoarse (b!) DECLARE SUB gpibinit (ieeein%, ieeeout%) DECLARE SUB pt2025init () DECLARE SUB pt2025setpar (gpibinf%, gpiboutf%, pt2025addr$) '**************************************************************************** 'TESTNMR 'Test the Metrolab PT2025. ' 'Zachary Wolf '2/24/98 '**************************************************************************** 'Get required parameters REM $INCLUDE: 'param.inc' 'Prepare the screen CLS 'Open a log file filenum% = FREEFILE logfileP$ = "logfile.dat" OPEN logfileP$ FOR OUTPUT AS #filenum% CLOSE filenum% 'Initialize the GPIB system CALL gpibinit(gpibinP%, gpiboutP%) 'Send required parameters CALL pt2025setpar(0, 0, pt2025gpibaddrP$) 'Initialize the PT2025 CALL pt2025init 'Set the coarse DAC 'b! = .91 'CALL pt2025setcoarse(b!) 'Search for the NMR signal 'CALL pt2025search 'Get the field reading 'CALL pt2025getb(b!) 'PRINT "B = "; b!; " T" 'Run the user routine CALL pt2025user