LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

check internet connection

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. 

0 Kudos
Message 11 of 14
(1,341 Views)

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

Applications Engineer
National Instruments
0 Kudos
Message 12 of 14
(1,312 Views)

@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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 13 of 14
(1,297 Views)

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

0 Kudos
Message 14 of 14
(1,280 Views)