'**************************************************************************** 'Module GP3 'This module contains subroutines to read the Group3 teslameter. ' 'Zachary Wolf '6/12/94, 12/11/95 '**************************************************************************** 'Common area for shared parameters COMMON SHARED /gp3/ gpibinP%, gpiboutP%, gp3addrP$ SUB gp3getb (b!) '**************************************************************************** 'This subroutine has the Group3 teslameter measure the magnetic field. ' 'Output: ' b!, the measured magnetic field strength in Tesla ' 'Zachary Wolf '6/12/94, 12/11/95 '**************************************************************************** 'Set the GPIB terminators PRINT #gpiboutP%, "TERM IN LF EOI" PRINT #gpiboutP%, "TERM OUT LF EOI" 'Get the reading PRINT #gpiboutP%, "OUTPUT " + gp3addrP$ + "; F" PRINT #gpiboutP%, "ENTER " + gp3addrP$ INPUT #gpibinP%, b! END SUB SUB gp3init '**************************************************************************** 'This subroutine initializes the Group3 teslameter. ' 'Zachary Wolf '6/12/94, 12/11/95 '**************************************************************************** 'Set the GPIB terminators PRINT #gpiboutP%, "TERM IN LF EOI" PRINT #gpiboutP%, "TERM OUT LF EOI" 'Message PRINT PRINT "Resetting the Group3 teslameter..." 'Clear the gp3 PRINT #gpiboutP%, "CLEAR " + gp3addrP$ 'Reset the gp3 PRINT #gpiboutP%, "OUTPUT " + gp3addrP$ + ";" + CHR$(24) PRINT #gpiboutP%, "ENTER " + gp3addrP$ LINE INPUT #gpibinP%, rst$ PRINT rst$ 'Put DTM in DC measurement mode PRINT #gpiboutP%, "OUTPUT " + gp3addrP$ + ";GD" 'Measure continuously PRINT #gpiboutP%, "OUTPUT " + gp3addrP$ + ";GC" 'Turn off digital filtering PRINT #gpiboutP%, "OUTPUT " + gp3addrP$ + ";D0" 'Use the normal display mode PRINT #gpiboutP%, "OUTPUT " + gp3addrP$ + ";NN" 'Send field readings only when requested PRINT #gpiboutP%, "OUTPUT " + gp3addrP$ + ";SM0" 'Do not send units PRINT #gpiboutP%, "OUTPUT " + gp3addrP$ + ";SU0" 'Set the units to Tesla PRINT #gpiboutP%, "OUTPUT " + gp3addrP$ + ";UFT" 'Display status information PRINT #gpiboutP%, "OUTPUT " + gp3addrP$ + ";IG" PRINT #gpiboutP%, "ENTER " + gp3addrP$ LINE INPUT #gpibinP%, ig$ PRINT #gpiboutP%, "OUTPUT " + gp3addrP$ + ";IN" PRINT #gpiboutP%, "ENTER " + gp3addrP$ LINE INPUT #gpibinP%, in$ PRINT #gpiboutP%, "OUTPUT " + gp3addrP$ + ";IR" PRINT #gpiboutP%, "ENTER " + gp3addrP$ LINE INPUT #gpibinP%, ir$ PRINT "Status: "; ig$ + ", " + in$ + ", " + ir$ END SUB SUB gp3setpar (gpibin%, gpibout%, gp3addr$) '**************************************************************************** 'This subroutine initializes the Group 3 Gaussmeter. ' 'Input: ' gpibin%, gpib input file number ' gpibout%, gpib output file number ' gp3addr$, gpib address in a string ' 'Zachary Wolf '12/11/95 '**************************************************************************** 'Make sure the input parameters have reasonable values IF gpibin% < 0 OR gpibin% > 100 THEN PRINT "GP3: GPIB problem" EXIT SUB END IF IF gpibout% < 0 OR gpibout% > 100 THEN PRINT "GP3: GPIB problem" EXIT SUB END IF IF gp3addr$ = "" THEN PRINT "GP3: GPIB problem" EXIT SUB END IF 'Save the GPIB information in a common block for future use gpibinP% = gpibin% gpiboutP% = gpibout% gp3addrP$ = gp3addr$ END SUB SUB gp3setrange (r%) '**************************************************************************** 'This subroutine sets the range of the Group3 teslameter. ' 'Input: ' r%, the range number ' 'Zachary Wolf '6/14/94 '**************************************************************************** 'Set the GPIB terminators PRINT #gpiboutP%, "TERM IN LF EOI" PRINT #gpiboutP%, "TERM OUT LF EOI" 'Set the measurement range PRINT #gpiboutP%, "OUTPUT " + gp3addrP$ + "; R" + LTRIM$(STR$(r%)) END SUB SUB gp3zero '**************************************************************************** 'This subroutine zeros the Group3 teslameter. ' 'Zachary Wolf '6/14/94, 12/11/95 '**************************************************************************** 'Set the GPIB terminators PRINT #gpiboutP%, "TERM IN LF EOI" PRINT #gpiboutP%, "TERM OUT LF EOI" 'Message PRINT PRINT "Zeroing the Group3 teslameter..." 'Zero the teslameter PRINT #gpiboutP%, "OUTPUT " + gp3addrP$ + "; Z" END SUB