From ae45694c3151aad89087ca793715ac452274b414 Mon Sep 17 00:00:00 2001 From: Stephen Thirlwall Date: Sun, 7 Aug 2022 12:34:37 +0100 Subject: [PATCH] Add channel.enable_output(is_enabled) method Discovered this through trial and error. Works for both channels: bg0 - turn channel 1 output off bg1 - turn channel 1 output on dg0 - turn channel 2 output off dg1 - turn channel 2 output on --- feeltech/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/feeltech/__init__.py b/feeltech/__init__.py index d63ad86..766049f 100644 --- a/feeltech/__init__.py +++ b/feeltech/__init__.py @@ -87,6 +87,10 @@ def amplitude(self, a = None): def offset(self, o = None): self._ft.send(self._prefix + "o%2.2f" % o) + @getset + def enable_output(self, enabled = None): + self._ft.send(self._prefix + "g%d" % (1 if enabled else 0)) + def start_sweep(self, freq_start, freq_end, time = 10, type = LINEAR): if self._i != 1: raise NotImplementedError("Sweep supported only on channel 1")