Live data acquisition over SECoP

This commit is contained in:
2025-07-30 13:56:25 +02:00
parent e77c48ace0
commit 7bfc6b3cb8
3 changed files with 48 additions and 27 deletions

View File

@@ -155,8 +155,8 @@ class TNMR:
print('Zero-going...')
ntnmr = self.get_instance()
if not(self.acquisition_running()):
print('Reset')
ntnmr.Reset() # to avoid hardware issues? EDIT: Doesn't seem to do much...
#print('Reset')
#ntnmr.Reset() # to avoid hardware issues? EDIT: Doesn't seem to do much...
if(CHECK_MODE == 'data'):
print('Artificially setting the zeroth point to NULL for error detection.')
ntnmr.SetDataPoint(1, [0,0])
@@ -258,7 +258,7 @@ class TNMR:
"""
print('I: Saving')
if filepath == '':
self.get_instance().Save
self.get_instance().Save()
else:
self.get_instance().SaveAs(filepath)
print(f'I: Saved to file {filepath}')
@@ -378,6 +378,11 @@ class TNMR:
"""
ntnmr = self.get_instance()
if (self.acquisition_running()):
ntnmr.Abort()
print('W: Aborting currently running acquisition!')
print(f'Loading sequence at {filename}')
ntnmr.CloseActiveFile()
success = ntnmr.OpenFile(TEMPLATE_FILE_PATH + 'tmp.tnt')