levylabpitt / Multichannel-Lockin

Multichannel software lock-in amplifier.
BSD 3-Clause "New" or "Revised" License
13 stars 0 forks source link

Sweep Input Wave Strange Behavior #61

Closed Monkeymerlot closed 1 year ago

Monkeymerlot commented 2 years ago

I have a 10 kOhm resistor for a test and I get the following input: image so the values look right but the waveform is cut off and there is a section at the beginning.

Removing the initial wait and changing total time to 10s (and hitting refresh): image

Switch to Ramp / from Ramp/\: image

Change time of sweep to 3s from 10s: image

ciozi137 commented 2 years ago

@Monkeymerlot thanks

ciozi137 commented 2 years ago
  1. It seems that the AI lags the AO waveform by 1 update (acquiring S samples). I changed the way acquisitions are stored and displayed. The most recent AI data is displayed with the "previous" written AO data.

image

  1. I tweaked the way sweep waveforms are stored to make sure that we aren't missing (or have an extra) acquisition at the beginning or end

Here is the result for fs = 6500S/s, N=5000 S, f_1 = 9 Hz (not commensurate with 6500/5000):

image

image

If N is too small then the lockin will not be able to read the buffer fast enough and we will lose samples. I am still testing the new changes but I would like to push them ASAP, maybe this afternoon

Monkeymerlot commented 2 years ago

Still looks like there is a bit of offset between the two. image

ciozi137 commented 2 years ago

@Monkeymerlot try making #s 2x or 4x bigger

Monkeymerlot commented 2 years ago

It looks better now. N = 2250 and Fs = 2500. 500 MΩ resistor. image

ciozi137 commented 2 years ago

Looks great. By increases #s you decrease the update rate. I think if it's too fast then there will be dropped points. I would like to get a better handle on that and take it out of the end users' hands