08-25-2021 07:54 PM
Hi, I want to enter a list of IP address to ping to my system at the same time using LabVIEW. What should I do? using a list boxes or something else?
08-26-2021 04:09 AM
LabVIEW doesn't have a native ping function. So have you already decided how to do that?
The most simple way of using System Exec to call the Windows ping utility won't really be a good solution to try to do multiple ping in parallel: https://forums.ni.com/t5/Example-Code/Ping-IP-Address-using-LabVIEW/ta-p/3512684
or by using .Net: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z00000159SmSAI&l=nl-NL
The method using raw sockets unfortunately doesn't work in Windows versions since Windows XP unless your process has elevated admin rights: https://forums.ni.com/t5/LabVIEW/Ping-Ping-Ping-Native-Win2k-LV7-code/m-p/117381
Another Windows API call solution that doesn't suffer from the administrative elevation problem as it avoids creating raw sockets in user space would be to call the Windows API function IcmpSendEcho(): https://docs.microsoft.com/en-us/windows/win32/api/icmpapi/nf-icmpapi-icmpsendecho
08-27-2021 10:20 AM
11-10-2021 03:49 AM
If you don't want to use the "System Exec.vi" try like stated by Rolf the WinApi IcmpSendEcho, see file IcmpSendEcho_Ping.llb attached (saved for previous LabView version 9.0). It has been developed in LabView2015 and tested on a Win10-64bit PC, I hope it will work also for you...
11-10-2021 09:23 AM - edited 11-10-2021 09:24 AM
Last time I needed to enter a list of IP addresses I used a Table to display the list and had a "Add IP" (and "Remove IP") button to that would pop up a window with a String Control, where you entered the IP address periods and all.
Then I checked the entered text to see if it was a valid IP address using the attached VI snippet...
04-01-2022 04:08 PM
I tried the ICMP vi but cannot seem to get it to work with timeouts < 500ms, any ideas?