# mappMotion-Backtrace

**URL:** <https://community.br-automation.com/t/mappmotion-backtrace/2316>\
**Category:** How-To & Wikis\
**Tags:** mapp-view, mapp-motion\
**Created:** [February 22, 2024, 10:09am UTC](https://community.br-automation.com/t/mappmotion-backtrace/2316 "2024-02-22T10:09:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fikejja1](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/fikejja1/32/1335_2.png) [@fikejja1](https://community.br-automation.com/u/fikejja1)\
**Post date:** [February 22, 2024, 10:09am UTC](https://community.br-automation.com/t/mappmotion-backtrace/2316/1 "2024-02-22T10:09:38Z")

</div>

### Problem description

With the current version of mappMotion (now 5.24) you do not get a lot of information from the motion alarms.

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/a/acdd2e226f131b348f7516dfe648f51ba075cf04.png)

### Solution

Fortunately, the Backtrace functionality can be implemented with a little effort using the MpAlarmXListUI() function block. The result may look like this:

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/2/2e3f8678d315d4077fcfbe1eb1a3d223576838de.png)

When you click on the line at the top, the Backtrace information is displayed at the bottom. This often consists of several records. The information displayed is very detailed. The same information can be found in Logger or mappCockpit.

### How to

##### Code in PLC

A task similar to this needs to be added to the PLC:

```auto
PROGRAM _INIT
    MpAlarmXCore_0.MpLink := ADR(gAlarmXCore);
    MpAlarmXCore_0.Enable := TRUE;
    MpAlarmXListUI_0.MpLink := ADR(gAlarmXCore);
    MpAlarmXListUI_0.Enable := TRUE;
    MpAlarmXListUI_0.UIConnect := ADR(MpAlarmXListUIConnect);
      
END_PROGRAM
 
PROGRAM _CYCLIC
    // backtrace for motion alarms
     
    IF MpAlarmXCore_0.PendingAlarms = 0 THEN
        // No pending alarms, reset instance id
        InstanceID := 0;
    END_IF
     
    maxIndex := SIZEOF(MpAlarmXListUIConnect.AlarmList.InstanceID) / SIZEOF(MpAlarmXListUIConnect.AlarmList.InstanceID[0]) - 1;
    FOR i := 0 TO maxIndex DO
        IF MpAlarmXListUIConnect.AlarmList.InstanceID[i] = InstanceID THEN
            MpAlarmXListUIConnect.AlarmList.SelectedIndex := i;
            EXIT;
        END_IF
    END_FOR
     
    MpAlarmXCore_0();
    MpAlarmXListUI_0();
     
END_PROGRAM

```

Variable definition:

```auto
VAR
    MpAlarmXCore_0 : MpAlarmXCore;
    MpAlarmXListUI_0 : MpAlarmXListUI;
    MpAlarmXListUIConnect : MpAlarmXListUIConnectType;
    InstanceID : UDINT;
    maxIndex : INT;
    i : INT;
END_VAR

```

##### Edit the visualization

When clicking on an error line in the AlarmList, write the error identifier into the InstanceID variable:

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/d/d6f9f12ec336273501003b6cb0f6d77862e31c57.png)

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/7/712debd26d29406b895d8044e25f737c05dff9bf.png)

Backtrace information is displayed in a table. In the first column, we add the error number:

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/5/5338e59f8b9655aa9fb5d8349ce56fea224020d9.png)

and in the second column we insert the error text:

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/d/d053b9aa04c5127c9dda14d223c533aa8abb5d1a.png)

---

<div class="post-metadata">

**Author:** ![Tom\_Schellekens](https://avatars.discourse-cdn.com/v4/letter/t/FF8800/32.png) [@Tom\_Schellekens](https://community.br-automation.com/u/Tom_Schellekens)\
**Post date:** [March 13, 2024, 8:04am UTC](https://community.br-automation.com/t/mappmotion-backtrace/2316/2 "2024-03-13T08:04:32Z")

</div>

Hi Jan, thanks for sharing this information about alarms.

I am working on getting the alarm on a VC screen. I succeeded but when I change my language to Dutch or French the text of the backtrace description does not change. With German it does. Is there another setting I should do or are only English and German possible as translations of an servo alarm in VC?

---

<div class="post-metadata">

**Author:** ![fikejja1](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/fikejja1/32/1335_2.png) [@fikejja1](https://community.br-automation.com/u/fikejja1)\
**Post date:** [March 13, 2024, 10:01am UTC](https://community.br-automation.com/t/mappmotion-backtrace/2316/3 "2024-03-13T10:01:10Z")

</div>

Hello Tom,

I am no expert in VC4 visu, but to my knowledge there are only English and German texts for this.  
I tested it in mappView and again, only English and German. The system takes the information from the logger. And there are no other languages available there.

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/b/bf79488b48a261e330161d12c0863faeb23a8e21.png)

I will try find out, if you can somehow add languages to it or simply locate all of the texts somewhere (I do not know if it is possible though) and then you could translate them and then connect them to the text system, so it would be changing. That would be a working workaround.

Maybe someone in the Community knows this and can help.

Edit: so far as I know, there is no other option than English or German.

---

<div class="post-metadata">

**Author:** ![xabier.zaldua](https://avatars.discourse-cdn.com/v4/letter/x/FF8800/32.png) [@xabier.zaldua](https://community.br-automation.com/u/xabier.zaldua)\
**Post date:** [June 20, 2025, 8:00am UTC](https://community.br-automation.com/t/mappmotion-backtrace/2316/4 "2025-06-20T08:00:57Z")

</div>

Hi Jan, great workaround!! Implemented without problems and working. Fantastic 🙂

![2025-06-20_09-59-20](https://europe1.discourse-cdn.com/brcommunity/original/2X/f/f280b0b966ac3748dcac175a8da641b945685458.gif)

---

<div class="post-metadata">

**Author:** ![hakan.kececi](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/hakan.kececi/32/249_2.png) [@hakan.kececi](https://community.br-automation.com/u/hakan.kececi)\
**Post date:** [August 5, 2025, 2:05pm UTC](https://community.br-automation.com/t/mappmotion-backtrace/2316/5 "2025-08-05T14:05:46Z")

</div>

Additional Info:

If you used shared alarm, you can use ComponentName of an axis element as identifier for your alarm by adding {&ComponentName} to your alarm messages. In this case you don’t need to add scope column to identify the scope of the alarms.

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/1/15dc3866cdb278b71e0411ace414d52523abb163.png)
