Creating an arbitrary waveform in MATLAB and loading an arbitrary function generator (agilent AG33220A)

I get the following error: ??? Error using ==> icdevice.connect with 117 GPIB: AGILENT: the specified board is not installed or not configured properly. If this error is not a device error, use MIDEDIT to verify the driver.

Please let me know how to make it work. I follow the instructions:

http://cp.literature.agilent.com/litweb/pdf/5990-3465EN.pdf

Thanks.

The code:

clear all; close all;clc time = 0:0.001:1; % Defi ne time vector to contain whole %number of cycles of waveform Amp1 = 0.2; % Amplitude for each component of waveform Amp2 = 0.8; Amp3 = 0.6; frequency1 = 10; % Frequency for each component of waveform frequency2 = 14; frequency3 = 18; wave1 = Amp1*sin(2*pi*frequency1*time); % Waveform component 1 wave2 = Amp2*sin(2*pi*frequency2*time); % Waveform component 2 wave3 = Amp3*sin(2*pi*frequency3*time); % Waveform component 3 wave = wave1 + wave2 + wave3; % Some combination of individual waveforms wave = wave + 0.3*rand(1,size(wave,2)); % Now add random noise into the signal wave = (wave./max(wave))'; % Normalize so values are between -1 to + 1 % Visualize the signals % plot(time,wave1,'m',time,wave2,'k',time,wave3,'r'); % hold on; hw = plot(time,wave,'b'); set(hw,'Linewidth',2.5) % xlabel('Time (s)'); ylabel('Voltage (V)'); axis tight; % legend('Component 1','Component 2','Component 3', ... % 'Combination of components \newline with random noise') v = gpib('agilent',0,10); device = icdevice('agilent_33220a.mdd',v); connect(device) invoke(device.Arbitrarywaveform,'SetData',wave); invoke(device.Arbitrarywaveform,'CopyData','MATLABWFM1'); set(device.Arbitrarywaveform,'User','MATLABWFM1'); set(device.Output, 'Function','Agilent33220OutputFunctionUser'); set(device.Output, 'Frequency', 1); set(device.OutputVoltage, 'Amplitude', 10); set(device.Output,'State','on') 
+4
source share
1 answer

I received a similar error message:

GPIB: AGILENT: The indicated board is not installed or not configured properly.

My solution was to use the tmtool .

On the screen that appears, there is a menu tree on the left side.

I clicked Hardware-> GPIB, and the middle part of the screen showed an empty list with the headers “Supplier” and “Index of the board”.

Then I clicked the Scan button in the lower right half of the middle section below this empty list.

Matlab thought about life for a long time, and then the list unexpectedly populated with a number of entries.

The top entry says "Agilent Technologies (agilent)" with an index of Board 8.

I switched the board index into my code to match this, and it worked.

I think that Matlab discovered the opening of the boards, and then the presence of the desired index.

Hope this helps!

0
source

Source: https://habr.com/ru/post/1403284/


All Articles