SerialConnection.Close

From Xojo Documentation

Method

SerialConnection.Close()

New in 2019r2

Supported for all project types and targets.

Closes the connection to the serial device.