kasli_sawgmaster: add basemod programming example

This commit is contained in:
Sebastien Bourdeauducq 2020-01-20 20:10:24 +08:00
parent ced4d74f2e
commit 5bcedc17b4
1 changed files with 25 additions and 0 deletions

View File

@ -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)