Hello everyone, I am new to programming robots, I have taken the Fanuc Handlingtool Class with Fanuc. But I am looking for more info on how I can take 2 group inputs from a PLC and offset them to get rows and columns. I am testing with with a simple 2x4 grid and my 1 position(1st position) is coming in as 0 for example if the PLC tests me to drop in Column 1 and Row 2 I would get a GI of GI1 = 0 and GI2=1 and I was hoping to do simple math to just add a X offset and Y offset but it doesn't seem to be working. Any advise is welcomed. Thank you
Using 2 GI to get Rows and Colunms
-
SLick57 -
February 27, 2024 at 2:29 PM -
Thread is Unresolved
-
-
massula
February 27, 2024 at 3:19 PM Approved the thread. -
"Zero out your offset register, in Linear"
PR[10:offset] = LPOS - LPOS
"Now create your offset"
PR[10,1:offset] = GI[1] * R[... X spacing]
PR[10,2:offset] = GI[2] * R[... Y spacing]
"apply it to your point"
L P[1:set part] 100mm/sec fine, Offset PR[10:offset]
Make sure you apply to the above coming in and the above going out also.
Fun with math....
-
Hi,
Here's an example:
Let's just for simplicity assume that all cells are equally spaced in X (Row) and Y (Column) direction, and let's say that this spacing is 100mm.
Start by teaching the reference position in the first cell (Row 1, Col 1).
Now, let one GI represent the Row number, and the other GI represent the Col number.Code
Display More(Pseudo code) !Cell spacing R[42] = 100 !Calculate the offset needed !in X PR[100,1]=((GI[1:Row #]-1)*100) !in Y PR[100,2]=((GI[2:Col #]-1)*100) !Move to the specified cell L PR[42:Ref. Cell] 50mm/s FINE Offset,PR[100:Offset]
Try to set it up similar to my example to avoid having to work with negative numbers.
If either GI is "1", then no offset should be added in that direction, hence why you subtract 1 from their value before multiplying with the cell spacing.
-
Thank you for the help. I was able to get it to work.