New software version, 2.2.0-RC1

  • 2 Replies
  • 19 Views
*

Dejan

  • *****
  • 117
    • View Profile
New software version, 2.2.0-RC1
« on: November 25, 2021, 10:04:21 AM »

Re: New software version, 2.2.0-RC1
« Reply #1 on: November 26, 2021, 07:45:09 PM »
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.

Code: [Select]
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

Code: [Select]
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?

*

Dejan

  • *****
  • 117
    • View Profile
Re: New software version, 2.2.0-RC1
« Reply #2 on: November 29, 2021, 09:54:30 PM »
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()
« Last Edit: November 29, 2021, 09:57:17 PM by Dejan »