AnsweredAssumed Answered

Problem Communication between 33522A and MATLAB using icdevice and driver

Question asked by florentlecocq on May 22, 2012
Latest reply on May 31, 2012 by florentlecocq

I try to communicate with the AWG 33522A using Matlab and the "device object" environment. For this I download the Matlab driver for the agilent website ("IVI-COM, IVI-C Version for 3352X for 32-bit Windows ") and I install it on my computer.

Then I search what is the name of the driver using the Matlab command :  *+instrhwinfo('ivi').+*

After finding what name of driver could the good one in the list (here I find one called *+'Ag3352x.Ag3352x'+*), I convert it into a Matlab Driver using : *+makemid('Ag3352x.Ag3352x','Ag33522A.mdd');+*

I can now create a Device object using this driver : *+awg = icdevice('Ag33522A.mdd', 'TCPIP0::A-33522A-00132.local::inst0::INSTR');+*

On my matlab Workspace appear the icdevice object *+awg+*. You can now open a session : *+connect(awg)+*

If you double click on the object in the workspace you have acces to a lot of the parameters of the AWG. Or you can call the function *+set+* and modify some of these parameters.

For example the following lines turn on the output of both channels :
*+for i =1:2+*
*+set(awg.Channeloutput(i), 'Enabled', 'on');+*

BUT here is the problem, I want to modify let say the Sample Rate of both channel. The corresponding property *+awg.Channeloutputfunctionarbitrarywaveformsrate+* is only a 1 dimensionnal object ! I can only change channel 1... (as a contrary *+awg.Channeloutput+* is a 1x2 object, *+awg.Channeloutput(1)+* or *+awg.Channeloutput(2)+* give access to the 2 channels.)

Do I miss something, like a function that will switch from channel 1 to channel 2 ? Or the driver is not perfect for the 33522A ? 

Thanks a lot for your help !