Keysight E4428C ESG RF Programming Manual page 302

Signal generators
Table of Contents

Advertisement

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');
WriteData(t,iqData,2,bufSize);
fprintf(t,'\n');
fprintf(t,'syst:err?');
fgets(t)
fprintf(t,'%s',mkrCmd);
%fwrite(t,mkrData,'int8');
294
% Use loop to prevent the need for a buffer as big as waveform
Keysight Signal Generators Programming Guide

Advertisement

Table of Contents
loading

Table of Contents