I am looking to create a program that moves through 4 points (p1,p2,p3,p4) then repeats the program but offset. I've tried to call a sub routine offsetting each individual point but this is very time consuming as the program needs to be repeated quite a bit and so offsetting every position takes too long. Is there a way to have the program reference a point and then offset this point instead? This might be possible through work objects or PDispSet but I'm not exactly sure and so would need some advice. If there was a way to have the program performing incremental moves (eg x+100 instead of moving to a defined location) instead of absolute so I would just need to move to the start of a part P1 and then have the program move for example y-100,x+100,y+100 and then for the second part move to P2 and then repeat the y-100, x+100, y+100 so only one position needs to be taught per part. I might have described this badly and so I can explain further if needed.
Program Loop
- David.mms
- Thread is marked as Resolved.
-
-
Couple of different ways to do it depending on what you're doing.
If you want to offset a program then look at instructions PDispSet, PDispOn and PDispOff.
If you want to create linear offsets from a certain positions (as your example suggests) then look at the function Offs.
MoveL Offs(P10, X,Y,Z).....
-
I have tried the function offset and it works but it would take a long time doing this for each position as there are quite a few parts. For PDispSet would I set this value to the position of P1 in the image for part 1 and then P2 for part 2 so the program is repeating but the DispSet is changing to the start of the part each time.
-
I did something similar, I'm welding a tailgate consisting of 9 panels that are the same. I created a loop that would weld the first panel and shift my wobj and then weld the 2nd and so forth until my loop reached 9.
The workobj shift data is stored in an array. It works very well. -
rough copy paste hack, didn't syntax check it so it might contain errors but it should give you an idea on how to do it with offs / pdispset.
if you rather use workobjects you can inject the same pose into your workobject...i.e. myWobj.oframe:=poseOffset;
Code
Display More%%% VERSION:1 LANGUAGE:ENGLISH %%% MODULE TESTOffset PERS pose poseOffset:=[[0,0,0],[1,0,0,0]]; PERS robtarget pStart:=[[0,0,635.62],[0.691962,0.066471,-0.020937,-0.718562],[-2,-1,1,0],[9E+009,9E+009,9E+009,9E+009,9E+009,9E+009]]; PERS robtarget pUp:=[[0,0,635.62],[0.691962,0.066471,-0.020937,-0.718562],[-2,-1,1,0],[9E+009,9E+009,9E+009,9E+009,9E+009,9E+009]]; PERS robtarget p10:=[[0,0,635.62],[0.691962,0.066471,-0.020937,-0.718562],[-2,-1,1,0],[9E+009,9E+009,9E+009,9E+009,9E+009,9E+009]]; PROC rTestOffs() pDispOff; MoveL pStart,v200,fine,tWeldGun; FOR i FROM 0 TO 3 DO poseOffset.trans.x:=i*500; PDispSet poseOffset; rWeld; ENDFOR pDispOff; MoveL pUp,v200,fine,tWeldGun; ENDPROC ENDPROC rWeld() ArcL\On,p10,v200,sm1,wd1,wv1,fine,tWeldGun; ArcL Offs(p10,100,0,0),v200,sm1,wd1,wv1,fine,tWeldGun; ArcL Offs(p10,100,200,0),v200,sm1,wd1,wv1,fine,tWeldGun; ArcL\Off,Offs(p10,0,200,0),v200,sm1,wd1,wv1,fine,tWeldGun; ENDPROC ENDMODULE
-
Using PDispSet seems to have solved the problem, thanks.
-
Working on a similar project, but it requires a search_1D since the fixture isnt 100% accurate. Cant get it to work properly since i need to use another pdispset for the search function inside the rweld routine. Any help would be much appreciated!
Edit:
I want to search the part for two dimensions to catch any offset in the placing of the part. Then go in and do four spotwelds and four linear welds. Then repeat the same thing on nine more parts. Not sure how to tell the robot to use a separate pdispset for the search while also using the pdsispset for the displacement. My brain is melting 😂
-
Retreaters the program from start and Solved it by using PdispAdd; after pdispset for the search. Works like intended
Create an account or sign in to comment
You need to be a member in order to leave a comment