Hi RookieWithRobots:
But as far as I know, ABORT_TASK cannot be used in CONDITION.
Can I use other function to solve this problem?
Posts by lan1301
-
-
Can anyone help me?
-
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? -
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. -
Hi CPh:
Hi
When you create a TP program:
choose [INST]
I holp to read UFRAME and UTOOL from PR[6].
And then assign to PR[16].
How can I do? -
Hi Everyone:
How to get UFRAME and UTOOL in PR [i] through TP program?
Then assigned to PR [j].
Thanks -
-
Hi everyone:
I have encountered some problems in the ROBOT controller.
I created two programs with KAREL and built .PC from .KL.
I copied these two files to the real ROBOT via a USB stick.
When I load two programs in the teach pendant and remove the USB stick and then run the program, the program will fail.
But if the USB stick is always inserted into the teaching panel and runs the same program, it will work fine.
I hope that after the ROBOT program is loaded, the USB memory stick can be removed and the program can be successfully executed.
What can I do?
My .KL code like below:Code
Display MoreLOAD_STATUS('PROCESS.PC',bLoaded,initi) IF (NOT bLoaded) THEN WRITE('Loading',CR) LOAD ('PROCESS.PC',0,iStatus) IF (iStatus = 0) THEN RUN_TASK ('PROCESS',1,FALSE,FALSE,1,iStatus) IF (iStatus<>0) THEN WRITE ('Change the value of the Variables',CR) WRITE ('by another program failed',CR) WRITE ('But you can try changing the values',CR) WRITE ('from KCL',CR) ENDIF ELSE WRITE('Load PROC Failed:',iStatus,CR) ENDIF ENDIF
The result is "Load PROC Failed: 67003<== This is LOAD Built-In Procedure status return value. -
Thanks hermann, rf103 and HawkME.
Because I need to use SOCKET MESSAGE to communicate with the PLC and camera, so I have to use KAREL.Thanks everyone.
-
Hi HawkME:
You can edit TP in a text editor. Edit the LS file then it's as fast as you can type. You can convert LS to TP with several different methods (not necessarily free), search the forum.
Thank you for your reply.
May I ask one question, can TP program for SOCKET MESSAGE? -
-
Hi hermann:
As far as I know the motion planner of Karel is very outdated. You should not use it anymore.As you said, which language should I use now?
-
Hi Everyone:
The following statement I want to convert to the KAREL program:
J P[1] 100msec FINE
L P[2] 100msec CNT50
L P[3] 100msec FINEI want to convert to FINE and CNT50 to KAREL.
What instructions can I use?
Now I use the following:
$MNUTOOLNUM[1] = 1
$GROUP[1].$UTOOL = $MNUTOOL[1,$MNUTOOLNUM[1]]
$MNUFRAMENUM[1] = 2
$GROUP[1].$UFRAME = $MNUFRAME[1,$MNUFRAMENUM[1]]
WITH $SPEED = 100, $TERMTYPE = NODECEL, $MOTYPE = JOINT
MOVE TO P1
WITH $SPEED = 100, $TERMTYPE = NODECEL, $MOTYPE = LINEAR
MOVE TO P2
WITH $SPEED = 100, $TERMTYPE = NODECEL, $MOTYPE = LINEAR
MOVE TO P3
But the result will stop at p2 and delay for some times.
I need to move continuously from P1 to P2, P3.
The robot only stops at p1 and p3.
P2 is just past the point.I will be grateful for any help.
Does anyone have relevant experience? -
Hi Everyone:
The following statement I want to convert to the KAREL program:
J P[1] 100msec FINE
L P[2] 100msec CNT50
L P[3] 100msec FINEI want to convert to FINE and CNT50 to KAREL.
What instructions can I use?
Now I use the following:
$MNUTOOLNUM[1] = 1
$GROUP[1].$UTOOL = $MNUTOOL[1,$MNUTOOLNUM[1]]
$MNUFRAMENUM[1] = 2
$GROUP[1].$UFRAME = $MNUFRAME[1,$MNUFRAMENUM[1]]
WITH $SPEED = 100, $TERMTYPE = NODECEL, $MOTYPE = JOINT
MOVE TO P1
WITH $SPEED = 100, $TERMTYPE = NODECEL, $MOTYPE = LINEAR
MOVE TO P2
WITH $SPEED = 100, $TERMTYPE = NODECEL, $MOTYPE = LINEAR
MOVE TO P3
But the result will stop at p2 and delay for some times.
I need to move continuously from P1 to P2, P3.
The robot only stops at p1 and p3.
P2 is just past the point.
How can i do?I will be grateful for any help.
-
Hi dha:
I understand.I think it is only possible to set one array element per program line.
Why you need this? You can create routine which will set array elements ...
Because I need to combine AOI to pick and place.
So there will be 120 arrays that must be set to default values.
Thank you a lot. -
Hi dha:
It should be that I did not make it clear.
This is what I want to do, as shown below.Code
Display MoreVAR array_i : ARRAY[30] OF INTEGER BEGIN array_i[1]=5 array_i[2]=6 array_i[3]=3 array_i[4]=8 array_i[5]=7 . . .
Line-by-line input is too much trouble.
Is there any other way of doing this?
Thank you very much for your reply. -
Hi dha:
Thank you for your reply.
You can do something like this:Probably yes.
But if the values are not the same value, then...
I don't know how to do. -
Hello everyone,
I want to assign some default values to an array of integers with KAREL.
In C language, I can write like this "int_array [9] = [1,2,3,4,5,6,7,8,9]".
But I don't know how to do it with the KAREL language.
Can anyone help me?
I will be grateful for any help. -
Hi Thomas, thanks for sharing your experience. Can you share more how you do this? My email is lan1301@ms71.hinet.net, thanks.
-
Hi, everybody,
I want to send the current position to the PLC with a socket message.
The PLC only reads hexadecimal values.
How to use KAREL to convert an integer to hexadecimal.
Can anyone help me?
I will be grateful for any help.