'**************************************************************************** 'Module GROUP3 'This module contains subroutines to read the Group3 teslameter. ' 'The following parameters are required in param.inc. ' gpibinP%, the GPIB input file number ' gpiboutP%, the GPIB output file number ' gp3addrP%, the GPIB address of the Group3 teslameter ' 'Zachary Wolf '6/12/94 '**************************************************************************** REM $INCLUDE: 'param.inc' SUB gp3getb (b!) '**************************************************************************** 'GP3GETB 'This subroutine has the Group3 teslameter measure the magnetic field. ' 'Output: ' b!, the measured magnetic field strength in Tesla ' 'Input from param.inc: ' gpibinP%, the GPIB input file number ' gpiboutP%, the GPIB output file number ' gp3addrP%, the GPIB address of the teslameter ' 'Zachary Wolf '6/12/94 '**************************************************************************** 'Get the GPIB I/O file numbers and the Group3 address from the parameters gpibin% = gpibinP% gpibout% = gpiboutP% gp3addr% = gp3addrP% 'Put the address number into a string gp3addr$ = STR$(gp3addr%) 'Set the GPIB terminators PRINT #gpibout%, "TERM IN LF EOI" PRINT #gpibout%, "TERM OUT LF EOI" 'Get the reading PRINT #gpibout%, "OUTPUT " + gp3addr$ + "; F" PRINT #gpibout%, "ENTER " + gp3addr$ INPUT #gpibin%, b! END SUB SUB gp3init '**************************************************************************** 'GP3INIT 'This subroutine initializes the Group3 teslameter. ' 'Input from param.inc: ' gpibinP%, the GPIB input file number ' gpiboutP%, the GPIB output file number ' gp3addrP%, the GPIB address of the teslameter ' 'Zachary Wolf '6/12/94 '**************************************************************************** 'Get the GPIB I/O file numbers and the Group3 address from the parameters gpibin% = gpibinP% gpibout% = gpiboutP% gp3addr% = gp3addrP% 'Put the address number into a string gp3addr$ = STR$(gp3addr%) 'Set the GPIB terminators PRINT #gpibout%, "TERM IN LF EOI" PRINT #gpibout%, "TERM OUT LF EOI" 'Message PRINT PRINT "Resetting the Group3 teslameter..." 'Clear the gp3 PRINT #gpibout%, "CLEAR " + gp3addr$ 'Reset the gp3 PRINT #gpibout%, "OUTPUT " + gp3addr$ + ";" + CHR$(24) PRINT #gpibout%, "ENTER " + gp3addr$ LINE INPUT #gpibin%, rst$ PRINT rst$ 'Put DTM in DC measurement mode PRINT #gpibout%, "OUTPUT " + gp3addr$ + ";GD" 'Measure continuously PRINT #gpibout%, "OUTPUT " + gp3addr$ + ";GC" 'Turn off digital filtering PRINT #gpibout%, "OUTPUT " + gp3addr$ + ";D0" 'Use the normal display mode PRINT #gpibout%, "OUTPUT " + gp3addr$ + ";NN" 'Send field readings only when requested PRINT #gpibout%, "OUTPUT " + gp3addr$ + ";SM0" 'Do not send units PRINT #gpibout%, "OUTPUT " + gp3addr$ + ";SU0" 'Set the units to Tesla PRINT #gpibout%, "OUTPUT " + gp3addr$ + ";UFT" 'Display status information PRINT #gpibout%, "OUTPUT " + gp3addr$ + ";IG" PRINT #gpibout%, "ENTER " + gp3addr$ LINE INPUT #gpibin%, ig$ PRINT #gpibout%, "OUTPUT " + gp3addr$ + ";IN" PRINT #gpibout%, "ENTER " + gp3addr$ LINE INPUT #gpibin%, in$ PRINT #gpibout%, "OUTPUT " + gp3addr$ + ";IR" PRINT #gpibout%, "ENTER " + gp3addr$ LINE INPUT #gpibin%, ir$ PRINT "Status: "; ig$ + ", " + in$ + ", " + ir$ END SUB SUB gp3setrange (r%) '**************************************************************************** 'GP3SETRANGE 'This subroutine sets the range of the Group3 teslameter. ' 'Input: ' r%, the range number ' 'Input from param.inc: ' gpibinP%, the GPIB input file number ' gpiboutP%, the GPIB output file number ' gp3addrP%, the GPIB address of the teslameter ' 'Zachary Wolf '6/14/94 '**************************************************************************** 'Get the GPIB I/O file numbers and the Group3 address from the parameters gpibin% = gpibinP% gpibout% = gpiboutP% gp3addr% = gp3addrP% 'Put the address number into a string gp3addr$ = STR$(gp3addr%) 'Set the GPIB terminators PRINT #gpibout%, "TERM IN LF EOI" PRINT #gpibout%, "TERM OUT LF EOI" 'Set the measurement range PRINT #gpibout%, "OUTPUT " + gp3addr$ + "; R" + LTRIM$(STR$(r%)) END SUB SUB gp3zero '**************************************************************************** 'GP3ZERO 'This subroutine zeros the Group3 teslameter. ' 'Input from param.inc: ' gpibinP%, the GPIB input file number ' gpiboutP%, the GPIB output file number ' gp3addrP%, the GPIB address of the teslameter ' 'Zachary Wolf '6/14/94 '**************************************************************************** 'Get the GPIB I/O file numbers and the Group3 address from the parameters gpibin% = gpibinP% gpibout% = gpiboutP% gp3addr% = gp3addrP% 'Put the address number into a string gp3addr$ = STR$(gp3addr%) 'Set the GPIB terminators PRINT #gpibout%, "TERM IN LF EOI" PRINT #gpibout%, "TERM OUT LF EOI" 'Message PRINT PRINT "Zeroing the Group3 teslameter..." 'Zero the teslameter PRINT #gpibout%, "OUTPUT " + gp3addr$ + "; Z" END SUB