LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview与Matlab混合编程的问题

诸位大神:

      你们好!我想通过dll调用Labview调用Matlab的函数,现在,我已经用Matlab2009b的deploytool,将一个很简单的函数(加法)编译出一个目标为:C++ shared library的dll了,但是,当我用Labview的“调用库函数节点”调用该dll时,系统提示“没有找到mclmcrrt713.dll,因此这个应用程序未能启动。重新安装程序可能会修复此问题”。

      首先,我认为重新安装Labview或Matlab都不会有用;

      其次,目前我在网上收不到相关资料,仅仅有些网友在讨论mclmcrrt713.dll,说这是Matlab的东西,和Matlab生成的exe运行有关。我觉得是不是因为Labview在调用这个Matlab生成的dll的时候必须做好其他配置:如设置调用Matlab一些文件的路径等等;

      再次,我知道Labview是能够直接调用C++编译好的dll的,所以是不是因为Matlab以目标为C++ shared library编译出的dll不相当于一个C++编译的dll。

      如果哪位大神想看一下我编译好的dll的组件,我再把东西发过去。

      请各位大神指点迷津,在下感激不尽!    

      QQ截图20120610163023.jpg

0 Kudos
Message 1 of 2
(4,510 Views)

There is no way to reproduce your error here. However there are two ways to call .m files in LabVIEW.

 

One way is to create a DLL in Matlab and then call the DLL in LabVIEW

First Create a Matlab DLL: Second import the DLL in LabVIEW: From the Block Diagram please select Tools>>Import>> shared library(.dll) 


There is another way and you may try as an walkaround solution: 
http://forums.ni.com/t5/LabVIEW-MathScript-RT-Module/using-matlab-m-functions-in-labview/m-p/970850?... 

 

Please let me know if it helps. If not, I think it will help us troubleshoot more efficiently if you can consolidate your code to the smallest portion that replicates your error and post it here.

Yupeng J.
0 Kudos
Message 2 of 2
(4,502 Views)