The EthernetIPforCLXCom and TwinCATCom drivers allow you to use settings from an INI for some of their properties. This allows you to change things like the IPAddress without recompiling the application. Here are the steps on how to set it up:
- In the AdvancedHMI project is a directory named SampleINIFiles, expand down that directory to see the files
- Right Click CLX.ini and select Copy
- Now Right click the AdvancedHMI project and select Paste
- Click on the newly pasted files so you see the properties in the Properties Window
- In the Properties Window change Copy To Output Directory to Copy if newer
- Double click the newly pasted INI file to view its contents
- Change the IPAddress to that of your PLC
- Open the MainForm
- Add an EthernetIPforCLXCom to the form
- In the Properties Window, set the IPAddress property to CLX.ini
When you run the application, the CLX.ini file will be put in the AdvancedHMI\bin\Debug directory with the compiled application. The driver will read that file and use the IPAddress. You can edit that file with NotePad to change the address. This allows you to change the IP Address without recompiling. If you have multiple driver instances across multiple forms, you can specify CLX.ini in all of them, so changing the one INI file will change to that address for all the driver instances.