How do I update data through serial port?
显示 更早的评论
I would like to get input data through serial communication instead of 'for' sentence to provide input variables.
For example,
I opened 2 serial port and communicated serial data through following code.
Computer 1.
s=serial('COM7')
fopen(s)
while(1)
fwrite(s,[0 90 180 270 360]) %pusai(i) input
end
computer 2.
s=serial('COM8')
fopen(s)
a=fread(s)
Like above, computer 2 gets the 'a' serial data having [0 90 180 270 360].
I would like to get the data [0 90 180 270 360] on real-time(continuously) through serial data communication.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Instrument Control Toolbox Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!