Serial Port opening problem
Mostra commenti meno recenti
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 Commenti
Walter Roberson
il 4 Nov 2019
Are you closing the port after use?
Abdel Rahman Bekawi
il 4 Nov 2019
Ruger28
il 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
il 4 Nov 2019
Abdel Rahman Bekawi
il 5 Nov 2019
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Serial Port Interface in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!