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!