DECLARE SUB vmaglogv (logfile$, vmag!) DECLARE SUB hp3457cv (c%, v!) DECLARE SUB k7011closecc (card%, chan%) DECLARE SUB k7011openall () '**************************************************************************** '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' 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