DECLARE SUB hp3457cv (c%, v!) DECLARE SUB k7011closecc (card%, chan%) DECLARE SUB k7011openall () DECLARE SUB vmaglogv (logfile$, vmag!) '**************************************************************************** 'Module VMAG 'This module contains drivers to measure the magnet voltage. ' 'Zachary Wolf '1/5/95 '**************************************************************************** 'Include the parameters used in the module REM $INCLUDE: 'param.inc' 'Required parameters 'Resistance and temperature measurement parameters 'CONST mxhpchanP% = 4 'HP3457 channel for the multiplexer 'CONST mxcardP% = 1 'K7011 card number 'CONST vmagmxchanP% = 11 'K7011 magnet voltage channel 'Make file names common to all procedures 'COMMON SHARED /filenames/ logfileP$, rawfileP$, rtdatP$, sldatP$, slpltP$, hardatP$, harpltP$ SUB vmaggetv (vmag!) '**************************************************************************** 'This subroutine gets the magnet voltage. ' 'Output: ' vmag!, the measured magnet voltage ' 'Zachary Wolf '1/5/95 '**************************************************************************** 'Measure the magnet voltage CALL k7011closecc(mxcardP%, vmagmxchanP%) 'close the multiplexer channel CALL hp3457cv(mxhpchanP%, vmag!) CALL k7011openall 'open all multiplexer channels 'Log the result CALL vmaglogv(logfileP$, vmag!) END SUB SUB vmaglogv (logfile$, vmag!) '**************************************************************************** 'This subroutine writes the magnet voltage to the log file. ' 'Input: ' logfile$, the name of the log file ' vmag!, the measured magnet voltage ' 'Zachary Wolf '1/5/95 '**************************************************************************** 'Open the log file filenum% = FREEFILE OPEN logfile$ FOR APPEND AS filenum% 'Print the results PRINT #filenum%, PRINT #filenum%, TIME$; " Magnet Voltage, Vmag = "; vmag!; " V" 'Close the log file CLOSE filenum% END SUB