Author Topic: Improved INI file processor in version 3.99k  (Read 3365 times)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Improved INI file processor in version 3.99k
« 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.

PJonHar

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Improved INI file processor in version 3.99k
« Reply #1 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();
« Last Edit: February 20, 2020, 05:06:39 AM by PJonHar »