Behavior on TwinCAT Start and Stop

General

On TwinCAT stop all virtual COM ports created by the TcEL60xx driver on this computer are removed. A TwinCAT start creates the virtual COM port defined by the current configuration. An application, which uses one of the virtual COM ports, must close this port before the TwinCAT stop, because in general it is undefined how an application will handle the removal of an open COM port.

Virtual COM Port on Remote Computer

Suppose that a EL60xx bus terminal is connected to computer A, while the associated virtual COM port is created on computer B. The driver handles TwinCAT start and stop as follows:

TwinCAT stop on computer A breaks the connection to the bus terminal while the virtual COM port on computer B persists. Read and write request for the virtual COM port on computer B would fail. A successive TwinCAT start on computer A again creates the virtual COM on computer B. Using the AMS address the EL60xx driver on computer B checks if a virtual COM port for this address exists and removes it respectively. Then the virtual COM port is created, possibly with another number, which could be changed within System Manager.

TwinCAT Stop on computer B removes all virtual COM ports on this computer. After TwinCAT start on computer B virtual COM ports can be created again. However, the virtual COM port, which was created from computer A, will not be available. Not until the TwinCAT on computer A has been restarted the virtual COM port on computer B is created again.

As the TwinCAT on computer B will not be notified when the TwinCAT on computer A is stopped, it is not possible to remove the virtual COM port. If the configuration on computer A is changed, e.g., such that no virtual COM port is created, then an orphaned virtual COM port on computer B persists until the next TwinCAT stop on this computer.