LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP Read does not detect network conncetion closed error (66)

Solved!
Go to solution

Thanks mark,

Presently, i am doing some what like this that once i gets read time out i exit out of "inner while loop" based on error then close TCP connection and restart the "outer while loop" which again advertises TCP IP & Port for listen. Can you suggest me further onit.

 


In addition, you can write the application layer to include messages that provide status information about the state of the connection and allow new TCP connections to be established in the event one gets closed


Can you refer me some example on this or send me some LV codes how to handle it.

 

Regards

awais qureshi

0 Kudos
Message 11 of 13
(1,196 Views)

Hi Awais,

 

Forgive me if my interpretation of your question is incorrect, but since you already know the errors that you would like to use to exit the loop, you can create a structure that will take in the error code and compare it to a specified number.  Based on if the equality is met, you can stop the loop that you are in.  I hope this helps.  I have included a screen shot and a VI to show the functionality I am referring to.

loop.png

Kim

 

Applications Engineer
National Instruments
0 Kudos
Message 12 of 13
(1,172 Views)

Thanks alot all,

actually the problem was not with TCP VIs but it was in the flat sequence structure followed by TCP structure. Actually i put 2sec daly using time function in following structure, which i introduced for processing og sensors VIs in that structure, and once i reduced it to 10msec, it solved my problem and now i am able to connect and disconnect and again connect with out time out requirement.

Thanks for support by you all.

Best Regads

awais qureshi

0 Kudos
Message 13 of 13
(1,139 Views)