BEC: further testing, added import for the ipython client, haven't tested yet
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
from bec_lib.client import BECClient
|
||||
from bec_ipython_client import BECIPythonClient
|
||||
from bec_lib.service_config import ServiceConfig
|
||||
from bec_lib.procedures.helper import FrontendProcedureHelper, BackendProcedureHelper
|
||||
|
||||
|
||||
#specify up to 10 queue to runs in parallel, request more if needed!
|
||||
# st = client.proc.request_new("sleep", ((), {"time_s":5}), queue="test")
|
||||
|
||||
@@ -69,8 +71,16 @@ class BECClientWorker:
|
||||
self.scans.umv(self.dev.blight_pos, 1, relative=False)
|
||||
self.scans.umv(self.dev.bs_pos, 1, relative = False)
|
||||
|
||||
# def a2e_runner(self, a, *hkl):
|
||||
# return a2e(a, *hkl)
|
||||
def a2e_runner(self, a, *hkl):
|
||||
return a2e(a, *hkl)
|
||||
|
||||
def mono_pitch_scan_runner(self):
|
||||
print('this is a print statement from inside DAQ not BEC')
|
||||
try:
|
||||
self.macros.mono_pitch_scan(False)
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import time
|
||||
@@ -79,14 +89,29 @@ if __name__ == "__main__":
|
||||
client.show_all_devices()
|
||||
client.list_all_macros()
|
||||
try:
|
||||
#a=client.a2e_runner(160, "iln")
|
||||
#print(a)
|
||||
# a=client.a2e_runner(160, "iln")
|
||||
# print(a)
|
||||
# print(convert_from_energy(12))
|
||||
# energy = get_current_energy()
|
||||
# pos = get_dcm_motors_positions(energy)
|
||||
# print(energy, pos)
|
||||
#init_positioned_devices()
|
||||
#PD.xeye_x.mvout()
|
||||
#client.scans.umv(client.dev.xeye_x, 0, relative=False)
|
||||
client.mono_pitch_scan_runner()
|
||||
#client.mono_pitch_scan_runner()
|
||||
#b=client.run_macro_blocked("a2e", 160, "iln", queue="test")
|
||||
#b = client.run_macro_blocked("mono_pitch_scan", False, queue="test")
|
||||
client.rse2sa()
|
||||
time.sleep(10.0)
|
||||
client.common2rse()
|
||||
#print(b)
|
||||
#b = client.run_macro_blocked("mono_pitch_scan", False, queue="default")
|
||||
|
||||
#status = client.mono_pitch_scan_runner
|
||||
#print(status)
|
||||
|
||||
#client.rse2sa()
|
||||
#time.sleep(10.0)
|
||||
#time.sleep(10.0)
|
||||
#print(status)
|
||||
#client.common2rse()
|
||||
#print(status)
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
client.shutdown_client()
|
||||
|
||||
Reference in New Issue
Block a user