Hi,
I am using Matlab TMTOOL to control an Agilent 34401A through GPIB. It works fine, but it is very slow, it takes 0.9 s to acquire a point. I tried to double check the parameters device configuration, but I do not see any inconsistency.
Here is the configuration:
DriverName = agilent_34401a.mdd
DriverType = MATLAB interface object
InstrumentModel = HEWLETT-PACKARD,34401A,0,11-5-2
Interface = [1x1 gpib]
LogicalName = GPIB0-22
Name = multimeter-agilent_34401a
ObjectVisibility = on
RsrcName =
Status = open
Tag =
Timeout = 10
Type = multimeter
UserData = []
MULTIMETER specific properties:
ApertureTime = 10
AutoImpedance = off
AutoRange = on
AutoZero = on
Bandwidth = 20
Calibration = [1x1 iccalibration]
DataPointsAvailable = 0
Display = [1x1 icdisplay]
InputTerminal = front
Math = [1x1 icmath]
MeasurementType = resistance
PowerLineFrequency = 50
Range = 10000
Resolution = 0.01
SampleCount = 1
System = [1x1 icsystem]
Trigger = [1x1 ictrigger]
And here is the code I execute
% Create a GPIB object.
interfaceObj = instrfind('Type', 'gpib', 'BoardIndex', 0, 'PrimaryAddress', 22, 'Tag', '');
% Create the GPIB object if it does not exist
% otherwise use the object that was found.
if isempty(interfaceObj)
interfaceObj = gpib('CONTEC', 0, 22);
else
fclose(interfaceObj);
interfaceObj = interfaceObj(1);
end
% Create a device object.
deviceObj = icdevice('agilent_34401a.mdd', interfaceObj);
% Connect device object to hardware.
connect(deviceObj);
% Configure property value(s).
set(deviceObj, 'MeasurementType', 'resistance');
tic
for i=1:1e2
R(i)=str2num(invoke(deviceObj, 'measure'));
T(i)=toc;
end
disconnect(deviceObj);
Is there something wrong in my configuration or in the command I am using?
Thanks a lot.
Gianni
I am using Matlab TMTOOL to control an Agilent 34401A through GPIB. It works fine, but it is very slow, it takes 0.9 s to acquire a point. I tried to double check the parameters device configuration, but I do not see any inconsistency.
Here is the configuration:
DriverName = agilent_34401a.mdd
DriverType = MATLAB interface object
InstrumentModel = HEWLETT-PACKARD,34401A,0,11-5-2
Interface = [1x1 gpib]
LogicalName = GPIB0-22
Name = multimeter-agilent_34401a
ObjectVisibility = on
RsrcName =
Status = open
Tag =
Timeout = 10
Type = multimeter
UserData = []
MULTIMETER specific properties:
ApertureTime = 10
AutoImpedance = off
AutoRange = on
AutoZero = on
Bandwidth = 20
Calibration = [1x1 iccalibration]
DataPointsAvailable = 0
Display = [1x1 icdisplay]
InputTerminal = front
Math = [1x1 icmath]
MeasurementType = resistance
PowerLineFrequency = 50
Range = 10000
Resolution = 0.01
SampleCount = 1
System = [1x1 icsystem]
Trigger = [1x1 ictrigger]
And here is the code I execute
% Create a GPIB object.
interfaceObj = instrfind('Type', 'gpib', 'BoardIndex', 0, 'PrimaryAddress', 22, 'Tag', '');
% Create the GPIB object if it does not exist
% otherwise use the object that was found.
if isempty(interfaceObj)
interfaceObj = gpib('CONTEC', 0, 22);
else
fclose(interfaceObj);
interfaceObj = interfaceObj(1);
end
% Create a device object.
deviceObj = icdevice('agilent_34401a.mdd', interfaceObj);
% Connect device object to hardware.
connect(deviceObj);
% Configure property value(s).
set(deviceObj, 'MeasurementType', 'resistance');
tic
for i=1:1e2
R(i)=str2num(invoke(deviceObj, 'measure'));
T(i)=toc;
end
disconnect(deviceObj);
Is there something wrong in my configuration or in the command I am using?
Thanks a lot.
Gianni
TMTool automatically generates MATLAB script as you work with the tool, that you can incorporate into a MATLAB application and use over and over again. To access and save this script, click on the "Session Log" tab and the "Save Session..." button. You can then save off this script in a MATLAB file.
To learn more about using MATLAB with TMTool, you can read the on-line documentation at http://www.mathworks.com/tmtool