The program sgm_scan is much like the program motor_scan. To run sgm_scan, do the following from the command line (that is, not in IDL any longer!):
% sgm_scan adc0 270. 350. 0.2 -outboardThis will scan the outboard branch monochromator from 270 to 350 eV in 0.2 eV steps, read the signal on the zeroeth ADC input at each position, and write the data out. You can also add options like -invert to invert the polarity of voltages, and -noreturn to have the motor stay at the last position of the scan. If you forget the arguments, just type sgm_scan and you will be prompted for them.
At the end of its operation, sgm_scan will tell you something like
Wrote data to ``/mnt/x1a/x1a_16jan2002_0007.csv'' and PostScript plot to ``/mnt/x1a/x1a_16jan2002_0007.ps'' Waiting for motor to return to original position. Please close graphics window before next scan!You can then print the plot of the scan with
% lpr /mnt/x1a/x1a_16jan2002_0007.psYou can also read one of these data files into IDL with
IDL> read_csv,'/mnt/x1a/x1a_16jan2002_0007.csv',items IDL> svec = size(items) IDL> n = svec[2] IDL> ev = reform(items[0,*],n) IDL> volts = reform(items[1,*],n) IDL> plot,ev,volts