Example Code

Ping IP Address using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.


  • LabVIEW

Code and Documents


Download All


This example VI demonstrates how to access command prompt and ping IP address with LabVIEW.



You can check whether specific IP address within your subnet is used or not by command prompt. This can be implemented in LabVIEW by using “System Exec.vi”. In this example VI, every time PING IP button is pressed, “Pinging IP” is executed in command prompt. This example shows how to use command prompt in LabVIEW, which can be applied in many ways such as executing other files.



 ・LabVIEW Base Development System 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download “Ping IP Address 2012 NIVerified.vi”
  2. Run the program.


Additional Information or References

VI Front Panel


VI Block Diagram


**This document has been updated to meet the current required format for the NI Code Exchange.**


Ben B.

Applications Engineer
National Instruments UK & Ireland

"I've looked into the reset button, the science is impossible!"

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.