AdvancedHMI Software

General Category => Support Questions => Topic started by: scott.clark on March 28, 2020, 12:21:10 PM

Title: Using INI file to set IP addresses for EthernetIPforSLCMicroCom
Post by: scott.clark on March 28, 2020, 12:21:10 PM
Version 3.99xR1

I have mulitiple EthernetIPforSLCMicroCom connections in my application.  How can I use an INI file to provide the IPaddresses on startup?

Thanks
Title: Re: Using INI file to set IP addresses for EthernetIPforSLCMicroCom
Post by: Archie on March 28, 2020, 12:50:21 PM
https://www.advancedhmi.com/forum/index.php?topic=781.msg3782#msg3782
Title: Re: Using INI file to set IP addresses for EthernetIPforSLCMicroCom
Post by: scott.clark on March 28, 2020, 04:32:47 PM
Thanks for the link, it was helpful, but with version 3.99xR1, couple steps different at the end.

- 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   ( In my case, the section name is [EthernetIPforCLXCom1])
- Open the MainForm
- Add an EthernetIPforCLXCom to the form ( In my case the driver was named "EthernetIPforCLXCom1")

+ In the Properties Window, the IPAddress can be left blank
+ In the Properties Window, set the IniFileName property to "CLX.ini"
+ In the Properties Window, set the IniFileSection to the section in the CLX.ini for the driver(in my case "EthernetIPforCLXCom1")


Works great, Thanks!