motor_scan

You can take plots of some input signal as beamline motors move with the program motor_scan.

To run motor_scan, do the following from the command line (that is, not in IDL any longer!):

% motor_scan exsy_o adc0 0 500 10
This will scan the outboard branch vertical exit slit EXSY_O from 0 to 500 microns in steps of 10 microns, read the signal on the zeroeth ADC input at each position, and write the data out. Make sure you move in a non-backlash direction! Otherwise the motor will go (for example) 100 steps forward and 50 steps back, 100 steps forward and 50 steps back,$\ldots$ 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 motor_scan and you will be prompted for them.

At the end of its operation, motor_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.ps
You 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> microns = reform(items[0,*],n)
IDL> volts = reform(items[1,*],n)
IDL> plot,microns,volts

Holger Fleckenstein 2008-07-08