LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to moitor the internet connection with LABVIEW

Dear All,
In my application I want to monitor lets say every 1 minute the internet connection of my pc with labview.When the internet is down i will trigger an alarm.
does anyone now how i can do this?
thanks,
thodoros.
0 Kudos
Message 1 of 6
(5,343 Views)
If you want to test that the network cable of your computer is electrically plugged into a hub or router with a good cable then you can query the OS for the OperationalStatus of your network card. You can do this using a DLL call or the .NET functionality of LabVIEW. See this post for info...

Link Up / Link Down detection; Network cable plugged or unplugged?

This will NOT tell you if your internet provider is working and capable of providing a connection to a resource (web page or other server); only that the network interface is plugged in and functioning.

If you want to test a connection between your LabVIEW computer and another computer over the internet, you can use something like 'ping' or an HTTP request to check end-to-end communications. See these posts:

Ping Pjng Ping - Native Win2k/LV7 code
How to tell if computer is connected to Internet?



Message Edited by Phillip Brooks on 11-20-2007 06:42 AM
0 Kudos
Message 2 of 6
(5,329 Views)
THANKS!

The thread How to tell if computer is connected to Internet?
was exactly what i was looking for.
in order for it to work though i had to go to Tools->Options and enable the VI Server and Web Server configurations

thanks again!!

0 Kudos
Message 3 of 6
(5,296 Views)
Glad to be of help Smiley Wink
 
0 Kudos
Message 4 of 6
(5,280 Views)
Dear all,
the internet monitoring worked fine but one other problem occured.When the internet is off i want the program to check the status every 10 minutes and not continuously as it did before when the internet was on.is there a way to do this?
thanks in advance,
theo
0 Kudos
Message 5 of 6
(5,232 Views)

Hi Theo,

There are several ways to implement this using simple timing features of LabVIEW.  Two fairly simple methods are comparing system time stamps or using the Wait VI provided in the Timing palette.  The time stamp comparison requires a little bit more programming, but can be included in your main program loop.  To use the Wait function, you will probably need to construct a new loop parallel to your main loop.  I have attached screenshots of these two implementations.  Please let me know if you have any more questions.

Donovan
Download All
0 Kudos
Message 6 of 6
(5,200 Views)