LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ping several IP's simultaneously

hi

 

friends, we want to ping several IP's simultaneously and we use .net functions , but when number of IP's are more than 5 IP, our program work slow and can not work on other part of panel, because this method is polling not event or interupt base. i see event handelr on .net methods and property but can not find out how work and I can not use it

 

any suggestion?

 

I attach simple code for .net ping 

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

What happens if you set this VI as Reentrant and parallellize the IPloop? (assuming you loop through a list of IPs, else you should) 🙂

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 14
(1,715 Views)

@meysam_b wrote:

hi

 

friends, we want to ping several IP's simultaneously and we use .net functions , but when number of IP's are more than 5 IP, our program work slow and can not work on other part of panel, because this method is polling not event or interupt base. i see event handelr on .net methods and property but can not find out how work and I can not use it

 

any suggestion?

 

I attach simple code for .net ping 


When you say you cannot work on other part, I believe you are running this Ping in the same loop. Can you try this ping in a different loop? Also the timeout you mentioned is in Seconds?

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 14
(1,710 Views)
Highlighted

I had a similar need when I was looking to discover which ethernet cDAQ chassis were connected to my PC.  I had a range of IP addresses to ping but whenever I would ping them it would take a long time to go through a list of say 100 IP addresses.  I ended up using a command line tool by sysinternals which can ping multiple IP addresses simultaneously then report which ones were found.  Here is the link.

 

http://forums.ni.com/t5/LabVIEW/Discover-cDAQ-Ethernet/m-p/2817584#M824878

 

Edit the IPs.txt in that after extracting the zip to a folder and it should return which IPs it found.

0 Kudos
Message 4 of 14
(1,690 Views)

thank you for very good reply

 

I try hoovahh solution and it is very good program. just I'm try match it for my application

one question, the programmer said some people reported that PingInfoView stop pinging after a few hours, this is worry me for reliable and stable work on my application. do you see this bug? 

what should i do?

 

0 Kudos
Message 5 of 14
(1,662 Views)

and another question , how can i use "ping every seconds" ? I can not use it,

my code attached, please see and edite it.

thanks.

0 Kudos
Message 6 of 14
(1,642 Views)

here is my code 🙂

 

0 Kudos
Message 7 of 14
(1,633 Views)

What in the world are you trying to do with this?  If you want to look for IPs every second put my VI in a whiile loop and call it every second using the elapsed time VI.  My code already returned an array of IP addresses found, what other information about the ping would you want to know?

 

I can't say I ran this code continuously for hours.  I would use it once on startup to detect devices that are connected.  Then if the user choose to I would rescan but generally this VI would only be ran once.  

0 Kudos
Message 8 of 14
(1,615 Views)

a part of our program is ping monitoring, so we need continuously check IPs, this is important for me.

 

the code give us percent of alive IPs package, and if call whit external loop then we have 100% or 0% alive (for each ping) but i need real percent of alive.

 

one question: how it work? is it use .net functions? this is very fast. do you see source code of PingInfoView?

 

0 Kudos
Message 9 of 14
(1,606 Views)

@meysam_b wrote:

a part of our program is ping monitoring, so we need continuously check IPs, this is important for me.

 

the code give us percent of alive IPs package, and if call whit external loop then we have 100% or 0% alive (for each ping) but i need real percent of alive.

 

one question: how it work? is it use .net functions? this is very fast. do you see source code of PingInfoView?

 


No idea what PingInfoView uses you'll need to contact sysinternals, I highly doubt souce code is available.

0 Kudos
Message 10 of 14
(1,602 Views)