I want to run an experiment where I operate two urukul channels (ch0 and ch3) at different frequency and some initial attenuations (ch0: 2MHz and attenuation: 30dB; ch3: 4MHz and attenuation: 20dB).
I run the experiment once using artiq_run
. Now in the same code I change the attenuation of ch0 to 15dB and keep all the other parameters same for ch0 and ch3.
What I observe is that upon running this new experiment that although ch0 changes its attenuation instantly, ch3 at that instant deattenuates for 1.6us and comes back to it's original 20dB attenuation. Here is a picture of the instant when this happens.
Here is the code. During the second run, I only change to self.urukul0_ch0.set_att(15.0*dB)
from artiq.experiment import *
class Urukul_Control(EnvExperiment):
def build(self):
self.setattr_device('core')
self.setattr_device('urukul0_cpld')
self.setattr_device('urukul0_ch0')
self.setattr_device('urukul0_ch3')
@kernel
def run(self):
self.core.reset()
# self.core.break_realtime()
self.urukul0_ch0.cpld.init()
self.urukul0_ch3.cpld.init()
self.urukul0_ch0.sw.on()
self.urukul0_ch3.sw.on()
self.urukul0_ch0.set_att(30.0*dB)
self.urukul0_ch3.set_att(20.0*dB)
self.urukul0_ch0.set(frequency = 2.0*MHz, amplitude = 1.0, phase = 0.0)
self.urukul0_ch3.set(frequency = 4.0*MHz, amplitude = 1.0, phase = 0.0)
I have even tried to just set the attenuation of only ch0 to 15dB (and remove all lines corresponding to ch3). While running this 2nd run, the ch0 changes instantly but ch3 deattenuates.
How do we ensure that the urukul channels run independently of each other?