# How to define point in kuka

• Hi guys i have problem with definig point in kuka sim. I'm begginer ang i want to define a point in space

Points P1,2,3,4,5 I have defined by using position of the TCP, but when I want to create random point using only parameters x,y,z i cant and program crashes

How i can create points in kuka?

• What did you try? "Program crashed" -- with what error message?

Your screenshot shows SRC code, not DAT values. Are you trying to hard-code values in the executable, or create persistent point data?

• I trie to hard-code values in the executable

• For a hard-coded point, KRL motion is as simple as:

PTP {X 100,Y 200,Z 300,A 90,B 0,C 90}

for a Point-To-Point (joint-style) motion to those cartesian coordinates. For a Linear motion, PTP can be replaced with LIN.

An E6POS type structure variable contains space for XYZABC, S&T for disambiguation, and E1-E9 for external axes.

An E6AXIS is used for a joint-defined point:

PTP {A1 0,A2 -90,A3 90,A4 0,A5 0,A6 0}

The structure {} requires only one valid member variable. So

PTP {X 100} is entirely valid. If executed, the TCP will move to 100mm in the active Base, and remain at the same values as the start point for all other axes.

Of course, there are many other elements that interact with motion commands. \$BASE, \$TOOL, velocity and acceleration settings, etc.

This is why most programmers simply create points on the pendant, which gives them a fill-in-the-blanks approach which handles most of these things for them painlessly.

• The structure {} requires only one valid member variable

This is not completely correct.

First you have to initialze the aggregate like {x 0, y 0, z 0, a 0, b 0,c 0}

After that SkyFire's suggestions applies and you could write {z 400}

• First you have to initialze the aggregate like {x 0, y 0, z 0, a 0, b 0,c 0}

Are you sure about this. In motion commands you can just do it just as Skyfire explained. In case you are using variables then you have to initialize them. important difference i think

Every problem has a solution, that isn't the problem. The problem is the solution.

• motions do not require entire aggregate. the exception is first motion in a program (doing BCO).

so this is fine as well:

Code
``````DECL AXIS temp
;  ....
PTP \$AXIS_ACT ; BCO
;  ....
temp = {A1 45} ; incomplete initialization
PTP temp  ; still ok``````

2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

• In panic mode's example there is actually explained what I wanted to say.

IN the first movement command all values were set

PTP \$AXIS_ACT

after this line you can set only the value you want to change

PTP {A1 45}

For a LIN movement you would need to set all values first

LIN {x 1000, y 200, z 1200, a 0, b 0,c 0}

If you just want to move with constant orientation you would write

LIN {x 1050, y 220, z 1235}