Hello all,
I am trying to use Agilent function generators for frequencies below those that are possible using the Urukul card. They are easily controlled using pyVISA. However, I am having issues with the remote procedure calls, in particular, with the synchronization within the experiment. For example, the following:
for freq in self.frequency.sequence:
set_agilent(1,self.amplitude,freq)
delay(1*s)
print('I just set freq=%f',freq)
set_agilent is a function that interacts with the function generators. The frequency changes happen much faster than the 1 s delay one would expect from this, roughly in .3 s. Adding a break_realtime after the RPC does not solve this. I thought maybe doing something in realtime would change things, but this example
for freq in self.frequency.sequence:
set_agilent(1,self.amplitude,freq)
self.core.break_realtime()
self.ttl8.pulse(1*s)
delay(1*s)
print('I just set freq=%f',freq)
doesn't work either.
It seems RPCs and realtime events are somehow run in separate timelines? The only workaround I can think of is putting a sleep statement within the RPC for the duration of the experiment, but small offsets could result in problems if the experiment runs for long. Any ideas?
Thanks,
Manu GutiƩrrez