python-feeltech
python-feeltech copied to clipboard
sweep is not working
Hello, I am trying to use the sweep function with my 2 channel function generator. I am using channel one, and a sweep does start, but the freq_start and freq_end parameters are not working. The sweep always starts at 10kHz and ends at 20 kHz. Any ideas on a fix? Thanks
I think a firmware change has changed the command layout. I have gotten the desired behavior by changing the start_sweep definition as follows
def start_sweep(self, freq_start, freq_end, time = 10, type = LINEAR): if self._i != 1: raise NotImplementedError("Sweep supported only on channel 1") self.stop_sweep() self._ft.send("bb%d" % round(freq_start*100)) self._ft.send("be%d" % round(freq_end*100)) self._ft.send("bt%d" % time) self._ft.send("bm%d" % type) self._ft.send("br1") return self