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!