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 code to produce a read=
I think something wrong with Threading and Static List I have taken for this.
Please anyone can look into code and suggest me what's the wrong or please suggest me the alternate solution to manage this reading and writing from different thread.
Thanks in advance for your help.