首页 -> 登录 -> 注册 -> 回复主题 -> 发表主题
光行天下 -> FRED,VirtualLab -> FRED软件能否用其他软件调用,比如VisualC++,.net等 [点此返回论坛查看本帖完整版本] [打印本页]

blackdoll 2013-09-18 22:10

FRED软件能否用其他软件调用,比如VisualC++,.net等

如题, 在demo软件中,没看到类似问题的帮助文档,哪位大侠用过,FRED有没有提供接口供其它软件调用,有的话顺便给个文档介绍或是指条路啊 <"xqt7f  
8G9( )UF.  
崔粤鹏 2014-08-21 16:08
FRED可以与MATLAB 、EXCEL建立接口,支持VB语言,且其脚本是以VB语言编写的,编程非常顺手 t~nW&]E  
以下是FRED手册给出的 XW@C_@*J  
&GvSgdttv  
FRED can act as an OLE automation server, which means that FRED can be run remotely from other applications such as Microsoft Visual Basic, Microsoft Excel, Matlab, or any other application that can act as an OLE/Automation client.  In  this configuration, FRED is the automation server and the application which is controlling FRED is the automation client.  The following information describes the fundamentals of how to run FRED as an automation server. H@~tJ\L  
http://fred-kb.photonengr.com/2011/08/16/fred-automation-with-matlab/ 9 `q(_\x  
此网站是FRED原厂知识库中如何与matlab接口 JG1q5j##]b  
Using FRED’s COM interface it is possible to exchange data with external programs such as MATLAB and Excel.  This article presents an example where FRED and MATLAB are used respectively as the automation client and server in order to exchange data and create plots.  There are a few steps that should be taken both in FRED and MATLAB before executing your script: qPWf=s7!  
5p5"3m;M7  
In MATLAB: ]gm3|-EiY  
g)D@4RM  
Start an instance of MATLAB 1uR@ZK  
Execute the command: enableservice(‘AutomationServer’,true) r KdsVW  
Execute the command: enableservice(‘AutomationServer’) d6 -q"  
In FRED: L~by`q N_  
@ 'N $5  
Right mouse click in the script editor and choose: Edit > References SW+;%+`  
Choose the Matlab Type Library -yg;,nCg  
Dimension your Matlab object in the script as type MLApp.MLApp p=Le oc1  
The above steps will ensure that 1) FRED uses the current instance of MATLAB as the server instead of the command console, and 2) FRED loads the Matlab type library and can recognize and execute the server’s application commands.  In general, it is not necessary to load the Matlab type library in FRED since the Matlab server can be generically defined as an Object. D/%v/mpj$  
v0tFU!Q%  
The example enbedded script in the sample file with this article demonstrates how to use some of the following Matlab application commands: OYn5k6  
7!FiPH~kM  
PutWorkspaceData: send real-valued data to Matlab ko'V8r `V  
PutFullMatrix: send complex-valued data to Matlab _bg Zl  
GetWorkspaceData: retrieve data from Matlab :`"- Jf  
Execute: issue Matlab commands to the server for execution
fruitrabbit 2015-10-29 06:23
正好需要,抱走啦,多谢多谢
查看本帖完整版本: [-- FRED软件能否用其他软件调用,比如VisualC++,.net等 --] [-- top --]

Copyright © 2005-2024 光行天下 蜀ICP备06003254号-1 网站统计