Description

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Description

mapp Services V5.16

If user-defined alarms should be assigned to a particular mapp component, they can be generated using MpAlarmRegUser. They are attached to the configuration of the mapp component from which the MpLink for MpAlarmRegUser comes.

One example is assigning an alarm to an axis where it can then be triggered. Space must first be created for this alarm (e.g. "Axis cannot start homing procedure at this position"). To do so, MpAlarmRegUser is called with the MpLink of the MpAxisBasic configuration. Input "NumberOfAlarms" is set to 1 since only space for one additional user alarm is needed in this example. MpAlarmRegUser is called once in the initialization subprogram. As soon as space is reserved for the additional alarm, MpAlarmRegUser can be disabled. As soon as MpAlarmBasic is enabled, MpAlarmRegUser is no longer permitted to be active.

From this point on, the user alarm can be set using MpAlarmSet. The alarm number always starts at 0 for user alarms.

The alarms created with the help of MpAlarmRegUser can be depicted two different ways using MpAlarmBasicUI:

Mode = mpALARM_BASIC_UI_MODE_USER: In this case, an array is displayed with only the user alarms that were created using MpAlarmRegUser. Element 0 of the array corresponds to the first user-defined alarm.

Mode = mpALARM_BASIC_UI_MODE_ALL: In this case, an array with all alarms from the component from which the MpLink was used. The user alarms come after the mapp alarms. For MpAxis, this means that the first user-defined alarm uses the 13th element in the array for the alarm image since MpAxis has 13 mapp alarms.

User-defined alarms can also be configured via a mapp component's configuration. Nevertheless, it is still necessary to add the user-defined alarms to the configuration using MpAlarmRegUser. (See section MpAlarmBasic configuration.) The 100 default user alarms from MpAlarmBasic are an exception; no space needs to be reserved for them using MpAlarmRegUser.