EasyManua.ls Logo

Keysight E4428C ESG RF - Page 302

Keysight E4428C ESG RF
404 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
294 Keysight Signal Generators Programming Guide
Creating and Downloading Waveform Files
Programming Examples
end
if length(iqWave)<60
error('ERROR: download() iqWave must contain 60 or more points.');
end
if nargin<3 name = 'NO_NAME'; end
if nargin<4
markers = zeros(4,length(iqWave));
markers(:,1:4) = 1;
end
if nargin<5
header = [];
end
if length(iqWave) ~= length(markers)
error('ERROR: download() The length of the iqWave and the marker arrays must be the same.');
end
% Process waveform and marker data
[iqData, rms] = FormatWaveform( iqWave );
mkrData = FormatMarkers( markers );
% Download the Waveform
wfmCmd = CreateWaveformCommand( name, length(iqWave) );
mkrCmd = CreateMarkerCommand( name, length(markers) );
hdrCmd = CreateHeaderCommand( name, rms, header );
bufSize = 8192;
t = tcpip(tcpipAddress, 5025);
t.OutputBufferSize = bufSize;
% 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');

Table of Contents

Related product manuals