From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP Open Error Code 60

Hello,

 

I am new to LabVIEW and also UDP communication. I have a requirement to use Ethernet to talk to an Ethernet to Serial device server. The server is configured correctly. I am performing UDP Opens on multiple local ports during initialization. When the application is running it is using the UDP connection ID from the Open and performing a UDP Write to the same remote net address (device server) and then waiting a period of time and then performing a UDP Read using the same wired UDP Open connection ID. This works in one of my threads, but the other threads which perform similar read/write operations to different hardware are indicating Error Code 60 with the connection handle = 0. I have a development computer and a target computer. Everything works fine on the development computer in a lab environment with same device server, but I am not receiving all the inputs from the real hardware. On the target machine with all real hardware connections, I am seeing Error Code 60 on all but one of the UDP Read/Write operations. I confirmed that I am using unique local port numbers on all the UDP Opens and all are in the 6400x range (not common for other applications to use). No other applications running. Firewall is turned off also.

 

1) Is there a setting (.ini) file where I need to set some SocketSetReuseAddr variable? I does not seem to matter if this is set or not

2) Is it OK to use the same connection ID for a UDP Read and a UDP Write or do I need to create a separate connection ID for UDP Read and UDP Write?

0 Kudos
Message 1 of 3
(3,521 Views)

Since you are doing outgoing connections exclusively, you should wire 0 to the "port" input of UDP open. This way the OS will chose a ephemeral port that is guaranteed to be free.

0 Kudos
Message 2 of 3
(3,513 Views)

altenbach,

 

Thanks for the reply. I have attached a screenshot of my logic in a nutshell. I'm not actually allowed to post the code and it is too much anyways. I think I need seperate UDP Opens and UDP Closes for my UDP Write and UDP Read. My threads actually write to unique ports on my remote host (device server) and then my threads are read from unique local ports which the device server is writing to. I am still baffled why this works on my development machine and not on my target machine. Both computers are using LabVIEW 2012 SP1 on a Windows 7 32-bit OS.

 

When I probe the connection ID in subVi2, I see the value 0 before the UDP Write even though the local port is unique.

 

Rob

0 Kudos
Message 3 of 3
(3,503 Views)