MATLAB Device Driver Wrapper: IVI-C vs IVI-COM
Mostrar comentarios más antiguos
What is the difference in how MATLAB treats device drivers created from ivi-c vs ivi-com drivers. (I am using Agilent I/O Library Suite 16)
I downloaded, from the Agilent web site, ivi drivers for Ag33522A arbitrary waveform generator. The package installed both the ivi-c, and ivi-com "flavours" of the driver.
I used the MIDEDIT GUI to create a MATLAB wrapper for both ivi-c and ivi-com driver. I saved these in individual *.mdd files.
Then I used the TMTOOL GUI do define the hardware resource, logical name, etc, in the IVI configuration store.
Then I created 2 device objects: one using .mdd driver created from ivi-c, and the other using .mdd driver from ivi-com. Both object were created without any errors.
However, I can only connect to ivi-COM based object, but not to ivi-C one - I am NOT trying to connect both at the same time.
So, can anybody tell me what's going on?
I was under an impression that MATLAB does not care which flavour of IVI is used.
Any insight will be greatly appreciated.
tom
=================================================================
Here is the command line version of my problem (I am adding this to clarify initial question). The following lines execute properly and result in the valid device object (IVI-COM):
info = instrhwinfo('ivi');
info.ProgramIDs
%in the line below the first argument is the string in ProgramIDs
makemid('Ag3352x.Ag3352x','AFG_ivicom.mdd');
obj_com=icdevice('AFG_ivicom','GPIB7::10::INSTR','optionstring','Simulate=true');
connect(obj_com)
Now, here is an attempt at creating device object based on ivi-c driver:
info = instrhwinfo('ivi');
info.Modules
% in the line below the first argument in the string in Modules
makemid('Ag3352x','AFG_ivic.mdd','ivi-c');
obj_c=icdevice('AFG_ivic','GPIB7::10::INSTR','optionstring','Simulate=true');
connect(obj_c)
The above line returns the following error:
??? Error using ==> icdevice.connect at 117 The VXIplug&play driver could not connect to the instrument using the specified resource. If this error is not an instrument error, use MIDEDIT to inspect the driver.
BTW, I can't find a way to use MIDEDIT to diagnose this, either.
Any insight will be greatly appreciated.
Thank you in advance
tom
2 comentarios
Walter Roberson
el 14 de Oct. de 2011
Which MATLAB version are you using? And 32 or 64 bit?
Tom
el 17 de Oct. de 2011
Respuestas (1)
Vinod
el 19 de Dic. de 2011
0 votos
Tom,
From a user's perspective, once you create the MDD file IVI-COM and IVI-C drivers will look similar in terms of interacting with it from MATLAB.
To get the IVI-C driver working, type 'mex -setup' in MATLAB and follow the steps to select your compiler. I suggest you report the issue to MathWorks technical support.
-Vinod
3 comentarios
Vijith Natarajan
el 5 de Dic. de 2012
Editada: Vijith Natarajan
el 5 de Dic. de 2012
Hi, I did the same thing but i could create device object using both(ivi c and ivi com) but when i try to connect using tmtool. i could connect the device object which i created using ivi c. but when i try to connect using the device object of ivi com. it says "unable to connect to the instrument"
Pls help on this
Walter Roberson
el 5 de Dic. de 2012
You are replying to something that is a year old. You should not expect that Vinod will read and reply within 3 1/2 hours.
Vijith Natarajan
el 6 de Dic. de 2012
yes ..yes...
Categorías
Más información sobre IVI and VXIplug&play Drivers en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!