'**************************************************************************** 'Module B9900 'This module contains subroutines to read the F. W. Bell model 9900 'gaussmeter. ' 'Note! This module assumes one Hall probe in channel 1 of the Gaussmeter. 'It needs to be upgraded for multiple probes or a different channel. ' 'Zachary Wolf '2/7/96 '**************************************************************************** 'Common area for shared parameters COMMON SHARED /b9900/ gpibinP%, gpiboutP%, b9900addrP$ 'Semi-permanent parameters CONST b9900terminP$ = "CR EOI" CONST b9900termoutP$ = "CR EOI" SUB b9900comm (cmd$, msg$) '**************************************************************************** 'This subroutine sends a command to the Bell 9900 Gaussmeter. ' 'Input: ' cmd$, command to send to the Gaussmeter ' 'Output: ' msg$, message returned by the Gaussmeter ' 'Zachary Wolf '2/29/96 '**************************************************************************** END SUB SUB b9900getb (b!) '**************************************************************************** 'This subroutine has the Bell model 9900 teslameter measure the 'magnetic field. ' 'Output: ' b!, the measured magnetic field strength in Tesla ' 'Zachary Wolf '2/22/96 '**************************************************************************** 'Get the reading from the Gaussmeter b! = 1! END SUB SUB b9900init '**************************************************************************** 'This subroutine initializes the F. W. Bell 9900 series Gaussmeter. ' 'Zachary Wolf '12/11/95 '**************************************************************************** 'Message PRINT PRINT "Resetting the F. W. Bell 9900 series Gaussmeter..." END SUB SUB b9900notbusy '**************************************************************************** 'This subroutine checks to make sure the 9900 is ready for a command. 'If the 9900 is not ready, the routine waits until it is. ' 'Zachary Wolf '2/22/96 '**************************************************************************** END SUB SUB b9900ready '**************************************************************************** 'This subroutine checks to make sure the 9900 has finished processing 'a command and is ready to send its message in reply. 'If the 9900 is not ready, the routine waits until it is. ' 'Zachary Wolf '2/22/96 '**************************************************************************** END SUB SUB b9900setpar (gpibinf%, gpiboutf%, b9900addr$) '**************************************************************************** 'This subroutine initializes the F. W. Bell 9900 series Gaussmeter. ' 'Input: ' gpibinf%, gpib input file number ' gpiboutf%, gpib output file number ' b9900addr$, gpib address in a string ' 'Zachary Wolf '12/11/95 '**************************************************************************** 'Make sure the input parameters have reasonable values IF gpibinf% < 0 OR gpibinf% > 100 THEN PRINT "B9900: GPIB problem" EXIT SUB END IF IF gpiboutf% < 0 OR gpiboutf% > 100 THEN PRINT "B9900: GPIB problem" EXIT SUB END IF IF b9900addr$ = "" THEN PRINT "B9900: GPIB problem" EXIT SUB END IF 'Save the GPIB information in a common block for future use gpibinP% = gpibinf% gpiboutP% = gpiboutf% b9900addrP$ = b9900addr$ END SUB SUB b9900setrange (r%) '**************************************************************************** 'This subroutine sets the range of the Bell 9900 Gaussmeter. ' 'Input: ' r%, the range number, 1 = 300 muT, 2 = 3 mT, 3 = 30 mT, 4 = 300 mT, 5 = 3 T, 6 = 30 T, 7 = 300 T, 8 = Auto Tesla ' 'Zachary Wolf '12/11/95 '**************************************************************************** END SUB SUB b9900zero '**************************************************************************** 'This subroutine zeros the Bell 9900 Gaussmeter. ' 'Zachary Wolf '12/11/95 '**************************************************************************** 'Message PRINT PRINT "Bell 9900 Gaussmeter Zero" PRINT "Please place the Hall probe in a zero Gauss chamber." INPUT "Press ENTER when ready. ", a$ PRINT "Zeroing the Bell 9900 Gaussmeter..." END SUB