Track completed Single acquisitions and persist recent addresses

This commit is contained in:
2026-10-07 12:32:29 +03:00
parent 6047ceac89
commit c011c2957b
4 changed files with 103 additions and 1 deletions
+13
View File
@@ -97,6 +97,19 @@ class DPO4034:
return True
raise ValueError("Некорректное состояние сбора: " + state)
def acquisition_status(self):
if self.instrument is None:
raise RuntimeError("Прибор не подключён")
fields = self.instrument.query("ACQUIRE:STATE?;:ACQUIRE:STOPAFTER?;:ACQUIRE:NUMACQ?").strip().split(";")
if len(fields) != 3:
raise ValueError("Некорректное состояние сбора")
state, mode, count = (value.strip().upper() for value in fields)
if state not in ("0", "1", "OFF", "ON", "STOP", "RUN"):
raise ValueError("Некорректное состояние сбора")
if mode not in ("RUNSTOP", "RUNST", "SEQUENCE", "SEQ"):
raise ValueError("Некорректный режим сбора")
return state in ("1", "ON", "RUN"), mode in ("SEQUENCE", "SEQ"), int(count)
def settings(self, channel="CH1"):
self._channel(channel)
if self.instrument is None: