
Using the Instrument Control Toolbox
1MA171_5e Rohde & Schwarz How to use Rohde & Schwarz Instruments in MATLAB
®
15
%% read trace data
instr_trace = 1;
instr_timeoutMs = 15000;
instr_arrayLen = instr_sweepPoints;
instr_arrayActualLen = -1;
instr_amplitude = zeros(instr_arrayLen, 1);
groupObj = get(deviceObj, 'Measurement');
groupObj = groupObj(1);
[instr_arrayActualLen, instr_amplitude] = invoke(groupObj, 'readytrace',
instr_window, instr_trace, instr_timeoutMs, instr_arrayLen,
instr_amplitude);
%do something
p
lot(instr_amplitude)
%
finished
catch ME
%% evaluate error
errLen = 1024;
e
rrCode = -1;
errMsg = zeros(errLen, 1);
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;
2.8 Known Problems
Conversion of the MATLAB 2009b Instrument Control Toolbox for Rohde & Schwarz
attribute-based instrument drivers is not working correctly in some cases.
Please install the following patches for MATLAB
®
:
ivicDriverPropertyNameFix.zip
RSIVICAttributsBasedDriverFix.zip
ivicDriverArgumentFix.zip
These patches are available at http://www.rohde-schwarz.com/appnote/1MA171.
Kommentare zu diesen Handbüchern