LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP does net reconnect from cRIO

Hello, again.

 

I am sending things from a cRIO vie UDP. Recently I had some network problems. So for testing I unplugged the network cable and plugged it back in. I could not receive data after that. But it works if I get two laptops, one sender, one receiver. Unplug one laptop and plug it back in, and it recovers and keeps receiving data. Any ideas? I had to reboot the cRIO for the UDP sender to work again.

Its static IPs for the cRIO and the receiving PC.

 

Cheers,

 

Steffen

 

 

 

0 Kudos
Message 1 of 4
(2,285 Views)

forgot to mention, its cRIO9035. Seems that can have an influence

0 Kudos
Message 2 of 4
(2,260 Views)

This is likely an issue with the way the RTOS handles open connections vs. how windows does.

Specifically SO_REUSEADDR and SO_REUSEPORT. While I am not 100% certain on the SO_REUSEPORT parameter I can confirm that socket connections established on the NI RT operating systems are NOT opened with SO_REUSEADDR.

 

Take a look at this post from a few years ago.

https://forums.ni.com/t5/LabVIEW/TCP-Error-60-on-a-cRIO-9014/m-p/1014067/highlight/true#M452456

It explains the issue in more detail.

 

 

0 Kudos
Message 3 of 4
(2,246 Views)

but in UDP, how does the sender know, no one is listening? It does not reconnect even after several minutes. So not sure what to do.

Send something from the PC every second and if the cRIO does not receive anything, make it try to reconnect?

Or if the cRIO figured out somehow that there is no network, make it try to reconnect. Somehow it does, because values from the Shared Variable Engine keep updating again after a few seconds after plugging the network cable back in

0 Kudos
Message 4 of 4
(2,238 Views)