From c96827dd242ab2e12b7bc488cd41fdfb945352e3 Mon Sep 17 00:00:00 2001 From: "FR@29iduser" <rodolakis@anl.gov> Date: Fri, 23 Sep 2022 12:52:13 -0500 Subject: [PATCH] debug before switching to old code --- build/lib/iexcode/instruments/IEX_VPU.py | 16 ++++++---------- iexcode/instruments/IEX_VPU.py | 10 ++-------- iexcode/instruments/scanRecord.py | 2 +- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/build/lib/iexcode/instruments/IEX_VPU.py b/build/lib/iexcode/instruments/IEX_VPU.py index 9167afd..9d6f049 100644 --- a/build/lib/iexcode/instruments/IEX_VPU.py +++ b/build/lib/iexcode/instruments/IEX_VPU.py @@ -33,7 +33,8 @@ def ID_pvs(): 'start_ramp':pv+'StartRamp.VAL', 'energy_eV_rbv':pv+'EnergyRBV', 'energy_eV_sp':pv+'EnergyScanSeteV', - 'scan_val':pv+'EnergyScanSeteV', + 'scan_val':pv+'EnergyScanSet.VAL', + 'scan_val_eV':pv+'EnergyScanSeteV', 'table_dir':pv+'TableDirection', 'By_q':pv+'ByqRdbk', 'Bx_q':pv+'BxqRdbk', @@ -228,13 +229,7 @@ def ID_off(verbose=True): def ID_on(verbose=True): - """ - waits for permission then turns on the main coils On - """ - - ID_wait_for_permission(verbose=False) - if verbose: - print("Starting ID - "+dateandtime()) + print("Starting ID - "+dateandtime()) #caput(ID_pvs()['energy_sp'],3.8) caput(ID_pvs()['main_power'],'On',wait=True,timeout=18000) @@ -334,7 +329,8 @@ def _ID_write_SP_proc(keV): # caput(ID_pvs()['energy_sp'],keV,wait=True,timeout=18000) # sleep(ramp_delay) # caput(ID_pvs()['start_ramp'],1,wait=True,timeout=18000) - caput(ID_pvs()['energy_eV_sp'],keV,wait=True,timeout=18000) + caput(ID_pvs()['scan_val'],keV,wait=True,timeout=18000) + #caput(ID_pvs()['energy_sp'],keV,wait=True,timeout=18000) # just for bookkeeping sleep(1) @@ -526,7 +522,7 @@ def ID_scan_pvs(): """ returns the rbv and val for scanning """ - val_pv=ID_pvs()['scan_val'] + val_pv=ID_pvs()['scan_val_eV'] rbv_pv="" return rbv_pv, val_pv diff --git a/iexcode/instruments/IEX_VPU.py b/iexcode/instruments/IEX_VPU.py index 5805dbe..9d6f049 100644 --- a/iexcode/instruments/IEX_VPU.py +++ b/iexcode/instruments/IEX_VPU.py @@ -33,7 +33,7 @@ def ID_pvs(): 'start_ramp':pv+'StartRamp.VAL', 'energy_eV_rbv':pv+'EnergyRBV', 'energy_eV_sp':pv+'EnergyScanSeteV', - 'scan_val':pv+'EnergyScanSet', + 'scan_val':pv+'EnergyScanSet.VAL', 'scan_val_eV':pv+'EnergyScanSeteV', 'table_dir':pv+'TableDirection', 'By_q':pv+'ByqRdbk', @@ -229,13 +229,7 @@ def ID_off(verbose=True): def ID_on(verbose=True): - """ - waits for permission then turns on the main coils On - """ - - ID_wait_for_permission(verbose=False) - if verbose: - print("Starting ID - "+dateandtime()) + print("Starting ID - "+dateandtime()) #caput(ID_pvs()['energy_sp'],3.8) caput(ID_pvs()['main_power'],'On',wait=True,timeout=18000) diff --git a/iexcode/instruments/scanRecord.py b/iexcode/instruments/scanRecord.py index b836c16..9196ee2 100644 --- a/iexcode/instruments/scanRecord.py +++ b/iexcode/instruments/scanRecord.py @@ -411,7 +411,7 @@ class ScanRecord: kwargs.setdefault('scan_dim',1) scan_pv = self.ioc+"scan"+str(kwargs['scan_dim']) - caput(scan_pv+".CMND",3) # Clear all Positionners + #caput(scan_pv+".CMND",3) # Clear all Positionners if verbose: print("\nAll extra positionners cleared") -- GitLab