LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP Open Connection timeouts too soon

Solved!
Go to solution

Hello to all LabVIEW users!

I have noticed that using TCP Open Connection function is not following timeout value. 

Check the image. The time difference is 21 seconds, despite setting timeout to 60 seconds.

Anybody noticed this before?

LabVIEW 18.0.1f4 (32-bit)

AdamTrojak_0-1673881094127.png

 

0 Kudos
Message 1 of 5
(1,739 Views)
Solution
Accepted by topic author AdamTrojak

From the Detailed Help of "TCP Open Connection Function":

 

TCP Open Connection Details

When wiring an unused IP address, you may receive an error stating the network operation exceeded the user-specified or system time limit. This error occurs before the default timeout of 60000 ms has occurred. To correct this error, wire an IP address that is running and listening on the port you are trying to use.

 

Could this be the problem you are having?

 

Bob Schor

0 Kudos
Message 2 of 5
(1,728 Views)

Yeah, this might be it. It is troublesome because I am timeouting before device boots up, so for the booting time it looks like "unused IP address".

 

Anyway, thanks for help!

0 Kudos
Message 3 of 5
(1,712 Views)

@AdamTrojak wrote:

Yeah, this might be it. It is troublesome because I am timeouting before device boots up, so for the booting time it looks like "unused IP address".

 

Anyway, thanks for help!


It doesn't have to be a problem.  You could use this error to figure out if your device boot up.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 5
(1,705 Views)

I do some LabVIEW Real-Time work, where I need to connect to a "remote host" (which I call a "Target", with the PC running the main UI code being the "Host").  I wrote a little routine called "Target ID, IP" that does the following:

  1. Calls "Find Systems (VI)", which is installed with NI System Configuration.  The function can be found on the System Configuration sub-Palette of the Measurement I/O Palette.  I usually use the "Only if Online" setting, otherwise it returns "formerly connected" systems that MAX might have cached.
  2. This returns an array of Strings, which might be an empty array of nothing can be found.
  3. In my case, if no IP is returned, I force a default IP.  Probably in your case, you should pop up a message saying "Nothing found -- should I try again?".  Take appropriate action if the User answers "No".
  4. If one IP is returned, I parse the string to get the IP in the format "XXX-YYY-ZZZ-WWW" and use it.
  5. If more than one IP is returned, I pop up a Dialog Box that asks the User to choose a Target from the list of IPs returned.

Doing something like this can handle the problem of timing out before the remote device boots up.

 

Bob Schor 

0 Kudos
Message 5 of 5
(1,672 Views)