快速原型部署
编译、验证、细化和测试生成的可执行文件
根据应用程序要求、原型构建或生产环境以及您当前所处的开发流程阶段,从几种部署方法之中选择一种方法。如果要在开发计算机上运行快速、独立的仿真,例如批量仿真或蒙特卡罗仿真,请使用快速仿真 (RSim) 目标编译可执行文件。加快仿真的另一种方法是生成一个可在其他模型中使用的 S-Function 模块。除了提高仿真速度外,此方法还可以重用代码并保护知识产权。
通过外部模式仿真,您可以创建一个通信信道,连接开发计算机与运行由代码生成及编译过程创建的可执行文件的目标处理器。通过该通信信道,您可以修改目标程序的参数值,并监测和存储来自目标程序的信号数据。
如果实时响应非常重要,请编译并部署可执行程序。基于控制系统的组件或表示受控系统的模型编译程序。在基于组件的情况中,您可以在实时仿真器或微处理器上边运行代码边对其进行编译、部署和调优。对于测试环境,您可以为模型编译一个可执行文件并将其下载到硬件在环 (HIL) 仿真平台上。设置环境后,运行可执行程序,以实时验证系统或控制单元。
类
函数
包
target | 管理目标硬件和构建工具信息 |
App
在自定义硬件上运行 | Run external mode simulations |
模块
Generated S-Function | 将模型或子系统表示为生成的 S-Function 代码 |
主题
快速原型注意事项
- Choose an External Code Integration Workflow
For application integration points, characterize external code, identify code generation integration requirements, and choose a workflow. - Deploy Algorithm Model for Real-Time Rapid Prototyping
Deploy algorithm model for testing in real time. - Untrusted Custom Code, Custom Targets, and Callbacks
Use of untrusted custom code entails risk.
快速仿真
- Accelerate, Refine, and Test Hybrid Dynamic System on Host Computer by Using RSim System Target File
Accelerate simulation of a model in nonreal-time on your development computer. - Run Rapid Simulations over a Range of Parameter Values
This example shows how to use the RSim system target file to run simulations over a range of parameter values. - Run Batch Simulations Without Recompiling Generated Code
This example shows how to run batch simulations without recompiling the generated code. - Use MAT-Files to Feed Data to Inport Blocks for Rapid Simulations
This example shows how the code generator RSim -i option lets you use a MAT-file as the input data source for Inport blocks for rapid simulations.
可重用组件部署
- 将 S-Function 目标用于模型或子系统
使用从模型或子系统中生成的可以动态加载到其他应用程序中的共享库。 - 通过使用共享库对接在开发计算机上运行的仿真器
生成可以动态加载到其他应用程序中的共享库。
外部模式仿真
- 用于参数调节、信号监控和代码执行探查的外部模式仿真
通过开发计算机和目标硬件之间的通信信道调整参数、监控信号并检索执行时间指标。 - External Mode Simulation by Using XCP Communication
Run external mode simulations that use an XCP communication channel. - Graphical Controls for XCP External Mode Simulations
Hardware tab and External Mode Control Panel controls for XCP external mode simulations. - Set Up External Mode Connectivity Between Simulink and Target Hardware
Usetarget
package to provide connectivity between Simulink® and target hardware. - Customize XCP Server Software
Customize XCP server software for target hardware. - 使用 TCP/IP 或串行通信的外部模式仿真
运行使用 TCP/IP 或串行通信信道的外部模式仿真。 - 为 TCP/IP 或串行外部模式通信创建传输层
创建自定义底层通信层,以支持通过外部模式连接到自定义目标。
HIL 仿真
- Deploy Environment Model for Real-Time Hardware-In-the-Loop (HIL) Simulation
Deploy environment model for testing in real time.