| 崔粤鹏 |
2014-08-21 16:23 |
FRED接口
FRED可与Matlab Excel接口,并可支持VB脚本语言编程。 OR10IS immf\ 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. !,DA`Yt 下面是FRED原厂photon engineering与Matlab并行使用的接口连接,有兴趣的可以看下 / EVXkf0 S)^eHuXPI FRED Automation with Matlab 2d OUY
$4 'L%)B-,n 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: A{Y/eG8 In MATLAB: lp1GK/!s Start an instance of MATLAB 6ZC~q=my Execute the command: enableservice(‘AutomationServer’,true) k,/2]{#53d Execute the command: enableservice(‘AutomationServer’) X&%;(` In FRED: OK:YnSk " Right mouse click in the script editor and choose: Edit > References *W4~.peoE Choose the Matlab Type Library '"V]>) Dimension your Matlab object in the script as type MLApp.MLApp j|r$!gV 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. <ZoMKUuB n*eqM2L The example enbedded script in the sample file with this article demonstrates how to use some of the following Matlab application commands: wqt/0,\ PutWorkspaceData: send real-valued data to Matlab Q3LScpp PutFullMatrix: send complex-valued data to Matlab pm*i!3g' GetWorkspaceData: retrieve data from Matlab ","to Execute: issue Matlab commands to the server for execution ~=Fp0l)# ENZYrWl
链接:http://fred-kb.photonengr.com/2011/08/16/fred-automation-with-matlab/
|
|