# How to skip Trap\\SingleSafe execution during UNDO

**URL:** <https://tech-community.robotics.abb.com/t/how-to-skip-trap-singlesafe-execution-during-undo/11323>\
**Category:** RAPID Programming\
**Tags:** undo, singlesafe, rapid, trap\
**Created:** [January 10, 2024, 10:18am UTC](https://tech-community.robotics.abb.com/t/how-to-skip-trap-singlesafe-execution-during-undo/11323 "2024-01-10T10:18:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![NES](https://avatars.discourse-cdn.com/v4/letter/n/3be4f8/32.png) [@NES](https://tech-community.robotics.abb.com/u/NES)\
**Post date:** [January 10, 2024, 10:18am UTC](https://tech-community.robotics.abb.com/t/how-to-skip-trap-singlesafe-execution-during-undo/11323/1 "2024-01-10T10:18:19Z")

</div>

Hey,

I have traps with SingleSafe argument for process control even when normal tasks are inactive.  
The trouble is when PPtoMain is made UNDO handler is activated and after that controller executes the trap \SingleSafe and in that trap I have WaitGI from PLC but PLC doesn’t send feedback while controller is not running.

Is there any possibility to indicate that UNDO is executed to abort the trap? After PPtoMain UNDO is active but does not read any RAPID code and jumps straight to the TRAP.  
Or maybe it is somehow possible to delete the connected traps?

---

<div class="post-metadata">

**Author:** ![lemster68](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/lemster68/32/1945_2.png) [@lemster68](https://tech-community.robotics.abb.com/u/lemster68)\
**Post date:** [January 10, 2024, 1:10pm UTC](https://tech-community.robotics.abb.com/t/how-to-skip-trap-singlesafe-execution-during-undo/11323/2 "2024-01-10T13:10:01Z")

</div>

What else is in the UNDO handler? Can you just remove it?

---

<div class="post-metadata">

**Author:** ![NES](https://avatars.discourse-cdn.com/v4/letter/n/3be4f8/32.png) [@NES](https://tech-community.robotics.abb.com/u/NES)\
**Post date:** [January 10, 2024, 1:23pm UTC](https://tech-community.robotics.abb.com/t/how-to-skip-trap-singlesafe-execution-during-undo/11323/3 "2024-01-10T13:23:50Z")

</div>

In UNDO handler I am setting flags if a general PPtoMain for all robots is made or an individual PPtoMain is commanded. Afterwards I am executing different initialization routines.  
I am using UNDO handler because PPtoMain signals are pulsed and for stable identification of which PPtoMain is ordered flags were implemented.  
Maybe it would also be logical to put this logic into the start event routine

---

<div class="post-metadata">

**Author:** ![lemster68](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/lemster68/32/1945_2.png) [@lemster68](https://tech-community.robotics.abb.com/u/lemster68)\
**Post date:** [January 10, 2024, 3:26pm UTC](https://tech-community.robotics.abb.com/t/how-to-skip-trap-singlesafe-execution-during-undo/11323/4 "2024-01-10T15:26:39Z")

</div>

So this is a multimove system?

---

<div class="post-metadata">

**Author:** ![NES](https://avatars.discourse-cdn.com/v4/letter/n/3be4f8/32.png) [@NES](https://tech-community.robotics.abb.com/u/NES)\
**Post date:** [January 11, 2024, 9:58am UTC](https://tech-community.robotics.abb.com/t/how-to-skip-trap-singlesafe-execution-during-undo/11323/5 "2024-01-11T09:58:36Z")

</div>

Yep, it is a multimove system with 3 robots
