SerialConnection.Connect
From Xojo Documentation
Method
Attempts to open a connection to the serial device.
Notes
If the connection could not be made, an IOException is raised. If not device was assigned when the method was called, the error code returned is SerialDeviceNotAssigned.