Sending packets to the roboRIO from a LabVIEW dashboard

We are sending data via UDP to the roboRIO from our labview dashboard. In order to do that, we need to retrieve the robot IP address to send to.

Using the “String to IP” function to resolve roborio-624.local causes all pending network operations to freeze for about 5 seconds, even with timeouts set, which is affecting both our custom data receiver and the receive loop , effectively freezing the dashboard.

Alternatively, we can read the IP address from the “Robot IP” control written by WPI_DashboardGetInfo, but sometimes this control does not get set when the dashboard is started as a separate program after the driver station is. Looking at this code, it seems to be waiting for a TCP connection from the driver station program that never happens until the driver station is restarted.

I’d rather not have to assign a static IP to the roboRIO, because it’s just another configuration step we’d have to remember if we ever needed to replace the roboRIO at a competition.

Are there any alternatives for finding the correct DHCP IP for the roboRIO?

You can put the name resolution in a loop that runs at the beginning of the program until it gets a proper address, then never runs again. That should keep the five-second freeze from affecting normal operation of the Dashboard.

Are you using any part of the default dashboard that already resolves the robot IP address, available from Dash Get Data, used for Network Tables and other robot to Dashboard communications?