MATLAB Device Driver Wrapper: IVI-C vs IVI-COM

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 commentaires

Which MATLAB version are you using? And 32 or 64 bit?
Tom
Tom le 17 Oct 2011
I am using 32-bit R2011a...

Connectez-vous pour commenter.

Réponses (1)

Vinod
Vinod le 19 Déc 2011

0 votes

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 commentaires

Vijith Natarajan
Vijith Natarajan le 5 Déc 2012
Modifié(e) : Vijith Natarajan le 5 Déc 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
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.
yes ..yes...

Connectez-vous pour commenter.

Question posée :

Tom
le 14 Oct 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by