Keysight E4428C ESG RF Programming Manual page 306

Signal generators
Table of Contents

Advertisement

Creating and Downloading Waveform Files
Programming Examples
hdrCmd = ['RADio:ARB:HEAD:WRIT "WFM1:'
hdr.sampleRate ) ',' num2str(hdr.runtimeScaling) ',NONE,' hdr.alcHold ',UNSP,' hdr.pulse
',UNSP,UNSP,UNSP,' num2str(hdr.peak) ',' num2str(hdr.rms)];
end
function wfmCmd = CreateWaveformCommand( file_name, points )
% :MMEM:DATA "<file_name>",#ABC
% "<file_name>" the I/Q file name and file path within the signal generator
% # indicates the start of the data block
% A the number of decimal digits present in B
% B a decimal number specifying the number of data bytes to follow in C
B = num2str(4*points); % Bytes in waveform
A = num2str(length(B));
wfmCmd = [':MEM:DATA:UNPR "WFM1:' file_name '",#' A B ];
end
function mkrCmd = CreateMarkerCommand( file_name, points )
B = num2str(points); % Bytes in marker file
A = num2str(length(B));
mkrCmd = [':MEM:DATA:UNPR "MKR1:' file_name '",#' A B ];
end
Playing Downloaded Waveforms
NOTE
This example works on either a 32bit or 64bit system that is connected over the LAN. So,
the Waveform Download Assistant—which only works on 32bit systems—is not required, to
use this program.
Additional documentation is available on this program through Matlab, by adding your PC's
path to the Matlab's path and then from the Matlab command line type: "help
PlayWaveform".
This is a simple example to play a waveform that was downloaded to the instrument. This example
can be easily modified to send additional SCPI commands.
On the documentation CD, this programming example's name is "PlayWaveform.m."
This MATLAB programming example performs the following functions:
• plays a waveform that has been downloaded
function PlayWaveform( tcpipAddress,
% PlayWaveform( tcpipAddress,
298
file_name
name )
name );
'","' hdr.description '",' num2str(
Keysight Signal Generators Programming Guide

Advertisement

Table of Contents
loading

Table of Contents