Hello Friends,
I have created win form application which will read data from TCP and com port from Hardware using modbus and display information on different viewer screen.
For that I have done following code and its seems I am missing something to manage thread properly.
When my viewer screen will be get open that time I have initialing all ports and opening required ports if not open with as below code.
As in code I have added my comments. When I am trying to call WriteToComHarware Reading to hardware method getting stop working due to port has been closed and no longer enables the reading.