09-28-2006
04:02 PM
- last edited on
07-02-2024
10:29 AM
by
Content Cleaner
I'm trying to run the Labwindows/CVI demo "Matlabdemo.zip" which was created by NI ( http://zone.ni.com/devzone/cda/epd/p/id/2994 ). The ultimate goal is to call Matlab functions from CVI. I'm developing with CVI 5.5 and Matlab 7.1.0 R14 SP3. Since there were compiler errors on the demo source, I found this article about a slight modification to make to the matlabdemo.c source:
http://digital.ni.com/public.nsf/allkb/0FB80F59D0AF9A4F8625703E007BF78B
Plus I followed those instructions to create a new activex automation controller using the ".fp" file that came with the matlabdemo.zip. I also installed the CVI 8.0.1 Runtime.
Runtime Error symptoms:
What happens is the "MATLAB DEMO" window pops ups. This is the CVI window that has the button "Launch Matlab" and a host of other things to demonstrate the CVI/Matlab interface. I click "Launch Matlab." Soon after, a matlab window opens in the minized state. Then, apparently before things get connected, I get a CVI "ERROR MESSAGE" which says "No such interface supported" and this popup has an OK button. I click OK, and the buttons in the MATLAB DEMO are no longer greyed out. I click the button "Exit Matlab" and get another popup "ERROR," "Error in closing MATLAB". My only option is to click "QUIT DEMO."
I found this forum post:
http://forums.ni.com/ni/board/message?board.id=231&message.id=3681matching my error. The forum post links to: http://digital.ni.com/public.nsf/websearch/496671868A2838AF86256BB8005CDC98?OpenDocument
and also a Microsoft Knowledgebase article. I completed the replacement of the comcat.dll file to the 4.71 (22 kB version), however the same symptoms remain.
Any suggestions on how to get this CVI<->Matlab interface working? Thanks for your help.
09-29-2006 04:55 PM
In 5.5, there are no instances of $MLApp_IID_DIMLApp at all in the source files.
Open the source code for the MATLAB instrument and search and replace ALL instances of &MLApp_IID_DIMLApp with &IID_IDispatch.