FRED可与
Matlab Excel接口,并可支持VB脚本语言
编程。
J-
S.m( }PJsPIa3j FRED can act as an OLE automation server, which means that FRED canbe run remotely from other applications such as Microsoft Visual Basic,Microsoft Excel, Matlab, or any other application that can act as anOLE/Automation client. In this configuration, FRED is the automation serverand the application which is controlling FRED is the automation client. Thefollowing information describes the fundamentals of how to run FRED as anautomation server.
Wa|V~PL+T 下面是FRED原厂photon engineering与Matlab并行使用的接口连接,有兴趣的可以看下
aG]>{(~cL /-p!|T}w FRED Automation with Matlab
FL{?W (M +7b8 ye 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:
(|BY<Ac3 In MATLAB:
Jx5`0? Start an instance of MATLAB
eMRH*MyD Execute the command: enableservice(‘AutomationServer’,true)
i3,.E]/wX@ Execute the command: enableservice(‘AutomationServer’)
@F5Af/ In FRED:
W+&5G(z~ Right mouse click in the script editor and choose: Edit > References
QP%_2m>yhl Choose the Matlab Type Library
WrGA7&!+ Dimension your Matlab object in the script as type MLApp.MLApp
`sKyvPtG 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.
M,fL(b;2 Oin9lg-jR The example enbedded script in the sample file with this article demonstrates how to use some of the following Matlab application commands:
es*$/A PutWorkspaceData: send real-valued data to Matlab
| @AXW PutFullMatrix: send complex-valued data to Matlab
I&+.I K_ GetWorkspaceData: retrieve data from Matlab
JjS+'A$A5 Execute: issue Matlab commands to the server for execution
mU-2s%X<.^ +b-ON@9]J` 链接:
http://fred-kb.photonengr.com/2011/08/16/fred-automation-with-matlab/