I've just made a quick test with ABORT_TASK and it seems it works as I need - I'll test it more deeply in the next few days, but I think this is what I wanted
Thanks a lot jmd2777!
I've just made a quick test with ABORT_TASK and it seems it works as I need - I'll test it more deeply in the next few days, but I think this is what I wanted
Thanks a lot jmd2777!
Display MoreHere is the command to abort a task in Karel:
ABORT_TASK("TEST", TRUE, TRUE, STATUS)
where the arguments are:
1 the name of the task (you would use "TEST" and not "TEST.TP")
2 TRUE = force the abort even if the program has "ignore abort" flag
3 TRUE = cancel motion groups used by this task
4 STATUS = An integer variable that you must create beforehand. Its an output value that indicates if the abort request succeeded.
GET_TSK_INFO can be used to check if a task is running. The task status that it returns is a bit tricky though because its value depends on if a task has ever run since boot up or if the task has been run but was stopped or paused.
Thanks for suggestions with ABORT_TASK - I'll test it.
I know GET_TSK_INFO - I tried to fight with it but since now, in this case with no success
Hope ABORT_TASK would help
I agree with HawkME. There is probably a better way to do this. If you have a Karel program that is always running and waiting to abort TEST.TP, then how will you run it when you need to? If its something you need to run occassionally then you will have to stop execution of your guardian Karel program. Could you just delete TEST.TP from the robot and then load it when you need to run it and then delete it again?
Deleting the specific program is not a good sollution, because this program is used in AUTO mode in the whole cycle, I need to avoid running random programs in manual mode.
And when I need to run it myself, I'd do also the condition when for instance my F[xy] = ON then I could run it, and only me would know the "xy" number
Lock the teach pendant in a box.
That was also my idea, but sometimes when has some problems eg. collision, opoerator needs to jog it using TP, so the box is not acceptable by my bosses
But anyway it would be the best sollution here :-))
I'm planning to make a list of forbidden to run programs, and then when one of them is chosen and started (mostly in teach mode - I could monitor it via DOs - configured in config), I'd like to stop it using Karel.
For example when somebody runs a program "TEST.TP" which is on my list, I'd like to abort it.
Could you suggest me the easiest way how to do it?
Where is the instruction to turn F[2] OFF?
I don't see it anywhere in the code.
I already worte, but maybe was not enough precise - I leave the TEST987 program, enter different one, then I turn off manually F[2] = OFF (Menu -> I/O -> etc.). Finally I choose the program TEST987 (SELECT -> choose TEST987 -> ENTER), and finally my F[2] still remains off, ever after entering the program TEST987.
The program probabbly starts, because I got the F[2] = ON after making cycle power.
But anyway, I'll add the instruction to write the TP screen, as you've suggested and I'll see what's going on.
Thanks a lot for your comment and help.
Gents, delay helped (my controller doesn;t stuck) but not really succeded - I have the following listing:
name_lbl::
GET_VAR(entry,'*SYSTEM*','$TP_DEFPROG',name_prog,status)
IF status = 0 THEN
IF name_prog = 'TEST987' THEN
FLG[2] = ON
ELSE
ENDIF
ELSE
ENDIF
DELAY 500
GOTO name_lbl
When I run the following program in cold and hot start (config) I got once F[2] = ON when system starts. Then when I switch F[2] = OFF it stays off all the time
And what I exactly need - I want to monitor $DEF_PROG - when somebody chooses defined by me name of the certain program (above it's TEST987), I want to set the flag.
Could you please help and advise what I do wrong?
Thanks a lot for your suggestions.
Sorry... small correction:
- J1 - J5: VIGO Greaase Re. 0 - manufacturer Kyodo Yoshi not Nabtesco (reducers' manufacturer)
- J6: SK-3
Take care of proper posture for greasing.
There is no Mollywhite Re.0 - it was Re.00 - different thickness class.
Thanks a lot for advice - I'll try to add delay. Tomorrow I'll test it myself (need to fight with it and if not succed I'll post the program and explain exactly what I want to do.
Adding one more thing: can't use BG Logic because I want to read a system variable (string), and then if it is a predefined by me certain string, I want to set flags. Using BG Logic there is no possibility to read a string and write it into SR[x] and than finally run in in BG. That would be the easiest but Fanuc doesn't allow for that
You mean M-16i with R-J3 controller, right?
It has no oil in the reducers - there is grease inside.
- Axes J1 - J5 use VIGO Grease Re. 0 (Nabtesco) - former it was Mollywtite Re. 00.
- Axis J6 (harmonic drive) - there should be Mollywhite Re. 00 or dedicated to harmonic SK-3.
Put the new grease to reducer until it goes out from the outlet, then do not forget to take out some grease (~5%) , so that the grease baths are not full.
That's all.
Dear all.
I'd like to run a Karel program somehow in parallel to normal TP programs. In Karel program I want to monitor certain conditions (few IFs inside), and react for them (sets few flags). But my Karel program needs to be running all the time, like in the BG logic.
When I make a loop inside (LBL:: and GOTO LBL), then RUN it parallel from TP program my controller stucks completelly and only cycle power helps.
Could you please help me how to make it without any problems?
Thanks a lot for help.
Dear all.
Does anyone knows how to get the number of collisions is R-30iB Plus?
In the former controllers, there was the variable $DMR_GRP[1].$$CLDET_CNT, but in R-30iB Plus this variable is uninitialized, whareas robot has some numbers of collisions for each axis. Do I need to initialize the functionality somehow to write to these system variables?
Thanks a lot for help.
Hello Gents.
Could you please help me how to get robot config from CURPOS(0,0) using Karel?
Thanks a lot for help.