ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP error

Hello everybody,

 

i am creating a simple application to synchronize the time of two computers for synchronized data acquisition (the actuall time doesn't matter, i just need both computers synchronized). Here is the image (the top sends time string data, the bottom is the listener). Of course they are in different .vi's!

 

time sync.png

 

 

 

Anyway it is working, but when i exit (push the button stop on listener) i get the following error:

 

LabVIEW:  The network connection was closed by the peer. If you are using the Open VI Reference function on a remote VI Server connection, verify that the machine is allowed access by selecting Tools>>Options>>VI Server:Machine Access on the server side.

 

Machine is allowed access, since i am using localhost, while testing it.

 

Can anyone help me please?

 

Thank you,

 

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Message 1 of 5
(5,051 Views)

This is a perfectly normal error. When the client closes the TCP Connection, the host will return this error to indicate that the client has closed the connection.

0 Kudos
Message 2 of 5
(5,039 Views)

Thank you for the answer.

 

Is it possible to stop the application without this error? This can be done by clicking on the labview "abort execution", but i don't like this button.

 

regards,

 

k


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 3 of 5
(5,016 Views)

Trap and ignore that error with a case structure.

0 Kudos
Message 4 of 5
(5,010 Views)

Sure.  Either turn off automatic error handling in your VI (VI Properties -> Execution) or put a Clear Error function (in the dialog and user interface palette) after the TCP Close.

0 Kudos
Message 5 of 5
(5,008 Views)