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
Walter Roberson
2011년 10월 14일
Which MATLAB version are you using? And 32 or 64 bit?
Tom
2011년 10월 17일
답변 (1개)
Vinod
2011년 12월 19일
0 개 추천
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
Vijith Natarajan
2012년 12월 5일
편집: Vijith Natarajan
2012년 12월 5일
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
2012년 12월 5일
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
2012년 12월 6일
yes ..yes...
카테고리
도움말 센터 및 File Exchange에서 Instrument Control Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!