From 5bcedc17b4b39b2e5bd4cb5210f72ce70ca256b1 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 20 Jan 2020 20:10:24 +0800 Subject: [PATCH] kasli_sawgmaster: add basemod programming example --- .../kasli_sawgmaster/repository/basemod.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 artiq/examples/kasli_sawgmaster/repository/basemod.py diff --git a/artiq/examples/kasli_sawgmaster/repository/basemod.py b/artiq/examples/kasli_sawgmaster/repository/basemod.py new file mode 100644 index 000000000..5b996962b --- /dev/null +++ b/artiq/examples/kasli_sawgmaster/repository/basemod.py @@ -0,0 +1,25 @@ +from artiq.experiment import * + + +class BaseMod(EnvExperiment): + def build(self): + self.setattr_device("core") + self.basemods = [self.get_device("basemod_att0"), self.get_device("basemod_att1")] + self.rfsws = [self.get_device("sawg_sw"+str(i)) for i in range(8)] + + @kernel + def run(self): + self.core.reset() + for basemod in self.basemods: + self.core.break_realtime() + delay(10*ms) + basemod.reset() + delay(10*ms) + basemod.set(0.0, 0.0, 0.0, 0.0) + delay(10*ms) + print(basemod.get_mu()) + + self.core.break_realtime() + for rfws in self.rfsws: + rfws.on() + delay(1*ms)