Hi i am a new bee on KUKA. (Programming Fanuc)
On a KUKA:
what is the syntax of POS variables?
i want to do something like this: (offset programming)
TEMP_POS1 = TEMP_POS1 + TEMP_POS
PLIN TEMP_POS1
(like on Fanuc: PR1= PR1+PR2)
Hi i am a new bee on KUKA. (Programming Fanuc)
On a KUKA:
what is the syntax of POS variables?
i want to do something like this: (offset programming)
TEMP_POS1 = TEMP_POS1 + TEMP_POS
PLIN TEMP_POS1
(like on Fanuc: PR1= PR1+PR2)
The pluse is called colon operator in KUKA
So your code should look something like this:
DECL POS FRAME1
DECL POS FRAME2
DECL POS RESULT_FRAME2
FRAME1.X = ...
FRAME1.Y = ...
...
FRAME2.X = ...
FRAME2.Y = ...
...
RESULT_FRAME = FRAME1:FRAME2
LIN RESULT_FRAME
; or directly
LIN FRAME1:FRAME2
Display More
Fubini
POS variables (and related variables like FRAME, E3POS, E6POS, and others) are what are called Structure variables, analogous to a Dictionary in Python.
Any Structure (or STRUC) variable is a variable that contains other variables, of various types. In general, KRL does not support performing math operations directly on a STRUC variable as a whole. FRAME and the variables related to it are partial exceptions, since KRL provides the Geometric Operator (as Fubini describes) and the INV_POS function to perform matrix algebra on these variables.
FRAMEs are STRUCs that contain 6 REAL values {X 0.0,Y 0.0,Z 0.0,A 0.0,B 0.0,C 0.0}
POS is a FRAME that adds two additional INT values: S and T. These are disambiguation values that control which Joint-space solution is used to achieve the XYZABC position, in situations where it's physically possible for the robot to reach that position with multiple different Joint combinations.
E3POS and E6POS are POS variables that have values added for External axes: E1, E2, etc.
The default position variable used by KUKA robots is E6POS, even on robots that have no External axes (in this case, all the Ex values are simply left at 0.0).
Except when using Geometric Operator or INV_POS, the only way to perform operations on a STRUC variable is to operate on elements of the STRUC individually.
So, if you simply want to add 100mm to the X value of a POS variable:
MyPosVariable.X = MyPosVariable.X + 100
This works for simply operations on X, Y, and Z. However, given the complexities of Euler rotation definitions, operating on A, B, or C is not that simple. Hence the existence of the GO and INV_POS.
Only literals can be used inside the {} of a STRUC -- no variables or operations. So these are illegal:
MyPosVariable = {X SomeRealVariable, Y 0.0, Z 0.0, A 0.0, B 0.0, C 0.0}
MyPosVariable = {X (2*5), Y 0.0, Z 0.0, A 0.0, B 0.0, C 0.0}
don't know much about Python but Dictionary should be a collection of unique values. this is used when one needs a list with no duplicates. length of Dictionary can change and structure cannot do that (structures of different number of elements are different types). probably named tuple would be a better analogue...
probably named tuple would be a better analogue
Hm... on examination, I agree.