Serial Port opening problem
Afficher commentaires plus anciens
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 commentaires
Walter Roberson
le 4 Nov 2019
Are you closing the port after use?
Abdel Rahman Bekawi
le 4 Nov 2019
Ruger28
le 4 Nov 2019
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
le 4 Nov 2019
Abdel Rahman Bekawi
le 5 Nov 2019
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Serial Port Interface dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!