Hi everybody:
My controller is the R-30iB.
There are some problems in my TP program.
When the robot fails on the 12th line when the program fails.
I want to stop the program instead of pausing.
what should I do?
Which system variables do I need to change?
Thanks.
How to abort the program when the TP program fails?
-
lan1301 -
January 17, 2019 at 1:37 PM -
Thread is Resolved
-
-
Are you wanting to manually abort or automatically abort the program? It would help if you post your code.
-
Hi HawkME:
Are you wanting to manually abort or automatically abort the program? It would help if you post your code.
Thank you for your reply.
I Want to automatically to abort the program, and then restart the program.
My program is main(KAREL) call TP(sub-program), the TP program is paused when the TP program is failure.
And my main program is aborted.
In my main(KAREL) I write below:
condition[n]:
When OPOUT[21]=TRUE DO --If the FAULT is comming
ABORT --I want to ABORT all program(Include about TP program), and then can restart from main program.
EndCondition
Then I restart the program, the robot restart from the TP program last line.
How to achieve it? -
Can anyone help me?
-
Have you tried this:
--Abort all tasks.
ABORT_TASK('*ALL*',TRUE, TRUE, i_status)-- Select TP program
SELECT_TPE('MAIN', i_status)From manual:
SELECT_TPE Built-In Procedure
Purpose: Selects the program of the specified name
Syntax : SELECT_TPE(prog_name, status)
Input/Output Parameters :
[in] prog_name :STRING
[out] status : :INTEGER
%ENVIRONMENT Group :TPE
Details:
• prog_name specifies the name of the program to be selected as the teach pendant default. This is
the program that is "in use" by the teach pendant. It is also the program that will be executed if the
CYCLE START button is pressed or the teach pendant FWD key is pressed.
• status explains the status of the attempted operation. If it is not equal to 0, then an error has
occurred. -
Hi RookieWithRobots:
But as far as I know, ABORT_TASK cannot be used in CONDITION.
Can I use other function to solve this problem? -
Sorry I didn't read your message careful enough
-
You can map Flag to UOP In signal CSTOPI and use this signal for Abour all. From KAREL you can set Flag to ON.