KUKA get actual axis joint values and compare it to the desire ones

  • Hello to everyone,

    I have been working with KUKA robots for the past 6 months and i must admit that the forum has helped me a lot on a number of issues. Thank you for this initiative!

    The KUKA system software i have been working with is the 8.3 version.

    For our application, we have a number of subprograms (around 200) that will be executed in External mode and controlled through a PLC and we would like to check before each subprogram execution, that the robot is in a know and well defined position (preferably check the joint values; suggestions on position values are welcome) and more specifically in the last point of the previously executed subprogram.

    Our thinking for doing this is to create another subprogram, where the desired axis joint values (A1 to A6) will be manually entered as an input and the subprogram will make a comparison of current joint values with the desired ones (tolerance of +-0.2 degrees per axis). In case there is a deviation greater of 0.2 degrees in each one of the axis, a message will be displayed to the operator through the HMI.

    In attachment you may find the subprogram we have been working on.

    Is there another way to deal with this issue?

    How can we acquire the actual joint values from the robot that rests on a specific position and compare them with the desired ones?

    Any help or advise on how to resolve this issue is more than welcome and appreciated.

    Thank you in advance,


  • Something I wrote a long time ago, and kept around in my toolbox.

    Basically, you'll need to create your own 'home' positions of E6AXIS, and an E6AXIS variable that contains the +/- tolerance for each axis. Then send both variables to this function.

    If the difference between E6AXIS variable you send, and the robot's actual position, is less than the tolerance variable for all axes, the function will return a True. Otherwise, False.

  • Whoops -- that code won't run as-is. It depends on another function (E6AxisNull) that I keep in my standard library, although all it really does is receive an E6AXIS variable as a :OUT argument and sets all the values to 0.

    And the aAxisDelta variable was declared in a .DAT file for logging and VarCor reasons. Ditto for the ErrMsgPar variable.

    Setting an axis in the FI_aLimit variable to a negative value tells the function to unconditionally "pass" that axis's test -- basically, it's a "don't test this axis" flag.

    This code might be better -- it's more "portable":

  • As SkyeFire already showed, the best way is to make function.

    but... normally only HOME and HOME1-HOME5 are axis specific.

    most of points are Cartesian, specially if using ILF to create points.

    1) read pinned topic: READ FIRST...

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

    3) read 1 and 2

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