# Step by step

**URL:** <https://tech-community.robotics.abb.com/t/step-by-step/1623>\
**Category:** Robot Controller\
**Created:** [January 15, 2008, 3:51pm UTC](https://tech-community.robotics.abb.com/t/step-by-step/1623 "2008-01-15T15:51:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mippaloo](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@Mippaloo](https://tech-community.robotics.abb.com/u/Mippaloo)\
**Post date:** [January 15, 2008, 3:51pm UTC](https://tech-community.robotics.abb.com/t/step-by-step/1623/1 "2008-01-15T15:51:04Z")

</div>

Is there some way that i can make the robot execute the next move instruction and then stop when the robot gets lets say a pulse from a PLC. Today i have solved it with a routine that checks the signal after every movement but i want to solve it without all the extra routine calls that my solution demands. All ideas are welcome.

Below is an example on my solution.

MoveJ

If diStep=1 Step;

MoveJ

If diStep=1 Step;

MoveJ

And so on and on and on.

---

<div class="post-metadata">

**Author:** ![j\_proulx](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@j\_proulx](https://tech-community.robotics.abb.com/u/j_proulx)\
**Post date:** [January 16, 2008, 10:00pm UTC](https://tech-community.robotics.abb.com/t/step-by-step/1623/2 "2008-01-16T22:00:25Z")

</div>

Hello,

Use the System input Stop At End of Instruction.

The action value _Stop at End of Instruction_ stops program execution after the current

instruction is completed. A program cannot start when this signal is high.

_Stop at end of Instruction_ can be used by a PLC to stop the program execution when the current instruction is completed.

Jim Proulx

---

<div class="post-metadata">

**Author:** ![Mippaloo](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@Mippaloo](https://tech-community.robotics.abb.com/u/Mippaloo)\
**Post date:** [January 17, 2008, 10:45pm UTC](https://tech-community.robotics.abb.com/t/step-by-step/1623/3 "2008-01-17T22:45:55Z")

</div>

But i dont want the robot to stop after every instruction. Just after every move instruction.

---

<div class="post-metadata">

**Author:** ![PerSvensson](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/persvensson/32/1040_2.png) [@PerSvensson](https://tech-community.robotics.abb.com/u/PerSvensson)\
**Post date:** [January 17, 2008, 11:28pm UTC](https://tech-community.robotics.abb.com/t/step-by-step/1623/4 "2008-01-17T23:28:12Z")

</div>

Hi  
One idea is to write an overloaded Move instruction that includes the MoveJ and also the IO signal control.

---

<div class="post-metadata">

**Author:** ![Hunke](https://avatars.discourse-cdn.com/v4/letter/h/f05b48/32.png) [@Hunke](https://tech-community.robotics.abb.com/u/Hunke)\
**Post date:** [January 18, 2008, 8:47am UTC](https://tech-community.robotics.abb.com/t/step-by-step/1623/5 "2008-01-18T08:47:08Z")

</div>

f you can use linear movement then maybe this could work…

```auto
PROC temp()
SearchLStop,diStep,pStoredPos,pYourPos1,v100,tTempWObj:= wobjtemp;
!...!
SearchLStop,diStep,pStoredPos,pYourPos2,v100,tTempWObj:= wobjtemp;
!....
ERROR
IF ERRNO=ERR_WHLSEARCH THEN
!Error, no signal until position pYourPos reached.
!Do your stuff.
ENDIF
ENDPROC
```

---

<div class="post-metadata">

**Author:** ![Mippaloo](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@Mippaloo](https://tech-community.robotics.abb.com/u/Mippaloo)\
**Post date:** [January 18, 2008, 9:21pm UTC](https://tech-community.robotics.abb.com/t/step-by-step/1623/6 "2008-01-18T21:21:49Z")

</div>

How do you men to write an overloaded instruction. Can you give me an example.

---

<div class="post-metadata">

**Author:** ![PerSvensson](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/persvensson/32/1040_2.png) [@PerSvensson](https://tech-community.robotics.abb.com/u/PerSvensson)\
**Post date:** [January 19, 2008, 10:25pm UTC](https://tech-community.robotics.abb.com/t/step-by-step/1623/7 "2008-01-19T22:25:57Z")

</div>

Hi  
What i mean is that you write your own procedure that contains the move and the wait for signal.

Something like this  
PROC MoveLStop(robtarget inTarget,speeddata inSpeed,zonedata inZone,PERS tooldata inTool,PERS wobjdata inWobj)

!Move to position  
MoveL inTarget,inSpeed,inZone,inToolWObj:=inWobj;  
!Wait for continue signal  
WaitDI diContinueMove,1;  
ENDPROC

---

<div class="post-metadata">

**Author:** ![j\_proulx](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@j\_proulx](https://tech-community.robotics.abb.com/u/j_proulx)\
**Post date:** [January 21, 2008, 10:54pm UTC](https://tech-community.robotics.abb.com/t/step-by-step/1623/8 "2008-01-21T22:54:33Z")

</div>

Hello,

Have you looked at CheckTriggIO? The trap routine could be a STOP or WAIT instruction. You need fixed position events option.

TriggCheckIO is used to define conditions for testing the value of a digital, a group of digital, or an analog input or output signal at a fixed position along the robot’s movement path. If the condition is fulfilled then there will be no specific action. But if it is not then an interrupt routine will be run after the robot has **optionally stopped** on path as fast as possible. To obtain a fixed position I/O check, TriggCheckIO compensates for the lag in the control system (lag between servo and robot).

The data defined is used for implementation in one or more subsequent TriggL, TriggC, or TriggJ instructions.

---

<div class="post-metadata">

**Author:** ![Mippaloo](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@Mippaloo](https://tech-community.robotics.abb.com/u/Mippaloo)\
**Post date:** [January 24, 2008, 10:26am UTC](https://tech-community.robotics.abb.com/t/step-by-step/1623/9 "2008-01-24T10:26:21Z")

</div>

The suggestion i got from Per worked perfectly.

Thanks!
