ScopeFun Forum
General Category => Software => Topic started by: Dejan on November 25, 2021, 10:04:21 AM
-
New software version was released, v2.2.0-RC1
Download: https://www.scopefun.com/download
https://gitlab.com/scopefun/scopefun-software/-/tags/Release_v2.2.0-RC1
-
Thank you for the awesome updates!
I've been working on the python api to generate and measure AWG signals.
There seem to be a limit with the AWG memory as I can only upload 16384 data points.
The code below generates a full sine wave.
from scopefun import *
import numpy as np
# ... initialization lines here
generator = sfCreateGenerator()
x = np.linspace(0, 2*np.pi, 16384) # <--- only 16384 samples
y = 2047*np.sin(x) # 12 bit AWG
y = np.array(y, dtype=np.short).byteswap()
for i in range(len(y)):
self.generator.analog0.bytes[i] = y[i]
sfHardwareUploadGenerator(ctx, generator)
but when I change the number of samples to 32768 it only generates half the sine wave
x = np.linspace(0, 2*np.pi, 32768)
I've tried turning off the second generator but to no avail? Any way I can access 32768 or more?
-
Hi and thanks for reporting this.
32768 samples is correct, but there was a problem that I found with FPGA firmware (memory addressing of AWG custom samples). Please use the following firmware to patch this issue: https://gitlab.com/scopefun/scopefun-software/-/blob/97de0e1f4d79aa7b351f2f1cc256deada1d490d0/bin/data/firmware/fpga2.bin
Download the provided file "fpga2.bin", to "<install_dir>/data/firmware/" (overwrite existing file).
This FPGA image will be included with the next software release.
BTW, I see a small typo in your code... correct is
generator = sfCreateSGenerator()