Example Code

IPconfig from within LabVIEW with System Exec.vi

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.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview: This VI demonstrates how to use the System Exec.vi to gather the information commonly obtained through a command prompt in Windows.


Description:

This VI demonstrates how to use the System Exec.vi to gather the information commonly obtained through a command prompt in Windows. A user has the ability to type cmd into a run window and bring up a command prompt. Within this DOS environment, the user can use the command ipconfig to return information about their computers  IP configuration. This VI allows the user to return this information to LabVIEW where it can be parsed and used as needed.


Requirements: LabVIEW 2012 (or compatible), Hardware: none.


Steps to Implement or Execute Code: 

 

1. Run the VI.
2. This VI will return the information from a Command Prompt for IPconfig.
3. The user can then parse out the needed information.


Additional Information or References:

 

IPconfig from LV FP.png

 

IPconfig from LV sn.png


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

National Instruments
Applications Engineer

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