# Check Position after Stop

**URL:** <https://tech-community.robotics.abb.com/t/check-position-after-stop/5183>\
**Category:** Robot Controller\
**Created:** [November 6, 2012, 11:58am UTC](https://tech-community.robotics.abb.com/t/check-position-after-stop/5183 "2012-11-06T11:58:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enry](https://avatars.discourse-cdn.com/v4/letter/e/9fc29f/32.png) [@Enry](https://tech-community.robotics.abb.com/u/Enry)\
**Post date:** [November 6, 2012, 11:58am UTC](https://tech-community.robotics.abb.com/t/check-position-after-stop/5183/1 "2012-11-06T11:58:07Z")

</div>

Good Morning,  
I should like to check the Stop Position of the robot before to restart him in Auto ( After Emergency or if I switch in manual when the robot cycle running and someone move the robot in manual ). How can I do ?  
Thanks

---

<div class="post-metadata">

**Author:** ![Henrik\_Berlin](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/henrik_berlin/32/1011_2.png) [@Henrik\_Berlin](https://tech-community.robotics.abb.com/u/Henrik_Berlin)\
**Post date:** [November 6, 2012, 2:01pm UTC](https://tech-community.robotics.abb.com/t/check-position-after-stop/5183/2 "2012-11-06T14:01:47Z")

</div>

Moved to RobotWare forum.

---

<div class="post-metadata">

**Author:** ![CaptainAwesome](https://avatars.discourse-cdn.com/v4/letter/c/e19adc/32.png) [@CaptainAwesome](https://tech-community.robotics.abb.com/u/CaptainAwesome)\
**Post date:** [November 6, 2012, 3:06pm UTC](https://tech-community.robotics.abb.com/t/check-position-after-stop/5183/3 "2012-11-06T15:06:17Z")

</div>

I’m also interested in this. Maybe this thread [1] can help you (and me :-D) but I haven’t tried yet.

[1] [http://forums.robotstudio.com/forum\_posts.asp?TID=6995](http://forums.robotstudio.com/forum_posts.asp?TID=6995)

---

<div class="post-metadata">

**Author:** ![Enry](https://avatars.discourse-cdn.com/v4/letter/e/9fc29f/32.png) [@Enry](https://tech-community.robotics.abb.com/u/Enry)\
**Post date:** [November 7, 2012, 11:19am UTC](https://tech-community.robotics.abb.com/t/check-position-after-stop/5183/4 "2012-11-07T11:19:25Z")

</div>

Good morning to Everybody,  
I have tried this procedure inserted in the Main:

**PROC StopCiclo()**  
**!-------------------------------------------------------------**  
**!— ROUTINE DI STOP CICLO TRAMITE EVENT -----**  
**!-------- Gestito con Event STOP Controller --------**  
**!-------------------------------------------------------------**  
**! Memorizza Posizione in Giunti**  
**! Solo in ModalitA? AUTO**  
**TEST OpMode()**  
**CASE OP\_Auto:**  
**StopMove;**  
**jStop := CJointT();**  
**ENDTEST**  
**!**  
**ENDPROC**

Recalling from _“Control panel Configuration Controller Event Routine Stop & QStop”_ the aforesaid Routine, succeeds in memorizing the position of the robot in the moment in which he stops.  
To check to the I Start or Reboot of the robot that the position has remained the same one to the moment in which is stopped, call from _“Control panel Configuration Controller Event Routine Start & Restart”_ the following procedure:

**PROC RestartCiclo()**  
**VAR jointtarget jActPos;**  
**!-------------------------------------------------------------**  
**!-- ROUTINE DI RESTART CICLO TRAMITE EVENT –**  
**!------ Gestito con Event RESTART Controller ------**  
**!-------------------------------------------------------------**  
**!**  
**Evento := TRUE;**  
**CheckActualPos;**  
**!**  
**IF DI\_PLC\_Richiesta\_Aborto\_Ciclo = 1 THEN**  
**!**  
**StopMove;**  
**ClearPath;**  
**StartMove;**  
**ExitCycle;**  
**!**  
**ELSE**  
**StartMove;**  
**ENDIF**  
**!**  
**ENDPROC**

where the routine _“CheckActualPos”_ it is the following

**PROC CheckActualPos()**  
**VAR jointtarget jActPos;**  
**!**  
**IF DOutput(DO10\_1) = 0 AND DOutput(DO10\_2) = 0 THEN**  
**!**  
**! Solo in ModalitA? AUTO**  
**TEST OpMode()**  
**CASE OP\_Auto:**  
**! Recupera posizione attuale in Giunti**  
**jActPos:= CJointT();**  
**!**  
**TPWrite “entra”;**  
**!**  
**IF (Abs(jActPos.robax.rax\_1) - Abs(jStop.robax.rax\_1)) \> 0.2 THEN**  
**GOTO ErroreAsse;**  
**ENDIF**  
**IF (Abs(jActPos.robax.rax\_2) - Abs(jStop.robax.rax\_2)) \> 0.2 THEN**  
**GOTO ErroreAsse;**  
**ENDIF**  
**IF (Abs(jActPos.robax.rax\_3) - Abs(jStop.robax.rax\_3)) \> 0.2 THEN**  
**GOTO ErroreAsse;**  
**ENDIF**  
**IF Abs(jActPos.robax.rax\_4) - Abs(jStop.robax.rax\_4) \> 0.2 THEN**  
**GOTO ErroreAsse;**  
**ENDIF**  
**IF Abs(jActPos.robax.rax\_5) - Abs(jStop.robax.rax\_5) \> 0.2 THEN**  
**GOTO ErroreAsse;**  
**ENDIF**  
**IF Abs(jActPos.robax.rax\_6) - Abs(jStop.robax.rax\_6) \> 0.2 THEN**  
**GOTO ErroreAsse;**  
**ELSE**  
**GOTO NoErrore;**  
**ENDIF**  
**ErroreAsse:**  
**!**  
**Esito := GestioneErrori(6);**  
**ExitCycle;**  
**NoErrore:**  
**!**  
**ENDTEST**  
**!**  
**ENDIF**  
**!**  
**ENDPROC**

Verifying to move only also in manual after the Stop an axle more of 0.2, doesn’t go to error!!!  
Does someone know how to tell me where I am being wrong?  
Thanks to Everybody.
