# Calibration Robot with Rapid Program(Automatically)

**URL:** <https://tech-community.robotics.abb.com/t/calibration-robot-with-rapid-program-automatically/8708>\
**Category:** RobotStudio\
**Created:** [February 21, 2019, 2:27pm UTC](https://tech-community.robotics.abb.com/t/calibration-robot-with-rapid-program-automatically/8708 "2019-02-21T14:27:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yunus](https://avatars.discourse-cdn.com/v4/letter/y/b38774/32.png) [@Yunus](https://tech-community.robotics.abb.com/u/Yunus)\
**Post date:** [February 21, 2019, 2:27pm UTC](https://tech-community.robotics.abb.com/t/calibration-robot-with-rapid-program-automatically/8708/1 "2019-02-21T14:27:53Z")

</div>

Hello everyone. I need to calibrate an external axis in the robot program, automatically. I don’t want to calibrate physically on the flexpendant so I need to find a way to calibrate with the program. I have looked at Screen Maker but it won’t help me. I need to put a signal for physical calibrate on flex pendant but I don’t know how to do? Thank you.  
Best regards.

---

<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:** [February 21, 2019, 3:03pm UTC](https://tech-community.robotics.abb.com/t/calibration-robot-with-rapid-program-automatically/8708/2 "2019-02-21T15:03:10Z")

</div>

Is it a rotating external axis?

---

<div class="post-metadata">

**Author:** ![Yunus](https://avatars.discourse-cdn.com/v4/letter/y/b38774/32.png) [@Yunus](https://tech-community.robotics.abb.com/u/Yunus)\
**Post date:** [February 21, 2019, 3:14pm UTC](https://tech-community.robotics.abb.com/t/calibration-robot-with-rapid-program-automatically/8708/3 "2019-02-21T15:14:01Z")

</div>

Yes, exactly. It will turn always infinity. Because of that encoder won’t count how many degrees it has. So I need to calibrate it for example every day or every week.

---

<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:** [February 21, 2019, 3:19pm UTC](https://tech-community.robotics.abb.com/t/calibration-robot-with-rapid-program-automatically/8708/4 "2019-02-21T15:19:48Z")

</div>

What you need to use is IndReset, read up on it in the manual.

---

<div class="post-metadata">

**Author:** ![Yunus](https://avatars.discourse-cdn.com/v4/letter/y/b38774/32.png) [@Yunus](https://tech-community.robotics.abb.com/u/Yunus)\
**Post date:** [February 22, 2019, 7:20am UTC](https://tech-community.robotics.abb.com/t/calibration-robot-with-rapid-program-automatically/8708/5 "2019-02-22T07:20:58Z")

</div>

I know IndReset . But when I used it, it didn’t work. It didn’t make my external axis’s encoder value 0…

---

<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:** [February 22, 2019, 12:58pm UTC](https://tech-community.robotics.abb.com/t/calibration-robot-with-rapid-program-automatically/8708/6 "2019-02-22T12:58:02Z")

</div>

Not encoder value, value in degrees of rotation should reset to 0.

---

<div class="post-metadata">

**Author:** ![Yunus](https://avatars.discourse-cdn.com/v4/letter/y/b38774/32.png) [@Yunus](https://tech-community.robotics.abb.com/u/Yunus)\
**Post date:** [February 22, 2019, 3:34pm UTC](https://tech-community.robotics.abb.com/t/calibration-robot-with-rapid-program-automatically/8708/7 "2019-02-22T15:34:42Z")

</div>

I read position value from GetJointData… \position:= (here)  
and when i used IndReset, this position value is not changing to 0.  
So the value can go infinity some time later i need to make 0 this position value. And i can do this with flexpendant\> calibration\> fine calibration.  
But i need to find a way to send a signal to flexpendant’s calibration menu 🙂

---

<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:** [February 22, 2019, 4:29pm UTC](https://tech-community.robotics.abb.com/t/calibration-robot-with-rapid-program-automatically/8708/8 "2019-02-22T16:29:51Z")

</div>

It works for us, here is the code we use:

PROC stopTableRotation()  
! stops rotation of turntable and resets revolutions to zero  
! Turn off speed monitor  
SetDO do07\_ZeroMonitorOn, 0;  
! command turntable speed of 0 deg./sec.  
IndCMove MTT180, 2, 0\Ramp:=10;  
WaitUntil IndSpeed(MTT180,2\ZeroSpeed);  
! command turntable position of 0 degrees  
IndRMove MTT180, 2\ToRelNum:=0\Fwd, 45\Ramp:=10;  
! wait for turntable to reach commanded position  
WaitUntil IndInpos(MTT180, 2) = TRUE;  
!  
WaitTime 0.5;  
! reset turntable position  
IndReset MTT180, 2\RefNum:=0\Short;  
ENDPROC
