Agilent Technologies FS2010 Manuel de service Page 298

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 396
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 297
290 Agilent Signal Generators Programming Guide
Creating and Downloading Waveform Files
Programming Examples
hdrCmd = ['RADio:ARB:HEAD:WRIT "WFM1:' file_name '","' hdr.description '",' num2str(
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, name )
% PlayWaveform( tcpipAddress, name );
Vue de la page 297
1 2 ... 293 294 295 296 297 298 299 300 301 302 303 ... 395 396

Commentaires sur ces manuels

Pas de commentaire