ecoc measurements

This commit is contained in:
Silas Labor Zizou
2025-04-13 16:29:12 +02:00
parent 00f1c557c0
commit 0236103b13
19 changed files with 709 additions and 359 deletions

View File

@@ -69,16 +69,16 @@ classdef AwgKeysight
obj.sampleMemorySize = 512000;
case awg_model.M8199A
obj.numChannels = 4;
obj.waveformGranularity = 512;
obj.sampleMemorySize = 1024000; %to check
obj.waveformGranularity = 256;
obj.sampleMemorySize = 512000; %see documentation "strg+f: granularity"
case awg_model.M8199A_ILV
obj.numChannels = 2;
obj.waveformGranularity = 512;
obj.sampleMemorySize = 1024000; %to check
obj.waveformGranularity = 512; %see documentation "strg+f: granularity"
obj.sampleMemorySize = 1024000;
case awg_model.M8199B
obj.numChannels = 2;
obj.waveformGranularity = 512;
obj.sampleMemorySize = 1024000; %to check
obj.waveformGranularity = 512; %see documentation "strg+f: granularity"
obj.sampleMemorySize = 1024000;
end
end
@@ -175,7 +175,10 @@ classdef AwgKeysight
% The waveform granularity is e.g. 128. This means that the waveform length must be a multiple of this granularity. The minimum waveform length is 128 samples.
if rem(length(signal{s}),obj.waveformGranularity) ~= 0
signal{s} = [signal{s} signal{s}(:,1:(obj.waveformGranularity-rem(length(signal{s}),obj.waveformGranularity)))];
fill_length = (obj.waveformGranularity-rem(length(signal{s}),obj.waveformGranularity));
segment__fill_samples = signal{s}(:,1:fill_length);
signal{s} = [signal{s} segment__fill_samples];
debug = 0;
if debug
@@ -196,7 +199,7 @@ classdef AwgKeysight
siglen = min(length(signal{s}),obj.sampleMemorySize);
signal{s} = signal{s}(1:siglen);
if siglen==obj.sampleMemorySize
warning(['Signal ',num2str(s),' was truncated to ',num2str(obj.sampleMemorySize),' to fit into AWG sample memory'])
warning(['Signal ',num2str(s),' too long was truncated to ',num2str(obj.sampleMemorySize),' to fit into AWG sample memory! Reduce Num Symbols or Sampling Rate!'])
end
@@ -362,6 +365,7 @@ classdef AwgKeysight
writeline(visaobj,char(command));
writeline(visaobj,':syst:err?');
err_aw=readline(visaobj);
assert(strfind(err_aw,"No error"),['AWG System Error? after command: ', char(command)])