Example Code

Find out your computer's IP Address and Computer Name

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 shows how to output your computer's IP Address and Computer Name.



This is a simple VI that outputs your computer's IP Address and Computer Name in LabVIEW.  This example VI uses the String to IP function to grab the network address array. Once this array has been found, you can then index the array into the separate network addresses. From there, these addresses are passed into the IP to String function to display the computer name and IP Address.



  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download and open the IP and Computer Name example VI
  2. Run the VI
  3. Observe on the front panel the computer name and IP Address of the computer


Additional Information or References


VI Snippet




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

National Instruments
Applications Engineer
NI Prototyping Community

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

Todd S.
NI Employee (retired)

Thanks for posting!  Could you please add a screenshot of the code, add a few more tags to make the document more searchable and rename your attachment to include the LabVIEW version?

Todd S.
LabVIEW Community Manager
National Instruments

If you have any VI to find out MAC addess of Ethernet Card in PC please post it


hi my nam's dang,

I want to control a device in a far local by use internet and labview 2009, I used tcp/ip vi but it only active on Lan not internet, please introduce me the way, I thank so much please help me.