hello all, i'm trying to further my knowledge of robotics programming and i am not sure where i can edit lines of cose in fanuc. but the restrictions of these loops isn't letting me quite get to where i want.
the code:
1: UTOOL_NUM = 8
2: UFRAME_NUM = 6
3:
4:
5: FOR R[1]= 0 TO 4 (so it repeats 4 times)
6:
7: PR[3] = PR[1]
8: PR[4] = PR[2]
9: PR[3,2]=PR[1,2]-80-R[1] (the 80 is representing the increment i need it to do -y 80mm, but its automatically negating the register when i want it to multiply it just changes both)
10: PR[4,2]=PR[2,2]-80-R[1]
11:
12: FOR R[2]= 0 TO 4
13:
14: PR[3,1]=PR[1,1]+100+R[1] (again i want positive 100mm in X then to times it by R)
15: PR[4,1]=PR[2,1]+100+R[1]
16:
17:
18:L PR[1] 1000mm/sec FINE
19:L PR[2] 30 mm/sec FINE
20:
21: ENDFOR
22: ENDFOR
can anyone help me figure out a different way of doing this or if i can override the changing signs so they don't both equal +/- and i can * [R] 1 or 2 so then my loop will work
if anyone is interested i got a grid plate at 0,0,0 and then im wanting to add on 100mm in x 4 times then 80mm once and 4 x 100mm and so on... to cover the grid