Script execution
This commit is contained in:
60
script/optics/ExitSlitScanKei.py
Normal file
60
script/optics/ExitSlitScanKei.py
Normal file
@@ -0,0 +1,60 @@
|
||||
"""
|
||||
exit slit test scan
|
||||
|
||||
manual settings: photon energy 800 eV (G1200), FE = 2 x 3
|
||||
|
||||
keithley 1: diode
|
||||
keithley 2: RMU
|
||||
"""
|
||||
|
||||
POSITIONERS = (ExitSlit)
|
||||
SENSORS = (Keithley1, Keithley2, MachineCurrent)
|
||||
STARTPOS = (-10.0)
|
||||
ENDPOS = (200.0)
|
||||
STEPS = 10.0
|
||||
LATENCY = 0.1
|
||||
DWELL = 1.0
|
||||
|
||||
KEI_DIODE = "X03DA-KEITHLEY-1:"
|
||||
KEI_RMU = "X03DA-KEITHLEY-2:"
|
||||
|
||||
caput(KEI_DIODE + "DOSETDEFAULT", 1)
|
||||
caput(KEI_RMU + "DOSETDEFAULT", 1)
|
||||
time.sleep(1.0)
|
||||
caput(KEI_DIODE + "DOSETADVANCED", 1)
|
||||
caput(KEI_RMU + "DOSETADVANCED", 1)
|
||||
time.sleep(1.0)
|
||||
|
||||
#caput(KEI_DIODE + "READSCAN.SCAN", 0)
|
||||
#caput(KEI_DIODE + "NPLC", 1)
|
||||
caput(KEI_DIODE + "NAVG", 5)
|
||||
#caput(KEI_DIODE + "TCOUNT", 1)
|
||||
caput(KEI_DIODE + "RANGE", 6) # 200 nA
|
||||
|
||||
#caput(KEI_RMU + "READSCAN.SCAN", 0)
|
||||
#caput(KEI_RMU + "NPLC", 1)
|
||||
caput(KEI_RMU + "NAVG", 5)
|
||||
#caput(KEI_RMU + "TCOUNT", 1)
|
||||
caput(KEI_RMU + "RANGE", 8) # 2 nA
|
||||
|
||||
def trig():
|
||||
wait_beam()
|
||||
#WORKS:
|
||||
#caput(KEI_DIODE + "DOREAD", 1)
|
||||
#
|
||||
caput(KEI_DIODE + "DOINIT", 1)
|
||||
caput(KEI_RMU + "DOINIT", 1)
|
||||
time.sleep(0.1)
|
||||
caput(KEI_DIODE + "DOTRIGGER", 1)
|
||||
caput(KEI_RMU + "DOTRIGGER", 1)
|
||||
time.sleep(DWELL * 1.1)
|
||||
caput(KEI_DIODE + "DOFETCH", 1)
|
||||
caput(KEI_RMU + "DOFETCH", 1)
|
||||
|
||||
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout)
|
||||
|
||||
STARTPOS = (200.0)
|
||||
ENDPOS = (-10.0)
|
||||
STEPS = -10.0
|
||||
|
||||
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout)
|
||||
Reference in New Issue
Block a user