外部模式模拟可帮助您在Simulink之间建立通信渠道金宝app®model and the target hardware. The channel runs the executable file in real time and is created by the build and code generation process.
通信通道可以是串行中TCP/IP或XCP上的通用测量和校准协议(XCP)。您可以使用该频道来:
您还可以通过选择ERT.TLC生成一个A2L文件,包括其XCP从地址(需要嵌入式编码器®)。该A2L文件可以直接与支持XCP的任何第三方校准工具一起使用。金宝app
通过按照以下说明来自定义XCP从软件以在硬件上运行://www.tatmou.com/help/releases/R2020a/rtw/ug/customize-xcp-slave-software.html
看哪个XCP-based外部模式模拟enabled to the commercial and maker targets supported by Simulink code generation products:
//www.tatmou.com/hardware-金宝appsupport.html?q=&fq = hardware-support-protocol-standard:xcp&page = 1
通过遵循此文档:通过XCP功能尝试外部模式:
//www.tatmou.com/help/supportpkg/armcortexa/ug/external-mode-simulation-with-xcp-communication.html
This video shows how to use Simulink to tune and log data from a generated executable running on your PC or hardware using external mode. External mode simulation helps you establish a communication channel between the assembling model and the target hardware. It runs the executable file in real time created by the build and code generation process. The communication channel could be the universal measurement and calibration protocol. That is, XCP. It can be on TCP/IP, or XCP on serial.
您可以使用仪表板块实时调整参数,并从执行目标应用程序中监视锁定信号数据。您还可以将数据流到仿真数据检查器或逻辑分析仪。此外,您可以从模型层次结构中传输用于参考模型的信号。
现在,让我们为外部模式模拟准备此容忍故障的燃料系统模型。让我通过在Simulink工具带上打开摘要来开始准备。金宝app让我单击“自定义硬件”。在这里,我可以使用grt.tlc。
OK, now let's go to the Solver pane. To specify the value for fixed-step size field, in the Optimization pane, make sure the default parameter behavior is set to tunable. Now select the external mode option and set transport layer to XCP on TCP/IP. XCP uses the static memory allocator on the target. This static memory buffer size value specifies the size of XCP slave memory that is allocated for signal logging. Let's use the default value for the demo.
好的,现在我们都设置了配置。让我们保存这些设置和模型。现在使用此按钮构建目标应用程序。看起来建筑物已经完成,以及代码生成。现在,让我们通过单击此部署按钮在目标上运行应用程序。现在,我们可以将Simulink连接到金宝app我们的等待或运行目标应用程序。最后,让我们开始在此目标环境中实时执行生成的代码。
在这里,您可以使用这些仪表板块在参数中排队。让我打开同化数据检查器以查看流信号。您也可以使用逻辑分析仪查看相同的信号。您也可以单击此显示器和调整按钮进行仿真。您可以通过选择ERT.TLC来生成A2L文件,包括其XCP从地址的详细信息。然后启用ASAP2接口选项。
Now let me build the model. Notice that A2L files are generated. It contains details of the XCP slave interface and address of the characteristics and measurements. This can be directly used with any third party calibration tools that support XCP.此外,您可以按照以下说明自定义XCP从属软件在硬件上运行。
We have also enabled XCP-based external mode simulations, the commercial and maker targets supported by Simulink and code generation products。在此视频中,您已经学会了如何使用XCP配置模型为外部模式模拟。现在轮到您通过遵循此文档来尝试外部模式功能。
Select a Web Site
选择一个网站以获取可用的翻译内容,并查看本地事件和优惠。根据您的位置,我们建议您选择:。
You can also select a web site from the following list:
选择中国网站(中文或英语)以获得最佳场地性能。其他Mathworks乡村网站未针对您所在的访问进行优化。