Kombination von TOOL- und BASE-Bewegungen - RPY_TO_MAT - KUE-WEG

  • Hi, I have some questions and I appreciate all your help.


    I need to make with the Robot combined movements and turns between the TOOL and BASE coordinate systems. I must always move in the x-direction with respect to the base, but turn around the Tool. The tool has 4 tools inside that are not in the center of Axis 6, so a constant tool change is required during programming. To carry out these movements, I calculated the rotations and translations based on multiplication of Homogeneous transformation matrices in Matlab and RoboDK and it works there, but I have not been able to implement this in KRL


    I have attached some of the functions that I implemented but in the end I only get zero matrices in KUKA and I cannot debug them. Is this possible? (I know the program still has errors).

    Is there any other way I can make a combined move? Movement in X and rotation in Y with respect to the base and also rotation with respect to Tool Z?


    Thank you in advance for your help and information.


  • Schritt für Schritt zum Roboterprofi!
  • Code
    Decl frame toolshift
    Decl frame baseshift
    
    Toolshift=$nullframe
    Baseshift=$nullframe
    Toolshift.A=45
    Baseshift.x=10
    Baseshift.B=15
    Lin baseshift: xtarget : toolshift

    Xtarget ist the Position shifted for baseshift and toolshift.

  • For your functions: depending on KUKAs system software it's not possible to pass arrays as OUT-parameters anymore since a decade or so (KRC4), but this should be indicated by an error message. If so, you might redesign the code by using own structures like

    Code
    GLOBAL STRUC VEC3 REAL e1,REAL e2,REAL e3
    GLOBAL STRUC MATR VEC3 x,VEC3 y,VEC3 z

    these can be used as OUT anyway:

    Code
    DEF  RPY_TO_MAT (T :OUT,A :IN,B :IN,C :IN )
    
    DECL MATR T
    REAL A,B,C
    ....

    Michael

  • Why hassling about those functions when the whole thing can be done in one line?

    I agree, of course.

    It was just a remark in case it's needed, these kind of functions appear in many programs since 20 years or more, and I use them for my own projects up to now.


    Michael

  • For your functions: depending on KUKAs system software it's not possible to pass arrays as OUT-parameters anymore since a decade or so (KRC4),

    I am curious to find more about this. I am using KUKA for many years and don't recall passing array as OUT parameter to be an issue (KS 8.2, 8.3, 8.5). in fact this is the way to pass array as a parameter. Only CHAR arrays allow IN transfer as well but ... that is because KRL does not have strings.

  • Well - maybe I'm confusing something, don't memorize details...

    I remember a point in the past (in the KRC4 early days) when something was changed in the way how to pass arrays in KRL. That was the moment when these kind of routines didn't work anymore (which did well in KRC2) and I had to rewrite it.


    Michael

Erstelle ein Benutzerkonto oder melde dich an um zu kommentieren

Du musst ein Benutzerkonto haben um einen Kommentar hinterlassen zu können

Benutzerkonto erstellen
Neues Benutzerkonto für unsere Community erstellen. Geht einfach!
Neues Benutzerkonto erstellen
Anmelden
Du hast bereits ein Benutzerkonto? Melde dich hier an.
Jetzt anmelden