Poupack
November 27, 2023, 6:12am
1
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.
Poupack
November 28, 2023, 10:52pm
3
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?
DenisFR
November 29, 2023, 1:28pm
5
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
Poupack
November 29, 2023, 8:50pm
6
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.
Poupack
November 29, 2023, 9:23pm
9
Lemster68, where is the system parameter to modify ? What menu?
Thanks everyone!
That would be in the controller topic, Run Mode settings.
Braap
November 30, 2023, 2:58pm
11
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.
Braap
November 30, 2023, 3:17pm
12
You can also check it in Robotsutio here;
DenisFR
December 1, 2023, 10:32am
14
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"
#