AnsweredAssumed Answered

U2701A averages with Matlab

Question asked by anderzornoza on Jul 16, 2010
Hello,
after installing the new IVI driver for Agilent u2701a I am not able to perform measurements with averages comunicating via Matlab with the scope. Most of the commands work, but not averaging. Here is the program I have made:

% Create a device object.
% Please put in the VISA Address of connected device
deviceObj = icdevice('AgilentU2701A.mdd', 'USB0::0x0957::0x2918::MY48301009::0::INSTR');

% Connect device object to hardware.
connect(deviceObj);

% Set the Channel's range
%set(deviceObj.Channels(1), 'Range', 8);

%poniendo medias
set(deviceObj.Acquisition, 'NumberOfAverages', 999);

% Enable Channel
set(deviceObj.Channels(1), 'Enabled', 'on');


%wait until the averages are done:
groupObj = get(deviceObj, 'Measurement')
groupObj = groupObj(1)
invoke(groupObj, 'Initiate')
groupObj = get(deviceObj, 'System');
groupObj = groupObj(1);
invoke(groupObj, 'WaitForOperationComplete',50000000000000000)

%Read and plot data:

groupObj = get(deviceObj, 'Measurements');
groupObj = groupObj(1);
[waveformarray, initialx, xincrement] = invoke(groupObj, 'ReadWaveform', 10000);
data = waveformarray';
plot(data);

No matter how many averages I set, it does not make any, but always returns the number I set when I ask wiht the "get" command. This scope was bought because of its hability to perform averages in the hardware, but it is a really big disappointment if we cannot use this property via Matlab. I would love some help.

Best regards,
Ander  

Outcomes