MATLAB INSTRUMENT CONTROL TOOLBOX - RELEASE NOTES Bedienungsanleitung Seite 13

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 30
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 12
Using the Instrument Control Toolbox
1MA171_5e Rohde & Schwarz How to use Rohde & Schwarz Instruments in MATLAB
®
13
try
%% simple settings
% switch rf off
instr_rf = 0;
groupObj = get(deviceObj, 'RFSignalandAnalogMod');
groupObj = groupObj(1);
invoke(groupObj, 'setallrfoutputsstate', instr_rf);
% set total power to 0dB
groupObj = get(deviceObj, 'BasebandSignal3GPPFDD');
groupObj = groupObj(1);
invoke(groupObj, 'w3gppadjusttotalpowerto0db', instr_path);
% read power back
i
nstr_w3gpp_power = -1;
g
roupObj = get(deviceObj, 'BasebandSignal3GPPFDD');
groupObj = groupObj(1);
[
instr_w3gpp_power] = invoke(groupObj, 'getw3gpptotalpower', instr_path);
% switch 3GPP on
i
nstr_path = 1;
instr_3gppState = 1;
groupObj = get(deviceObj, 'BasebandSignal3GPPFDD');
groupObj = groupObj(1);
invoke(groupObj, 'setw3gppfddstate', instr_path, instr_3gppState);
% switch rf on
instr_outputstate = 1;
groupObj = get(deviceObj, 'RFSignalandAnalogMod');
groupObj = groupObj(1);
invoke(groupObj, 'setoutputstate', instr_path, instr_outputstate);
%finished
catch ME
%% evaluate error
errLen = 1024;
errCode = -1;
errMsg = zeros(errLen, 1);
%query instrument for errors
groupObj = get(deviceObj, 'Utility');
groupObj = groupObj(1);
[errCode, errMsg] = invoke(groupObj, 'errorquery');
% disconnect device object from hardware
disconnect(deviceObj);
% delete object
delete(deviceObj);
error('Exception: %s\nInstrument Error: %d: %s\n', ME.message, errCode,
char(errMsg));
end
%% cleanup driver session
% disconnect device object from hardware
disconnect(deviceObj);
% delete object
delete(deviceObj);
%cleanup workspace
clear all;
Seitenansicht 12
1 2 ... 8 9 10 11 12 13 14 15 16 17 18 ... 29 30

Kommentare zu diesen Handbüchern

Keine Kommentare