294 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Creating and Downloading Waveform Files
Programming Examples
% Order dependency on download. 1:Waveform, 2:Markers, 3:Header
fopen(t);
fprintf(t,'%s',wfmCmd);
%fwrite(t,iqData,'int16'); % Use loop to prevent the need for a
buffer as big as waveform
WriteData(t,iqData,2,bufSize);
fprintf(t,'\n');
fprintf(t,'syst:err?');
fgets(t)
fprintf(t,'%s',mkrCmd);
%fwrite(t,mkrData,'int8');
WriteData(t,mkrData,1,bufSize);
fprintf(t,'\n');
fprintf(t,'syst:err?');
fgets(t)
fprintf(t,'%s\n',hdrCmd);
fprintf(t,'syst:err?');
fgets(t)
fclose(t);
end
function WriteData(fid,data,format,bufSize)
% Write data using a loop to support large waveforms without having
to
% specify a huge buffer.
%
% INPUT PARAMETERS:
% fid - file id
% data - all the data
% format - data size to output in bytes 1,2,4 etc.
% bufSize - Buffer size in bytes
Summary of Contents for X-Series
Page 4: ...4 ...
Page 10: ...10 Contents ...