'**************************************************************************** 'Module LOGT 'This module contains subroutines fill the temperature log files. ' 'Zachary Wolf '6/11/94 '**************************************************************************** SUB logmrt (logfile$, m%, nrt%, tim$(), imag!(), vmag!(), rmag!(), twin!(), twout!(), tiron!(), tcoil!(), tamb!()) '**************************************************************************** 'This subroutine writes the resistance and temperature measurements 'to the log file. ' 'Inputs: ' logfile$, the name of the log file ' m%, index giving the magnet number, 0, 1, or 2 ' nrt%, the number of resistance and temperature measurements ' tim$(1 to nrt%), the times the measurements were taken ' imag!(0 to 2, 1 to nrt%), the magnet current ' vmag!(0 to 2, 1 to nrt%), the magnet voltage ' rmag!(0 to 2, 1 to nrt%), the magnet resistance ' twin!(0 to 2, 1 to nrt%), water input temperature in deg C ' twout!(0 to 2, 1 to nrt%), water output temperature in deg C ' tiron!(0 to 2, 1 to nrt%), magnet iron temperature in deg C ' tcoil!(0 to 2, 1 to nrt%), measurement coil temperature in deg C ' tamb!(0 to 2, 1 to nrt%), ambient temperature in deg C ' 'Zachary Wolf '6/11/94, 7/8/94 '**************************************************************************** 'Open the log file filenum% = FREEFILE OPEN logfile$ FOR APPEND AS filenum% 'Write the header PRINT #filenum%, IF m% = 0 THEN PRINT #filenum%, "Resistance and Temperature (deg C) Measurements For The Reference Magnet" ELSE PRINT #filenum%, "Resistance and Temperature (deg C) Measurements For The Magnet Under Test" END IF PRINT #filenum%, " Time Imag Vmag Rmag Water Water Magnet Meas " PRINT #filenum%, " (A) (V) (mohm) In Out Iron Coil Ambient" PRINT #filenum%, "-------- ------- ------- ------- ------- ------- ------- ------- -------" FOR i% = 1 TO nrt% PRINT #filenum%, USING "&"; tim$(i%); PRINT #filenum%, USING " ####.##"; imag!(m%, i%); PRINT #filenum%, USING " ##.####"; vmag!(m%, i%); PRINT #filenum%, USING " ###.###"; rmag!(m%, i%) * 1000!; PRINT #filenum%, USING " ####.##"; twin!(m%, i%); PRINT #filenum%, USING " ####.##"; twout!(m%, i%); PRINT #filenum%, USING " ####.##"; tiron!(m%, i%); PRINT #filenum%, USING " ####.##"; tcoil!(m%, i%); PRINT #filenum%, USING " ####.##"; tamb!(m%, i%) NEXT i% 'Close the log file CLOSE filenum% END SUB