# instructions error

**URL:** <https://tech-community.robotics.abb.com/t/instructions-error/3480>\
**Category:** Robot Controller\
**Created:** [March 30, 2010, 12:42pm UTC](https://tech-community.robotics.abb.com/t/instructions-error/3480 "2010-03-30T12:42:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dmitri](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dmitri](https://tech-community.robotics.abb.com/u/Dmitri)\
**Post date:** [March 30, 2010, 12:42pm UTC](https://tech-community.robotics.abb.com/t/instructions-error/3480/1 "2010-03-30T12:42:29Z")

</div>

Need help.

instructions error  
Description  
TASK T\_ROB1: variable and trap routine already connected

Actions  
It is not legal to connect a specific variable with a trap routine more than once

I feel i must write an error handler but i m not so experienced in RAPID programming. It is needed to automatically restart execution of processes.  
Programm looks like (simple)

MODULE module1  
workobjectdata …  
targetsdata …  
tooldata…  
speeddata…

PROC main()  
path1;  
path2;  
END PROC

PROC path1()  
move instructions …  
END PROC

PROC path2()  
move instructions…  
END PROC

END MODULE

after execution of path1 and path2 i get the error i v mentioned above and i have to manually press ok to the error message, PP to main and start button. ANy advice how to automate this?  
Thx.

---

<div class="post-metadata">

**Author:** ![charon](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/charon/32/87_2.png) [@charon](https://tech-community.robotics.abb.com/u/charon)\
**Post date:** [March 31, 2010, 9:49am UTC](https://tech-community.robotics.abb.com/t/instructions-error/3480/2 "2010-03-31T09:49:32Z")

</div>

Hi Dimitri,

Do you have any intnum variable in your program.

VAR intnum nVaribale;

If you have one try to delete it at the end or begining of each cycle with IDelete command.

IDelete nVaribale;

BR.

---

<div class="post-metadata">

**Author:** ![Dmitri](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dmitri](https://tech-community.robotics.abb.com/u/Dmitri)\
**Post date:** [April 5, 2010, 4:07pm UTC](https://tech-community.robotics.abb.com/t/instructions-error/3480/3 "2010-04-05T16:07:48Z")

</div>

Lol. this was simple)  
I have just to insert proccall (to main proc) at the end

MODULE module1  
workobjectdata …  
targetsdata …  
tooldata…  
speeddata…

PROC main()  
path1;  
path2;  
END PROC

PROC path1()  
move instructions …  
END PROC

PROC path2()  
move instructions…  
main;  
END PROC

END MODULE

So now i have endless cycle and operator must press stop manually to stop robot ;p

---

<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:** [April 6, 2010, 6:14pm UTC](https://tech-community.robotics.abb.com/t/instructions-error/3480/4 "2010-04-06T18:14:37Z")

</div>

Greetings,

This solution is not so good. It will cause a execution stack overflow. It is recursive; your call heirarchy has already started in the main and then you call main from within. A better solution for an infinite loop would be: WHILE (TRUE) DO  
Proc1;  
Proc2;  
ENDWHILE

BR,

---

<div class="post-metadata">

**Author:** ![mattdavis](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@mattdavis](https://tech-community.robotics.abb.com/u/mattdavis)\
**Post date:** [April 8, 2010, 2:11am UTC](https://tech-community.robotics.abb.com/t/instructions-error/3480/5 "2010-04-08T02:11:54Z")

</div>

or if you wanted some control over it. You can set the robot to run in continous cycle instead of single execution and when it finished main it will start again.
