Cannot connect to the COM3 port. Possible reasons are another application is connected to the port or the port does not exist.

15 views (last 30 days)
When I use the following code:
delete(instrfindall); clear s
s= serial('COM3'); fopen(s);
I get this error message:
??? Cannot connect to the COM3 port. Possible reasons are another application is connected to the port or the port does not exist.
Error in ==> fopen(s); % open the serial port for writing and reading
Yes my device is connected to the port but I want to use the incoming values from the same device so what should I be doing in that case ?

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!