thanks to all. solved the problem via KAREL
Posts by Kawazaki02
-
-
If you have checked all positional data, and the coordinates set by the application process are not to blame, then I would guess it is a software compatibility issue. Inserting a user alarm probably interrupts the software process allowing the robot to continue normally. Was this scansonic equipment recommended by FANUC or was it something your company decided to use. FANUC usually recommends the equipment that is most compatible with their software, and can provide tech assistance with diagnosing these kinds of issues. Have you tried recording P[8] as a position register and using that in place of the point? It might not help, but there is a possibility that using a position register could interrupt the end of the application process enough to prevent a crash because those applications do not typically modify register values. Jog the robot to P[8], go into your position registers and find one that is not used, record the position to that register, then in the program curser over to the 8 and use the function key for choice, select PR, then type the number of the PR that you used. Make sure it is still set to a linear motion, and that the speed of the motion is still the same, then try to run the program without the user alarm. I hope this helps. If nothing else, you could try to rewrite the program, and use that in its place if for some reason your data is being corrupted. I wish I could be more help, but without being able to put my hands on the pendant to check the application data, it's difficult to diagnose.
Okay, I'll try at work tomorrow.
I will write about success -
That's very strange. So basically the robot scans and welds fine, but when leaving the last weld point and moving to a safe point away from the product the robot decides to go a different direction? It appears as though the next motion is a linear motion and should go directly to that point. Its hard to know what is going on without getting my hands on it, but I would still assume an issue with the scanning application because the problem doesn't arise unless it is implemented, correct? I would double and triple check the scansonic application to ensure it is not sending the robot faulty positional data at the end of its scan cycle. Also, is it possible to bypass the scansonic, and create old fashioned welding instructions to do the job, or is there too much variance from cycle to cycle? Also, if that is not an option, I would check the coordinate data for point 7 and point 8 after a crash before the robot is manually moved off of the product to see if the last coordinates are where they should be.
checked everything. this problem has been in our enterprise for a very long time.
but still the question remains, why, after scanning, if you cause an error, the robot moves on as if nothing had happened.
-
OK, have you calibrated the scanning head? It might be that the calibration is off. I have only set up 1 laser guided welding application and I know that on that system, if the calibration was off then it would cause the robot to weld in the wrong location. What might be happening is that the sensor was bumped, or has moved slightly since the last time it was calibrated. This would cause the robot to scan properly, but when the application sets the coordinates, it is off enough to cause a collision. Sorry, im not very familiar with the scansonic application, but I do have experience with irvision and other laser welding applications, so im not sure exactly how it sets its coordinates.
all instrument and laser adjustments were made correctly, the software shows that the robot is correctly plotting the coordinates.
but it is precisely after the weld end that it jerks randomly quickly when moving to another point. Sometimes it hits not the product, but vice versa from the product. those. there is some kind of collision area after scanning.
however, neither fanuc nor the representatives of the laser sensor could help solve this problem -
So you are saying that the robot will collide without an alarm, but if you insert a user alarm it doesn't? Have you tried jogging the robot from point 7 to point 8 to see if there is an obstruction between points? Also it appears that you have remarked out the weave circle but left the weave end in place. Have you tried remarking both out to see if that helps resolve the issue?
yes, I tried to come to each point separately and sequentially in step without scanning, there are no problems, there are no obstacles between the robot's points.
the problem appears exactly at the end of the scanning track, while the length of the scanning path is not important, the problem is always when moving from the end of the scanning point (during scanning) to the indentation point (the robot moves to a safe distance from the product)
-
Hello everyone. I cannot solve the problem.
after scanning (Scansonic), the robot makes an involuntary impact on the product.
If you cause an error after scanning, then no impact occurs.
I tried to solve it with KAREL, but I couldn't find a command that could reset a custom error in automatic mode.During the transition from point 7 to point 8 without user error, a hit occurs.
If you call a custom error after scanning, and then reset and continue, then no impact occurs.Maybe some of you have already encountered a similar problem.
-
if anyone needs a program on this topic, keep it and use it. program on KAREL. is designed to shift points by specified coordinates by the value of the argument, the argument is taken from the program call. (if you have questions about the program, write here, I will try to answer).
Thanks to everyone who helped figure it out.
Code
Display MorePROGRAM TEST_KAR_12 %ENVIRONMENT REGOPE %NOLOCKGROUP %ALPHABETIZE %COMMENT = 'ALL_POS_ARG' %ENVIRONMENT TPE %ENVIRONMENT BYNAM %INCLUDE klevtpe CONST MAX_AXS = 9 VAR to_prog: STRING[30] open_id: INTEGER status: INTEGER indx_pos: INTEGER num_axs : INTEGER group_no: INTEGER posn_type: INTEGER org_xyz : XYZWPREXT new_xyz : XYZWPREXT num_pos : INTEGER r_val: REAL i_val: INTEGER r_flg :BOOLEAN pos_num: INTEGER param_no : INTEGER data_type : INTEGER int_value : INTEGER real_value : REAL sens_name : STRING[40] BEGIN GET_TPE_PRM (1,2,int_value,real_value,sens_name,STATUS) to_prog = 'TEST_TP_1' OPEN_TPE (to_prog, TPE_RWACC, TPE_RDREJ, open_id, status) group_no = 1 AVL_POS_NUM (open_id, pos_num, status) num_pos = pos_num FOR indx_pos = 1 TO num_pos-1 DO GET_POS_TYP (open_id, indx_pos, group_no, posn_type, num_axs, status) WRITE('get_pos_typ status', status,CR) SELECT posn_type OF CASE (pt_rxyzwpr): org_xyz = GET_POS_TPE (open_id, indx_pos, status) new_xyz = org_xyz new_xyz.x = org_xyz.x + int_value new_xyz.y = org_xyz.y + 0 new_xyz.z = org_xyz.z + 0 new_xyz.w = org_xyz.w + 0 new_xyz.p = org_xyz.p + 0 new_xyz.r = org_xyz.r + 0 new_xyz.ext1 = org_xyz.ext1 + 0 new_xyz.ext2 = org_xyz.ext2 + 0 new_xyz.ext3 = org_xyz.ext3 - int_value SET_EPOS_TPE (open_id, indx_pos, new_xyz, status) ENDSELECT ENDFOR CLOSE_TPE (open_id, status) END TEST_KAR_12
-
GET_TPE_PRM is the command to parse passed in arguments from a TP call.
Example of its use from some code of mine in my conversion thread:
Thank you very much. everything worked out. really not without dancing with a tambourine
-
Hi guys. can you tell me which operator to use to get the value of the argument shown in the picture?
-
Thank you for your comment. I'm just learning to program in KAREL so far, so don't judge too three. I'll try to loop the program, unsubscribe about the results =)
I just need a little support from knowledgeable people to learn from experienced )
-
Delete your .pc and the .vr file it leaves behind from the controller, then recompile. The file will complie, but fail to load because there is a difference in declared varibles in the .vr file.
tried it, didn't help ))
-
Hello everyone, I wrote the code. compiles. but when executing the program, it will throw an error. if you remove 47 and 75, then the program is executed well, without errors.
Code
Display MorePROGRAM TEST_KAR_10 %NOLOCKGROUP %ENVIRONMENT REGOPE %ALPHABETIZE %COMMENT = 'ALL_POS_ARG' %ENVIRONMENT TPE %ENVIRONMENT BYNAM %INCLUDE klevtpe CONST MAX_AXS = 9 VAR to_prog: STRING[25] open_id: INTEGER status: INTEGER indx_pos: INTEGER num_axs : INTEGER group_no: INTEGER posn_type: INTEGER org_xyz : XYZWPREXT new_xyz : XYZWPREXT num_pos : INTEGER r_val: REAL i_val: INTEGER r_flg :BOOLEAN BEGIN to_prog = 'TEST_TP_1' OPEN_TPE (to_prog, TPE_RWACC, TPE_RDREJ, open_id, status) group_no = 1 GET_POS_TYP (open_id, indx_pos, group_no, posn_type, num_axs, status) WRITE('get_pos_typ status', status,CR) FOR indx_pos = 1 TO num_pos-1 DO WRITE ('indx_pos', indx_pos, CR, CR) SELECT posn_type OF CASE (pt_rxyzwpr): GET_REG (101,r_flg, i_val, r_val, status) WRITE ('Got REAL value from R[101]',CR) org_xyz = GET_POS_TPE (open_id, indx_pos, status) new_xyz = org_xyz new_xyz.x = org_xyz.x + i_val new_xyz.y = org_xyz.y + 0 new_xyz.z = org_xyz.z + 0 new_xyz.w = org_xyz.w + 0 new_xyz.p = org_xyz.p + 0 new_xyz.r = org_xyz.r + 0 new_xyz.ext1 = org_xyz.ext1 + 0 new_xyz.ext2 = org_xyz.ext2 + 0 new_xyz.ext3 = org_xyz.ext3 - i_val SET_EPOS_TPE (open_id, indx_pos, new_xyz, status) ENDSELECT ENDFOR CLOSE_TPE (open_id, status) END TEST_KAR_10
-
The program has many issues, and in the first version it does'nt make real sense. Who wrote that?
It compiles, but it has runtime errors and doesn't run till end.
Here is a working one (only tested with one extended axis), BUT: there seems to be an issue in the KAREL system of fanuc. At least in my test equipment the value of extended axis 1 that comes from the funtion GET_POS_TPE has nothing to do with the real value.
You can see the outputs of the WRITE statements on the User screen (MENU - 9 USER).
And one more remark: Try to write programs on your own, read the karel manuals, learn to debug programs. jm2c.
I'm out now.
thanks, everything worked
-
Does anyone have an example of a Karel program for shifting additional axes on FANUC robots?
Or consult on this issue.
-
Are you kidding us?
You only had to mark the code in my post and copy it to your .kl file and it would have been worked. That's the reason why code has to be inserted into a code-tag.
Here is the proof, (I have a newer compiler, may be that's the problem, but I don't think so):
thanks, I also compiled, but the additional axes did not move
-
hi kawazaki02,
i think you Need to add %ENVIRONMENT REGOPE on your Code.
did not work. I don't know what to do anymore
PROGRAM TEST_KAREL
%ENVIRONMENT TPE
%ENVIRONMENT BYNAM
%ENVIRONMENT REGOPE
CONST
MAX_AXS = 9
JNT_POS = 9
XYZ_POS = 2
VAR
to_prog: STRING[25]
open_id: INTEGER
status: INTEGER
position_no: INTEGER
jp_org : ARRAY [9] OF REAL
jp_new : ARRAY [9] OF REAL
prg_select: INTEGER
arr_size : INTEGER
indx : INTEGER
indx_pos: INTEGER
num_pos : INTEGER
indx_axs: INTEGER
num_axs : INTEGER
pos_typ : INTEGER
group_no: INTEGER
org_jpos : JOINTPOS
new_jpos : JOINTPOS
posn_type: INTEGER
org_xyz : XYZWPREXT
new_xyz : XYZWPREXT
org_xyz_ext : XYZWPREXT
new_xyz_ext : XYZWPREXT
BEGIN
to_prog = 'TEST_TP_1'
OPEN_TPE (to_prog, TPE_RWACC, TPE_RDREJ, open_id, status)
group_no = 1
position_no = 3
GET_POS_TYP (open_id, indx_pos, group_no, posn_type, num_axs, status)
WRITE ('get_pos_typ status', status,CR)
SELECT pos_typ OF
CASE (JNT_POS):
SET_JPOS_TPE (open_id, indx_pos, new_jpos, status)
WRITE ('indx_pos', indx_pos, 'new_jpos',CR, new_jpos,CR)
ENDSELECT
org_jpos = GET_JPOS_TPE (open_id, indx_pos, status)
org_xyz = GET_POS_TPE (open_id , indx_pos, status)
new_xyz.x = org_xyz.x +10
new_xyz.y = org_xyz.y +0
new_xyz.z = org_xyz.z +0
new_xyz.w = org_xyz.w +0
new_xyz.p = org_xyz.p +0
new_xyz.r = org_xyz.r +0
new_xyz_ext1 = org_xyz_ext1 + 10
SET_POS_TPE (open_id, position_no, new_xyz, status)
CLOSE_TPE (open_id, status)
END TEST_KAREL
----------------------------------------------------------------------
Translating D:\NikolaevAS\Desktop\untitled18.kl
KTRANS Version V8.30 (Build 30 11/12/2019)
Copyright (C) FANUC America Corporation, 1985 through 2016.
All Rights Reserved.
D:\NikolaevAS\Desktop\untitled18.kl(77)
77 new_xyz_ext1 = org_xyz_ext1 + 10
^ ERROR
Id must be defined before this use. Id: ORG_XYZ_EXT1
D:\NikolaevAS\Desktop\untitled18.kl(79)
79 SET_POS_TPE (open_id, position_no, new_xyz, status)
^ WARNING
Argument will be passed by value. Id: NEW_XYZ
===============Translation not successful===============
Build Failed: Error translating program: Code: 0xFFFFFFFF:
----------------------------------------------------------------------
-
try replacing the underscores with periods in your new code that Hermann suggested using. His code uses a . instead of a _ in the variable name for the extended axis. new_xyz.ext1 = org_xyz.ext1 + 10
tried it. The result is the same
-
PROGRAM TEST_KAREL
%ENVIRONMENT TPE
%ENVIRONMENT BYNAM
CONST
MAX_AXS = 9
JNT_POS = 9
XYZ_POS = 2
VAR
to_prog: STRING[25]
open_id: INTEGER
status: INTEGER
position_no: INTEGER
jp_org : ARRAY [9] OF REAL
jp_new : ARRAY [9] OF REAL
prg_select: INTEGER
arr_size : INTEGER
indx : INTEGER
indx_pos: INTEGER
num_pos : INTEGER
indx_axs: INTEGER
num_axs : INTEGER
pos_typ : INTEGER
group_no: INTEGER
org_jpos : JOINTPOS
new_jpos : JOINTPOS
posn_type: INTEGER
org_xyz : XYZWPREXT
new_xyz : XYZWPREXT
BEGIN
to_prog = 'TEST_TP_1'
OPEN_TPE (to_prog, TPE_RWACC, TPE_RDREJ, open_id, status)
group_no = 1
position_no = 3
GET_POS_TYP (open_id, indx_pos, group_no, posn_type, num_axs, status)
WRITE ('get_pos_typ status', status,CR)
SELECT pos_typ OF
CASE (JNT_POS):
SET_JPOS_TPE (open_id, indx_pos, new_jpos, status)
WRITE ('indx_pos', indx_pos, 'new_jpos',CR, new_jpos,CR)
ENDSELECT
org_jpos = GET_JPOS_TPE (open_id, indx_pos, status)
org_xyz = GET_POS_TPE (open_id , indx_pos, status)
new_xyz.x = org_xyz.x +10
new_xyz.y = org_xyz.y +0
new_xyz.z = org_xyz.z +0
new_xyz.w = org_xyz.w +0
new_xyz.p = org_xyz.p +0
new_xyz.r = org_xyz.r +0
new_xyz_ext1 = org_xyz_ext1 + 10
new_xyz_ext2 = org_xyz_ext2 + 10
new_xyz_ext3 = org_xyz_ext3 + 10
SET_POS_TPE (open_id, position_no, new_xyz, status)
CLOSE_TPE (open_id, status)
END TEST_KAREL
Build error
Translating D:\NikolaevAS\Desktop\untitled18.kl
KTRANS Version V8.30 (Build 30 11/12/2019)
Copyright (C) FANUC America Corporation, 1985 through 2016.
All Rights Reserved.
D:\NikolaevAS\Desktop\untitled18.kl(72)
72 new_xyz_ext1 = org_xyz_ext1 + 10
^ ERROR
Id must be defined before this use. Id: ORG_XYZ_EXT1
D:\NikolaevAS\Desktop\untitled18.kl(73)
73 new_xyz_ext2 = org_xyz_ext2 + 10
^ ERROR
Id must be defined before this use. Id: ORG_XYZ_EXT2
D:\NikolaevAS\Desktop\untitled18.kl(74)
74 new_xyz_ext3 = org_xyz_ext3 + 10
^ ERROR
Id must be defined before this use. Id: ORG_XYZ_EXT3
D:\NikolaevAS\Desktop\untitled18.kl(76)
76 SET_POS_TPE (open_id, position_no, new_xyz, status)
^ WARNING
Argument will be passed by value. Id: NEW_XYZ
===============Translation not successful===============
Build Failed: Error translating program: Code: 0xFFFFFFFF:
-
tried it according to yours, as you need to indicate that this code is for extended axes
-
Hello. need help. I want to move the extended axes of the robot. Has anyone encountered this problem before?
shown in code for 6 axes
PROGRAM TEST_KAREL
%ENVIRONMENT TPE
%ENVIRONMENT BYNAM
CONST
MAX_AXS = 9
JNT_POS = 9
XYZ_POS = 2
VAR
to_prog: STRING[27]
open_id: INTEGER
status: INTEGER
position_no: INTEGER
new_xyz: XYZWPREXT
org_xyz: XYZWPREXT
num_axs: INTEGER
BEGIN
to_prog = 'TEST_TP_1'
OPEN_TPE (to_prog, TPE_RWACC, TPE_RDREJ, open_id, status)
position_no = 3
org_xyz = GET_POS_TPE (open_id, position_no, posn_typ, num_axs, status)
FOR indx_axs= 1 TO num_axs DO
jp_new [indx_axs] = jp_org[indx_axs] + jp_off [indx_axs]
new_xyz.x = org_xyz.x +10
new_xyz.y = org_xyz.y + 10
new_xyz.z = org_xyz.z + 10
new_xyz.w = org_xyz.w + 10
new_xyz.p = org_xyz.p + 10
new_xyz.r = org_xyz.r + 10
SET_POS_TPE (open_id, position_no, new_xyz, status)
CLOSE_TPE (open_id, status)
END TEST_KAREL