AdvancedHMI Software
General Category => Support Questions => Topic started by: scott.clark on February 03, 2015, 03:16:24 PM
-
I would like to read a .ini file on startup and set the IP address of the EthernetIPforCLXCom driver. How would I go about doing this?
Thanks!
-
In the AdvancedHMI project there is a directory named SampleIniFiles.
- Drag CLX.ini out of the folder and to the top level of the project
- With CLX.ini file selected, go to the Properties Window and select Copy To Output Directory to Copy If Newer
- In the driver instance, in the IPAddress property put CLX.ini
- Edit the CLX.ini file to set the IPAddress you want
-
Works great, thanks!
-
I have a new project, using version AdvHMI3.99w, and have not been able to get this method to work.
I have the MainForm with driver: EthernetIPforCLXCom1
property IPAddress is set as "CLX.INI"
CLX.INI file contains:
[EthernetIPforCLXCom1]
IPAddress=192.168.1.100
It works fine with the 192.168.1.100 set directly in the driver, but when using the INI file method, the screen objects do not populate.
What am I missing?
-
I have a new project, using version AdvHMI3.99w, and have not been able to get this method to work.
I have the MainForm with driver: EthernetIPforCLXCom1
property IPAddress is set as "CLX.INI"
CLX.INI file contains:
[EthernetIPforCLXCom1]
IPAddress=192.168.1.100
It works fine with the 192.168.1.100 set directly in the driver, but when using the INI file method, the screen objects do not populate.
What am I missing?
Check in your bin\Debug directory and make sure the CLX.ini file is getting placed there. Make sure you have INIFileName property set to CLX.ini and INIFileSection set to EthernetIPforCLXCom1
-
Thanks, I had missed the added properties in the driver since I had used it last.
Works, Great