How to connect to Agilent ENA
Show older comments
I get the following error when trying to connect to an Agilent ENA E5071C. Can anyone help me resolve this? I have the Keysight Support Package Add-On downloaded and the Intrument Control Toolbox as well.
Error using visa (line 444)
Unable to create VISA object. The required drivers may not be installed properly.
Type 'instrhelp visa' for more information.
Error in Code_V1 (line 19)
instrObj = visa('agilent',instrumentVISAAddress,'InputBufferSize', 100000);
Here is the code that generated the error:
%% ANALYZER CONNECTION
% Define instrument VISA address. The VISA address of the instrument
% may be obtained from the instrument's user interface or your VISA
% configuration utility
instrumentVISAAddress = 'USB0::0x0957::0x0D09::MY46105734::0::INSTR';
instrreset;
obj1 = instrfind('Type', 'visa', 'RsrcName', instrumentVISAAddress, 'Tag', '');
% Define frequency range of 2.3GHz to 2.6GHz
frequencyRange = [2.3e9 2.6e9];
% Number of points in measurement
numPoints = 401;
% Create a VISA connection to interface with instrument
instrObj = visa('agilent',instrumentVISAAddress,'InputBufferSize', 100000);
% Open connection to the instrument and clear hardware buffer of instrument
fopen(instrObj);
clrdevice(instrObj);
% Display information about instrument
IDNString = query(instrObj,'*IDN?');
fprintf('Connected to: %s\n',IDNString);
Answers (0)
Categories
Find more on Instrument Control Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!