MpComConfigAdvanced | Create generic Alarms in AS V6

I am not sure I fully understand how you had your V4/5 logic built up.

But (at least in theory) the new MpComConfigAdvanced has better performance. The reason is that it only has to open the config once (rather than every time again). Here’s the key differences:

MpAlarmXConfigAlarm

Opens, loads and writes the configuration every time you save an alarm (regardless of new alarm or modification of existing alarm). The most expensive part is the write, as this will notify MpAlarmX (the component itself) that it has to re-load the complete configuration.

Process Outline:

  1. Open the configuration
  2. Load the configuration
  3. Write the configuration (e.g. new alarm)
  4. Save the configuration
    4.1. Notify MpAlarmX to reload the configuration

MpComConfigAdvanced

This one is in your hands. If you know you have to add 100 new alarms (for example), you can open and load the configuration once, then just call CmdWrite for every new alarm and only then you CmdClose. In this case the MpAlarmX component will only be re-loading the configuration after it has been closed (rather than every time).

Process Outline:

  1. Open the configuration
  2. Load the configuration
  3. Write the configuration (e.g. new alarm) → can be repeated multiple times!
    3.1. For adding new alarms I would recommend to set the WriteMode = mpCOM_CONFIG_WRITE_APPEND
  4. Save the configuration with CmdClose
    4.1. Notify MpAlarmX to reload the configuration

Note: The MpComConfigBasic works differently! This one is more similar to the old MpAlarmXConfigAlarm in that it re-opens and re-saves the configuration for every write…

But: I do not have any “real-world” measurements (but would be curious about your current and previous processes :wink:).

Regarding debugging in INIT: I don’t know if/how that is possible (but I think I have seen a question somewhere here on the community :thinking: )