切换到宽版
  • 广告投放
  • 稿件投递
  • 繁體中文
    • 2222阅读
    • 0回复

    [原创]FRED接口 [复制链接]

    上一主题 下一主题
    离线崔粤鹏
     
    发帖
    349
    光币
    2956
    光券
    0
    只看楼主 倒序阅读 楼主  发表于: 2014-08-21
    FRED可与Matlab Excel接口,并可支持VB脚本语言编程 hq|j C  
    73! x@Duh  
    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. SdEb[  
    下面是FRED原厂photon engineering与Matlab并行使用的接口连接,有兴趣的可以看下 dK=D=5r,  
    j`LT`p"9S  
    FRED Automation with Matlab o m{n"cg  
    BDB zc5Q(  
    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: -r6(=A  
    In MATLAB: a9mr-`<  
    Start an instance of MATLAB xX/Qoq (}i  
    Execute the command: enableservice(‘AutomationServer’,true) |-cALQ  
    Execute the command: enableservice(‘AutomationServer’) '|dKg"Yl  
    In FRED: rRA_'t;uK  
    Right mouse click in the script editor and choose: Edit > References !0d9<SVC  
    Choose the Matlab Type Library skmDsZzw  
    Dimension your Matlab object in the script as type MLApp.MLApp 1*x5/b  
    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. Og%zf1)aZM  
    8WLh]MD`  
    The example enbedded script in the sample file with this article demonstrates how to use some of the following Matlab application commands: f|[5&,2<  
    PutWorkspaceData: send real-valued data to Matlab I5|S8d<  
    PutFullMatrix: send complex-valued data to Matlab OFPd6,(E  
    GetWorkspaceData: retrieve data from Matlab iz,q8}/(  
    Execute: issue Matlab commands to the server for execution W4] 0qp`\  
    ^*owD;]4_  
    链接:http://fred-kb.photonengr.com/2011/08/16/fred-automation-with-matlab/  
     
    分享到