LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

releted to MATLAB

To run matlabdemo.prj your suggestion was
1) So I would suggest, if you haven't already, upgrading your runtime engine to CVI 7.1.1. The CVI runtime engine is backwards compatible so you will still be able to build you applications in CVI 7.0.
2) Once you do this, recreate the Matlab instrument. Remove the current Matlab instrument and recreate the Matlab Automation Server Type Library by going to Tools >> Create ActiveX controller. The name of the Matlab instrument will be Matlab Application Type Library. Save the newly created ActiveX controller with the same name as the previous one (as in, just replace the one that is already in the shipping example directory with the newly created one).
3) Change the matlabdemo.c launch callback to read
stat = MLApp_NewDIMLApp (NULL, 1, LOCALE_NEUTRAL, 0, &hMatlab);
instead of
stat = MLApp_NewDIMLApp (NULL, &hMatlab);
4) Open the source code for the Matlab instrument and search and replace ALL instances of &MLApp_IID_DIMLApp with &IID_IDispatch.
   Following this I have completed all the steps except the last one.In the source codes matlabdemo.c,matlabsrvr.c,matlabutil.c I have not found &MLApp_IID_DIMLApp to be replaced with &IID_IDispatch.So with this 3 steps I have run matlabdemo.prj
.Now after pressing the launch button the  error message is  "no such interface is supported".So I am unable to send anything to matlab.Matlab version is 7.0.0 and CVI demo version is 7.1.0
0 Kudos
Message 1 of 2
(2,970 Views)
Hi Embeded,

You will need to follow all of those steps in order for the example to work properly. If you skip the fourth step the example will not work. For why this needs to be changed see this thread.
Test Engineer - CTA
0 Kudos
Message 2 of 2
(2,949 Views)