找回密码
 注册
Simdroid-非首页
查看: 119|回复: 2

matlab如何实时采集串口的数据

[复制链接]
发表于 2008-1-23 10:11:08 | 显示全部楼层 |阅读模式 来自 上海
:L我现在要用matlab采集串口数据,而且是实时的,就是串口有一个数据,matlab就读一个,有谁知道实时的语句吗?
发表于 2008-1-25 01:38:27 | 显示全部楼层 来自 加拿大

about the communication function!

Simdroid开发平台
There are several functions in MATLAB using for serial communication.

serial : create a object, such as "com1"
fopen:  fread:  fclose: free: delete: clear:
When you create the com1, you also need to set the parameters for this port, for a instance, set(s,'baudrate','9600')
All these you can get help from Matlab document.

The second problem is realtime, you can use the Xpc in MATlab and
use the hardware device, like ECU to communiate with the serial port.

Hope it can help!:)

评分

1

查看全部评分

回复 不支持

使用道具 举报

 楼主| 发表于 2008-1-25 11:16:38 | 显示全部楼层 来自 上海
Thank you so much.
呵呵,等了好久才有人回.我再试试.:)
回复 不支持

使用道具 举报

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

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-4-26 00:26 , Processed in 0.037153 second(s), 17 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表