AdvancedHMI Software

General Category => Tips & Tricks => Topic started by: Archie on June 14, 2016, 07:48:54 PM

Title: Improved INI file processor in version 3.99k
Post by: Archie on June 14, 2016, 07:48:54 PM
The INI file parser has been updated to use true INI files with sections and settings. For example, the INI file will now look like this:
Code: [Select]
[Driver1]
IPAddress=192.168.0.10
PollRateOverride=100

[Driver2]
IPAddress=192.168.0.11

Along with this improvement each driver has 2 new properties, INIFileName and INIFileSection. This allows you to put the settings for multiple drivers in the same file. The new processor also works differently in which it will allow any property to be set that has an atomic data type (e.g. integer, string, float).

This new architecture also lets you easily modify the visual controls and add INI file capability to them by copying 2 code sections from one of the drivers and putting it in the control you wish to support INI files.
Title: Re: Improved INI file processor in version 3.99k
Post by: PJonHar on February 18, 2020, 12:33:10 PM
Just for clarity, if you are using a driver via code, you need to do a BeginInit and EndInit, as per below:

Code: [Select]
PLC = new EthernetIPforCLXCom();

PLC.BeginInit();
PLC.IniFileName = "CLX.ini";
PLC.IniFileSection = "PLC";
PLC.EndInit();