Importing user alarms

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Importing user alarms

mapp Services V5.16

Requirement

The conditions in a factory have changed. As a result, the limit values of alarms had to be adjusted and new user alarms had to be created in a machine. The machine type exists 3 times in the factory. So that the alarm configuration does not have to be adjusted for each machine, it should be possible to import the alarm configuration once it has been edited for all machines.

mpcomusecase_2_goal

Solution

Component list

MpComConfigManager: Imports the alarm configuration.

MpAlarmXCore: Collects and manages all alarms.

mpcomusecase_2_connection

 

 

Alarm configuration

The alarms of the machine are managed via the MpAlarmXCore configuration.

logo_getting_started

For information about how to create an alarm management system, see section User alarms with VC4 mapp template.

Using the mapp components

At runtime, the existing MpAlarmXCore configuration should be exported and imported to other machines using MpComConfigManager.

Function block MpComConfigManager is added and configured:

MpComConfigManager_0.Enable := TRUE;
MpComConfigManager_0.MpLink := ADR(gAlarmXCore);
MpComConfigManager_0.DeviceName := ADR('HD');
MpComConfigManager_0.FileName := ADR('MyAlarmConfig');
MpComConfigManager_0();

The mapp Link of function block MpAlarmXCore is used since the alarm configuration should be exported or imported.

The alarm configuration is then exported to the specified storage medium using "Export = TRUE". The export file can look like this: MyAlarmConfig

The exported file can now be edited. The user alarms can now be adjusted or new ones created. Each new alarm must be assigned a new group ID ("Group ID") and new alarm name ("Name"). For example, a new alarm may look like this:

...
<Group ID="[856]">
    <Property ID="AdditionalInformation1" DataType="STRING" Value="" />
    <Property ID="AdditionalInformation2" DataType="STRING" Value="" />
    <Property ID="Code" DataType="UDINT" Value="0" />
    <Property ID="Disable" DataType="BOOL" Value="false" />
    <Property ID="Message" DataType="STRING" Value="The temperature is too low" />
    <Property ID="Name" DataType="STRING" Value="TemperatureLow" />
    <Property ID="Severity" DataType="UDINT" Value="1" />
    <Group ID="Behavior">
        <Property ID="Acknowledge" DataType="DINT" Value="1" />
        <Property ID="AutoReset" DataType="BOOL" Value="false" />
        <Property ID="MultipleInstances" DataType="BOOL" Value="false" />
        <Property ID="ReactionUntilAcknowledged" DataType="BOOL" Value="true" />
        <Property ID="Type" DataType="STRING" Value="PersistentAlarm" />
        <Group ID="Recording">
            <Property ID="ActiveToInactive" DataType="BOOL" Value="false" />
            <Property ID="InactiveToActive" DataType="BOOL" Value="true" />
            <Property ID="UnacknowledgedToAcknowledged" DataType="BOOL" Value="true" />
        </Group>
</Group>
...

The edited file is then re-imported on all machines via "Import = TRUE" on MpComConfigManager. The adapted alarm configuration is now used on all machines.

Additional information:

Function block MpComConfigManager has imported the adjusted and new user alarms into the MpAlarmXCore configuration. The change can be seen via "Online > Comparison > Automation components":

mpcomusecase_2_automationcomponents

The new alarms currently only exist in the configuration on the target system. So that the new user alarms are also in the configuration in the AS project, command "Mirror to the left" is executed. The alarms are now also available in the AS project.

mpcomusecase_2_copyleft