Kuka Prog: How to pull current coordinate value? System variable?

  • Hello All,

    I am trying to pull a coordinate value out of the robot when I finish a move to a given position and assign that value. I have my IO setup and working and am passing values to the PLC successfully, but I need help with workvisual code to grab that value before assigning it.

    Say the robot is in some arbitrary frame that's taught (not world), and moves to a position using that frame reference; can I pull the equivalent world z value out of the robot? without changing frames and then back again before the next position move inside that frame? Thought of writing $POS_ACT to a temp variable and assigning the .Z component of that position variable but that would only give me the z value in that frame, not world.

    I have thought of a few ways to get the same result but that would require hardcoding the frame's z offset relative to world in my calculation and is not ideal for future usage of this program.

    Thanks for everyone's time. And if there was a better discussion page/category for this to be posted please let me know

  • AD
  • Thanks panic mode. Could you elaborate on the :xP179 of that command?

    I continued searching and have also found

    BASE_DATA[<frame number I am in>].Z

    -and subtract that from the current height in the frame to get world z.

    This accomplishes removing my hardcode of the base frame z value but I would like to understand your method more if you had the time.

    Or maybe the name of the documentation it would be found in? KRC portal is giving me difficulty in that. perhaps I am using the wrong keywords.

  • Your xP179 would be the Frame relative to your Base Coordinate System.

    Your are asking for relative to Wordl Coordinate System and this would be as panic mode explained

    K0: World Coordinate System

    K1: Base Coordinate System

    K2: Your Position relative to Base

    Your Base Coordinate System (as transformation matrix T01)

    xP179 would be going from K1 to K2 (as Transformation matrix T12)

    You want K2 relative to K0 (as Transformation matrix T02)

    T02 = T01 * T12 or T01:T12 (as panic mode explained)

  • to continue:

    I am a stupid guy and therefore I am making sketches to visualize my idea in a simple way:

    Textbased sketch:

    as mentioned before:

    T01: World to Base

    T12: Base to Point

    T02: World to Point



    0 ---------------------------------------> 2

    0 ----------------------------> 1 ------> 2

    Which ends up

    T02 = T01 * T12 or T01:T12 (as panic mode explained)

    (using vectors we could probably add, using Transformation matrices we have to multiply in sequence)

    In programming language we can use

    T02 = T01 * T12

    In KRL we have to use

    T02 = T01:T12

  • Explains the mathematical backround to frame arithmetic a little bit. : is the krl equivalent for frame multiplication.


  • Fubini, Mom, and Panic Mode,

    Thank you all for the insightful knowledge. This approach is new for me and you all have given me a new way to look at how I can take advantage of the kuka programming environment. I will be spending time moving forward learning how to use these methods and understand the complexity behind them.

    I will start with the transformation matrices and how that's implemented in the kuka IDE. Thank you for the explanation between T01, T12, and T02; that makes a lot more sense now.

    Down the rabbit hole!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now