FRED可與
Matlab Excel接口,并可支持VB腳本語言
編程。
@OGG]0
J mU~&oU 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.
<5,|h3]-# 下面是FRED原廠photon engineering與Matlab并行使用的接口連接,有興趣的可以看下
s2GF*{ hSR+7qN<e FRED Automation with Matlab
=*I|z+ ,p OGT71 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:
dGi
HO In MATLAB:
)TKn5[<4 Start an instance of MATLAB
%q~q,=H$] Execute the command: enableservice(‘AutomationServer’,true)
Yb4ku7} Execute the command: enableservice(‘AutomationServer’)
dgIH`<U$ In FRED:
Aq*?Q/pV Right mouse click in the script editor and choose: Edit > References
,i??}Wm5G Choose the Matlab Type Library
RGs7Hc Dimension your Matlab object in the script as type MLApp.MLApp
~#jiX6<I 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.
pf107S P