09-30-2011 11:22 AM
You could pull "ipconfig" in from a system exec and search for a valid IP/Subnet. Here we use a 10.00.x.x IP, if it's 192.168.x.x or 169.254.x.x then the connection's probably not there. Your IP may be valid at 192.168.x.x depending on the LAN configuration.
A few pings to google.com would be my first choice though, it's going to time out after 4 seconds if nothing comes back. Most servers allow pings, but if you exceed x pings in y seconds then it'll firewall you out.
10-04-2011 10:42 AM
Hi Battler,
The network connection status information is not directly attainable using LabVIEW's built-in VIs. However, you can get this information using Windows API calls.
A quick Google search for a network status monitor could provide some insight on how to gather this information. Essentially, you'll be looking for an ActiveX automation server, or ActiveX control that would check the network connection status and then incorporate it into LabVIEW.
I hope this points you in the right direction.
Best,
Carisa Leal
10-04-2011 12:28 PM
@Carisa L wrote:
Hi Battler,
The network connection status information is not directly attainable using LabVIEW's built-in VIs. However, you can get this information using Windows API calls.
A quick Google search for a network status monitor could provide some insight on how to gather this information. Essentially, you'll be looking for an ActiveX automation server, or ActiveX control that would check the network connection status and then incorporate it into LabVIEW.
I hope this points you in the right direction.
Best,
Carisa Leal
You can use the native VIs for accessing the Windows registry to pull out all the pertinent info for the network connections in the computer. I believe it will even indicate if the connection is active or not. From there I would ping my local gateway address. Although not always guaranteed it is better since local pings ar less likely to be disabled on the network thnen going to the internet.
10-04-2011 04:13 PM
You can also use performance monitor counters for network or even modems in windows. It gives you current status, bandwidth.....
They are declared in pdh.dll, check by google or one of my posts
Cosmin