External Mode Simulations for Parameter Tuning and Signal Monitoring
您可以使用外部模式模拟进行快速原型设计。外部模式仿真在Simulink之间建立了一个通信信道金宝app®在您的开发计算机(主机)和运行代码生成和构建过程创建的可执行文件的目标硬件上。
Through the communication channel, you can:
实时修改或调谐块参数。在模型中更改参数时,Simulink将新值下载到执行目标应用程序。金宝app
从执行目标应用程序监视和保存信号数据。
通道的低级传输层处理消息的传输。金宝appSimulink和生成的模型代码与此图层无关。传输层及其接口代码在不同的模块中被隔离,该模块格式化,发送和接收消息和数据包。
外部模式的通信机制
金宝appSimu金宝applink支持两个用于外部模式仿真的通信机制。要确定要使用的机制,请参阅此表中的信息。
Communication Mechanism | 金宝app支持 | 选择沟通机制的原因 |
---|---|---|
XCP,通用测量和校准协议 |
ert和grt系统目标文件。 Some Simulink support packages. For details, see//www.tatmou.com/hardware-金宝appsupport.html?q =&page=1。 |
XCP external mode:
有关运行XCP外部模式模拟的信息,请参阅: |
TCP / IP和串行(RS-232) |
ERT,GRT和RSIM系统目标文件。 Simulink support packages. |
XCP外部模式模拟不支持您的目标硬件,因为金宝appknown limitations。 为运行TCP / IP和串行交货信息ternal mode simulations, see: |
Simulink Feature Support for External Mode
This table summarizes feature support for both forms of external mode simulations.
特征 | XCP Support | TCP/IP and Serial Support | |
---|---|---|---|
Parameter tuning |
With Dashboard blocks |
是的 |
是的 |
Of调节块参数 |
是的 |
是的 |
|
仿真数据检测器 |
是的。包括引用模型中的信号。 |
No |
|
Logic Analyzer |
是的。包括引用模型中的信号。 |
No |
|
Blocks that receive and display signals from target application |
仪表板库 | 是的 | No |
浮动范围,范围 |
是的 |
是的 |
|
Spectrum Analyzer, Time Scope (DSP System Toolbox™) |
是的 |
是的 |
|
展示 |
是的 |
是的 |
|
到工作区 |
是的 |
是的 |
|
User-written S-Function. 一种方法,它能够构建在S函数API中构建了支持外部模式的用户写入块。金宝app 看 |
是的 |
是的 |
|
是的 |
是的 |
||
是的 |
是的 |
External Mode Simulations by Using the Run on Custom Hardware App
To run external mode simulations on your development computer or target hardware that is not supported by MathWorks®金宝app支持包,请使用自定义硬件应用程序上运行。对于外部模式仿真,您:
构建开发计算机上的目标应用程序。
部署the target application to the target hardware.
连接Simulink to the target application that runs on the target hardware.
开始execution of generated code on the target hardware.
使用应用程序,您可以单击单击或使用一键执行步骤。此表显示了应用程序为目标硬件提供的工作流支持。金宝app
Workflow Feature or Task | 目标硬件 | ||
---|---|---|---|
Development Computer | 自定义硬件 | ||
一点击 |
是的 |
是的那if you设置连接between Simulink and your target hardware. |
|
Step-by-step | 建立监控 |
是的 |
是的。Software builds target application on development computer by using the toolchain that you specify. |
部署 |
是的 |
是的那if you设置连接between Simulink and your target hardware. |
|
连接 |
是的 |
是的 |
|
开始 |
是的 |
是的 |
外部模式控制面板
Using the External Mode Control Panel, you can perform some of the functions that the Run on Custom Hardware app provides, for example,连接那开始那and断开。You can also open the External Signal & Triggering dialog box, which enables you to:
选择要监视的记录信号。
Configure a trigger for uploading target application data.
有关详细信息,请参阅XCP面板orTCP / IP和串行面板。
外部模式模拟的安全性
确保访问您的开发计算机和目标硬件是安全的。
通过应用本表中列出的安全措施,在开发计算机和目标应用程序之间提供安全通信通道。
通信协议 | 安全措施 |
---|---|
TCP / IP上的XCP,TCP / IP |
在可信私有网络或虚拟专用网络(VPN)中运行您的开发计算机和目标应用程序。 |
XCP串行,串行 |
Use a point-to-point link between your development computer and target application, for example, a serial cable. |
Before generating code for production, to reduce the risk of unintended access to the target application, disable external mode settings.