Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
3 ratings:
 4.66 out of 5   

Archived: Error 62 and Error 66 in the TCP Examples Under Windows NT

This document has been archived and is no longer updated by National Instruments



Primary Software: LabVIEW Development Systems>>LabVIEW Full Development System
Primary Software Version: 5.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
When running the TCP Examples under Windows NT, why do I get one of the following errors:

Error 62 LabVIEW: The system caused the network connection to be aborted.

Error 66 LabVIEW: The network connection was closed by the peer.


Also, why is there a 25ms delay in the server VI?

Solution:
When running the TCP Examples Simple Data Server.vi and Simple Data Client.vi on a Windows NT machine, if the client VI is stopped using the Stop button, then the Simple Data Server often returns Error 62 LabVIEW: The system caused the network connection to be aborted. Despite the description for this VI states that the VI does no error checking, it does trap Error 66 LabVIEW: The network connection was closed by the peer. in the No EOC VI. However, the error is reset to 0, so the dialog box generated by the Simple Error Handler does not appear.

Changing the delay from 25ms to 5ms in the Server loop makes this VI terminate quietly 2 out of 3 times. The NT OS will return error 62 or 66, depending on the state of the TCP connection when the next write call is made. Thus, error 62 is equally valid. The Simple Data Server can be modified so that the No EOC VI checks for both 62 or 66 and quits quietly on either.

The note on the diagram states that there is a 25ms delay in the server VI, so LabVIEW does not flood the input queue on Windows NT machines. When the Simple Data Server and Simple Data Client are run on the same NT machine, there are many Windows messages generated due to the data going back and forth. Without the delay, mouse clicks on the front panel will never be detected because they are queued up behind all the other messages and at a lower prioirity. If this is the case, the VIs will seem to hang. 25ms is the value needed for a Pentium 90MHz machine; a Pentium 200MHz machine seems to work with a delay of 5ms.

Related Links:
KnowledgeBase   33GERN2G: How Can I Communicate Between the LabVIEW Run-Time Environment and the Development Environment on the Same Computer?

Attachments:





Report Date: 12/14/1998
Last Updated: 07/30/2014
Document ID: 1GD8NFWV

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit