打印

simulink 下 PIL 仿真的串口

[复制链接]
921|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
airwill|  楼主 | 2019-1-10 21:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
沙发
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

主题

17724

帖子

884

粉丝