diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-18 17:21:26 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-18 17:21:26 -0500 |
commit | ba24e4d63f67f7edc151b0e185a5b7eac17d2e16 (patch) | |
tree | 4e4dbde81db3e77612b6bf638844bc95bedd8aef /examples/lock_eit.py | |
parent | 53297178ca4fafdf19ffd8cb43aae39e55112c05 (diff) | |
download | pyExpControl-ba24e4d63f67f7edc151b0e185a5b7eac17d2e16.tar.gz pyExpControl-ba24e4d63f67f7edc151b0e185a5b7eac17d2e16.zip |
better save control
Diffstat (limited to 'examples/lock_eit.py')
-rw-r--r-- | examples/lock_eit.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/examples/lock_eit.py b/examples/lock_eit.py index 31d1e72..5ff83db 100644 --- a/examples/lock_eit.py +++ b/examples/lock_eit.py @@ -113,9 +113,11 @@ async def main(): apparatus.config['Device model'] = 'v0.1' apparatus.config['FnamePrefix'] = 'locked_magnetometer' apparatus.config['SavePath'] = '/mnt/qol_grp_data/data.VAMPIRE.HighPower' + apparatus.config['SavePath'] = './data' apparatus.gui_log = gui.QOLTimeLog(a=wp) - task_gui_log_update_loop = asyncio.create_task(apparatus.gui_log.update_loop(update_interval=5)) + apparatus.gui_log.getNextDataFile = apparatus.getNextDataFile + task_gui_log_update_loop = asyncio.create_task(apparatus.gui_log.update_loop(update_interval=10)) print("testing") rm = pyvisa.ResourceManager() @@ -155,7 +157,7 @@ async def main(): apparatus.pid.reset() apparatus.runStatus = True res = await asyncio.gather( - feedbackLoop(apparatus, nsteps=100) + feedbackLoop(apparatus, nsteps=1000) ) print('========= Long term lock ===========') @@ -187,10 +189,10 @@ def update_webpage(byWhom=None, apparatus=None): print("updating webpage") timestr = time.strftime("%a, %d %b %Y, %H:%M:%S", time.localtime()) clock_upd.text = f'Last update at {timestr}' - # try: - # status_line.text = apparatus.state - # except NameError: - # pass + try: + status_line.text = apparatus.state + except: + pass jp.run_task(wp.update()) async def update_webpage_loop(update_interval=1): |