However, I have noticed that if I click the exit task several times, the ports duplicate? What could this be?
Instrument Object Array
Index: Type: Status: Name:
1 serial closed Serial-COM9
2 serial closed Serial-COM9
3 serial closed Serial-COM9
At the end of the exit task, I now run
clear all
to make sure no variables are left in the GUI workspace. And the error has now changed to:
"Unable to create a communication link with the serial port. Please check your input argument PORT..."
However, MATLAB crashes with an internal error.