LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent TCP IP connection to be interupted

Ok I figure it out. It was my mistake. I am actually ashamed of such a stupid mistake that I made.

 

I tested both apps from the same computer so no wonder the connection was droped in labview program. Same IP same port.

 

When I tested app from diffrent computer with diffrent IP it works OK. The Labview didnt drop connection and another app was not able to connect with the device unitl I disconnected my labview program.

Message 11 of 14
(995 Views)

Do you connect a specific port number to the "local port" input on the "TCP Open" node? If so, is this required by the server application?

 

Normally the client does not care what local port it uses and most servers don't care either what port a client uses on its end. If you leave that input unconnected LabVIEW will open the connection with whatever port number is currently available and if the server doesn't refuse remote connections from other than a defined port you should be fine and it will work even with multiple clients from the same machine.

Rolf Kalbermatter
My Blog
0 Kudos
Message 12 of 14
(984 Views)

In order to successfully connect with the device you have to provide an IP address of the device and port number on Open TCP connection. The port number is specific and is required by the device server application.

0 Kudos
Message 13 of 14
(967 Views)

@aucman wrote:

In order to successfully connect with the device you have to provide an IP address of the device and port number on Open TCP connection. The port number is specific and is required by the device server application.


Yes but if you look at TCP Open you will see two port inputs:

 

"remote port or service name" is required and specifies the port number of the server on the remote computer.

"local port" is optional and should normally be left open. LabVIEW then selects a port for the local endpoint that is not in use at that moment.

Rolf Kalbermatter
My Blog
0 Kudos
Message 14 of 14
(960 Views)