Anti loop Procedure

Hello !

I have a question for you on IRC5:

How to avoid looping when the cursor reaches the end of a procedure (ENDPROC) ?

In fact when the cursor reaches the end of the routine the robot loops back to its first point
at the start of the routine and I would like to stop it only when the robot loops back.

Thanks for your help !

You can change it from continuous to single using the quickset menu. Better yet, you can change the sytem parameter to set it to single when putting the robot in teach.

Thanks Lemster for your quick reply !

But would it be possible to do a function at the start of the proc to avoid anti-looping ?

Under what condistions? Are you talking specifically about teach mode?

Hello,
You can use a global bool value:

PERS bool bAntiLoop:=FALSE;

Make a AntiLoop procedure:

PROC AntiLoop()
  IF NOT bAntiLoop THEN
    ErrWrite "AntiLoop detect a loop","Set bAntiLoop to TRUE before use it.";
    EXIT;
  ENDIF
  bAntiLoop:=FALSE;
ENDPROC

Then add it at start of Movement PROC

PROC MoveToPick()
  AntiLoop;
  ...
ENDPROC

PROC MoveToPlace()
  AntiLoop;
  ...
ENDPROC

And set bAntiLoop at TRUE before calling them:

PROC Main()
  ...
  bAntiLoop:=TRUE;
  MoveToPick;
  ...
  bAntiLoop:=TRUE;
  MoveToPlace;
  ...
ENDPROC

Thank you DenisFr,

The solution is perfect for automatic execution also if I select the proc alone then there will always be a loop.

I’m trying to find a solution for a single procedure selection.

Do you have an idea ? Thanks in advance !

It really sounds to me like you simply just need to have it set for single cycle and not continuous.

Thanks Lemster68

I will try tomorrow!

Lemster68, where is the system parameter to modify ? What menu?

Thanks everyone!

That would be in the controller topic, Run Mode settings.

Hey @Poupack | Here is a Screenshot for Lemster’s reply;

here you can swap to Single cycle in Handmode, when the robot is in Automatic there is no loop normally,

Do you also have this problems when robot is in Auto mode?

Greets.


You can also check it in Robotsutio here;

Perfect ! Thanks you !

Hello,

Or you can use Controller - Run Mode Setting parameters:


Or in your SYS.cfg:

RUN_MODE_SETTINGS:
    -name "AutoToManual" -SwitchTo "Single"
    -name "ManualToAuto" -SwitchTo "Single"
#