ClosePort - method of object PmaComm
Close the serial/ethernet communication port of this object.
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 (for Ethernet-client 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 Setting the parameters of the serial link
: 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 Setting the parameters of the Ethernet-client