This example shows how to programmatically change the IP address of a remote system。
This code shows how to programmatically change the IP address of a remote system.
To implement this function, firstly get FTP file where host is the original IP address and remote path is the file ni-rt.ini that needs to be changed and open the .ini file. Then read the whole file, looking for "IP address =" in the file and looking for "S" (which is the start of the next item in the file i.e Subnet..). Everything in between these is the IP Address that we are interested in. Next add the new IP address into the file, replace /open the file with the same path and wirte the new content. Lastly copy .ini file on local machine and reboot the machine for changes to take effect.
LabVIEW 2012 (or compatible)
Real Time Module 2012 (or compatible)
Steps to Implement or Execute Code
Obtain the current IP address by doing an ftp://"ip address"/ from the .ini file and save it somewhere on your PC
Use the LabVIEW program to set the path of the .ini file
Set the new IP address on the front panel
Additional Information or References
**This document has been updated to meet the current required format for the NI Code Exchange.**
Shalini B Applications Engineer National Instruments UK & Ireland