simulink 下 PIL 仿真的串口

[复制链接]
1110|1
 楼主| airwill 发表于 2019-1-10 21:37 | 显示全部楼层 |阅读模式
simulink 下 MBD 开发软件, 通过串口进行 PIL 仿真, 一下就实现了,  换了个串口的端口,  想改个串口, 没有找到哪里设置了
 楼主| airwill 发表于 2019-1-11 15:53 | 显示全部楼层
来自 SIMULINK 的帮助文档

Choose a Serial Communication Interface for PIL Simulation
The Embedded Coder Support Package for Texas Instruments C2000 supports serial communication interface for PIL over SCI-A.

After establishing a serial connection, find the COM port associated with the target hardware.

For more information on how to configure the Virtual COM port refer to this page. Note the COM port number of the USB Serial Port showing in your Windows Device Manager under Ports "(COM & LPT)"

1. Connect the target hardware to your host machine

2. Enable the settings for running PIL on Serial

Set the COM Port as obtained above and replace the 'COM1' in the following command with the correct Serial port corresponding to your controlCARD:
setpref('MathWorks_Embedded_IDE_Link_PIL_Preferences','COMPort','COM1');

Set the baud rate for PIL communication by entering the baud rate as
setpref('MathWorks_Embedded_IDE_Link_PIL_Preferences','BaudRate',115200);

Enable PIL over serial by the following command:
setpref('MathWorks_Embedded_IDE_Link_PIL_Preferences','enableserial',true);

您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:欢迎进入 TI 模拟技术论坛!

556

主题

17729

帖子

885

粉丝
快速回复 在线客服 返回列表 返回顶部