Serial Port opening problem
显示 更早的评论
I'm trying to acquire values from a microcontroller using the serial port. However, I'm facing a strange bug!
when I try to run the program for the first time it works and when I try to run it again it gives me an error saying that cannot open the port! But if I close matlab and open it again and run the program it works for the first time only and then same problem arises!
Can anyone help me please ?
Thanks in advance
5 个评论
Walter Roberson
2019-11-4
Are you closing the port after use?
Abdel Rahman Bekawi
2019-11-4
Ruger28
2019-11-4
Without seeing your code, it seems like what Walter is getting at is that you are not closing it after you are done, and on the next iteration you are trying to open it up while it is open already. Try closing it when you are done.
Abdel Rahman Bekawi
2019-11-4
Abdel Rahman Bekawi
2019-11-5
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Serial Port Interface 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!