Creating Alarms with MpAlarmXConfigAlarm takes very long

Hello Christian

This is a known problem which some of our Swiss customers already faced.

The reason is, that the MpAlarmXConfigAlarm FB was not designed for this use case. The procedure of the MpAlarmXConfigAlarm always makes the full sequence of:

  • Opening the whole alarm list configuration of the MpAlarmXCore and load it to DRAM
  • Check if the alarm you configure exists
    • If so, modify the alarm
    • If not, add the alarm
  • Close the whole alarm list configuration and write it to the USRROM config object
  • Apply the changes to the active component and trigger necessary component updates.

I’m not a mapp developer, so some points may be inaccurate, but the point is, that many repeating actions occur which take a long time, especially for bigger alarm lists. The MpAlarmXConfigAlarm call time increases exponentially for each alarm you add to the list.

You have two options to improve the performance.

Split your MpAlarmXCore

The easiest option is to split up your MpAlarmXCore into multiple smaller ones. You could e.g. make one alarm core for each task or each module of your machine. As the MpAlarmXConfigAlarm time increases exponentially for each alarm in the list, you will be much faster with this approach. Configuring 1000 Alarms on one core may take 15min while configuring 20 alarms each on 50 separate cores will probably finish within few seconds.

You can then make a hierarchy with MpComGroup components or with the MpComLink() function and escalate the alarms, so you will still have all alarms in one list on the UI.

Use MpComConfigManager

With the MpComConfigManager function block you can export and import whole mapp Component configurations in the XML format. With this approach you can freely configure all your mapp Components during runtime as you wish.

The disadvantage of this approach is, that you need to figure out the XML generating yourself. The advantage is, that you can configure everything, so adding snippets… is also possible.

Future

As we had a lot of product requests for this matter, there will be a couple of nice new features in the upcoming release of mapp Services V6.0.

First, the configuration of MpAlarmX in the AS editor is already much more modularized, which may make some programmed approaches obsolete.

Second, there will be new configuration FBs, similar to MC_BR_ProcessConfig / Param of the mapp Motion. These FBs will also support and Open - Edit - Close mode, which prevents the issues with the current implementation.