ClosePort - method of object PmComm
Close the serial/ethernet communication port of this object.
ClosePort As Boolean
true - Port has been successfully closed.
false - The port was not closed. Possible cause: The port was not open before or is still being opened (on the Ethernet the connection process may take more time and during this period the port cannot be closed)
For serial link
: This method closes, for example the port COM1
..) and then this serial port can be used for communication with other object or other application. In ordert continue the transfer through this object the OpenPort
method must be called. See Settings of the serial link parameters
: The TCP
connection is closed by this method. It is useless to call this method for UDP
transfers. After the connection is closed: in order to continue the transfers on the same TCP address and port it is NOT necessary
to call the OpenPort
method, because the connection is opened automatically before the new transmission starts. See Settings of the Ethernet parameters