You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello guys,
I've been working with the scripts for some weeks now and since this point its all working well. My current objetive is to make the measurements repeatible, as I'm trying to make frequency sweeps. The script I've been working with till now:
It keeps on, but the rest works properly. The point is that it executes one time perfectly, but when it returns to the ps.setSamplingInterval for the second time I get this error:
File "", line 1, in
repmeas()
File "C:\Users\azahonero\Documents\uic\Scriptspico3.py", line 159, in repmeas
ps.setSamplingInterval(sampling_interval, obs_duration)
File "C:\Users\azahonero\Anaconda3\lib\site-packages\picoscope\picobase.py", line 318, in setSamplingInterval
(self.sampleInterval, self.maxSamples) = self._lowLevelGetTimebase(
File "C:\Users\azahonero\Anaconda3\lib\site-packages\picoscope\ps2000a.py", line 299, in _lowLevelGetTimebase
c_int16(self.handle), c_uint32(tb), c_uint32(noSamples),
TypeError: an integer is required (got type NoneType)
So it seems that some argument of the low level function doesn't reach this point. I dont really understand why, as it works only the first time without problems. The point is that I need to change the duration of the waveform because my range of frequencies is wide and at lower frequencies I dont get a full period with waveform_desired_duration = 50E-5. Moreover, I'm aiming to optimize the resolution of the measurement as much as posible, but found this problem. I can avoid this by not changing the waveform_desired_duration (that's what I really need to change) but then other low level functions give similar errors. I dont really know what more to try, so will really appreciate any idea.
The text was updated successfully, but these errors were encountered:
What might be helpful is to add code to dump the value of each of those - not sure which one is getting set to None.
Typically this is because of some collision in variable namespace - the first time through it was set correctly, after that it got overwritten. But I think it might make more sense if you can see which variable is having the issue!
I avoided this simply by programing the code I shown as a function for a single measurement and looping that one on another function, which worked for me. If anyone having the same issue ask I can upload my functions. Thanks for the help anyway!
Hello guys,
I've been working with the scripts for some weeks now and since this point its all working well. My current objetive is to make the measurements repeatible, as I'm trying to make frequency sweeps. The script I've been working with till now:
It keeps on, but the rest works properly. The point is that it executes one time perfectly, but when it returns to the ps.setSamplingInterval for the second time I get this error:
File "", line 1, in
repmeas()
File "C:\Users\azahonero\Documents\uic\Scriptspico3.py", line 159, in repmeas
ps.setSamplingInterval(sampling_interval, obs_duration)
File "C:\Users\azahonero\Anaconda3\lib\site-packages\picoscope\picobase.py", line 318, in setSamplingInterval
(self.sampleInterval, self.maxSamples) = self._lowLevelGetTimebase(
File "C:\Users\azahonero\Anaconda3\lib\site-packages\picoscope\ps2000a.py", line 299, in _lowLevelGetTimebase
c_int16(self.handle), c_uint32(tb), c_uint32(noSamples),
TypeError: an integer is required (got type NoneType)
So it seems that some argument of the low level function doesn't reach this point. I dont really understand why, as it works only the first time without problems. The point is that I need to change the duration of the waveform because my range of frequencies is wide and at lower frequencies I dont get a full period with waveform_desired_duration = 50E-5. Moreover, I'm aiming to optimize the resolution of the measurement as much as posible, but found this problem. I can avoid this by not changing the waveform_desired_duration (that's what I really need to change) but then other low level functions give similar errors. I dont really know what more to try, so will really appreciate any idea.
The text was updated successfully, but these errors were encountered: