BAS

  • [Edit Irrer Polterer: Thema wurde geteilt - macht mehr Sinn]


    Hallo zusammen,
    wer kann mir über Funktion BAS() UP genau erklären?
    Im Voraus vielen Dank

  • AD

  • Hallo zusammen,
    wer kann mir über Funktion BAS() UP genau erklären?
    Im Voraus vielen Dank


    Es handelt sich hier um eine Standard-Bibliothek, die zum KRL-Source gehört und im Verzeichnis R1/System zu finden ist. Der Aufruf geschieht durch BAS (COMMAND,REAL_PAR). Das Argument COMMAND ist ein ENUM-Wert vom Typ BAS_COMMAND und enthält einen Verweis auf den Befehl, den man ausführen möchte. Das Argument REL_PAR ist ein Wert vom Typ REAL und enthält den Wert, den man an die unter COMMAND übergebene Funktion übergeben möchte.


    Beispiele:
    BAS(#TOOL,1) setzt das aktuelle Tool auf TOOL_DATA[1]. Dabei werden im Gegensatz zu $TOOL=TOOL_DATA[1] auch die Lastdaten mit eingerechnet.
    BAS(#VEL_CP, 0.3) setzt die Geschwindigkeit für Linearbewegungen auf 0,3m/s.


    Wenn du die Bas öffnest und auch die enthaltenden Folds, sollte eigentlich vieles klarer werden. Eine reine BAS-Doku ist mir nicht bekannt.

    Greetings, Irrer Polterer!

    Wie poste ich falsch? Nachdem ich die Suche und die FAQ erfolgreich ignoriert habe, erstelle ich das gleiche Thema in mehreren Unterforen, benutze einen sehr kreativen Titel wie "Hilfe", am Besten noch mit mehreren Ausrufezeichen, und veröffentliche einen so eindeutigen Text, dass sich jeder etwas Anderes darunter vorstellt.


    Life is a beta version. Full of bugs and no Manual.

  • Hi everybody,


    I am currently developing a program with a Kuka Robot, in which I constantly change tools with these two commands:


    $TOOL = TOOL_DATA[5]

    BAS(#TOOL,5)

    then I make movement with PTP_REL, however the movement is not continuous like when you move the robot from one PTP to another. I have noticed that a PTP is defined with BAS(#PTP_PARAMS,100), and there the motion conditions are defined. But since it is not a PTP but PTP_REL, I don't know how I can define the motion conditions to always have a continuous motion and not a step-by-step one.


    Greetings and thank you very much for your answers

  • There is no difference in defining the parameters of ptp and ptp_rel. Your problem has another cause. How did you program blending for your ptp? Probably showing your program would help.


    Fubini

  • Hi,


    first I perform a movement to a defined point, and then I make a loop to generate a sequence of points. And I can see that the robot moves step by step with a pause at each point, I don't know if the relative movement affects or if the $advance has something to do with it too. I appreciate your help.


    Help.txt.

  • $VEL_AXIS[1] = 100

    $VEL_AXIS[2] = 100

    $VEL_AXIS[3] = 100

    $VEL_AXIS[4] = 100

    $VEL_AXIS[5] = 100

    $VEL_AXIS[6] = 100


    $ACC_AXIS[1] = 100

    $ACC_AXIS[2] = 100

    $ACC_AXIS[3] = 100

    $ACC_AXIS[4] = 100

    $ACC_AXIS[5] = 100

    $ACC_AXIS[6] = 100



    $VEL.ORI1 = 100

    $VEL.ORI2 = 100

    $ACC.CP = 1.0

    $ACC.ORI1 = 100

    $ACC.ORI2 = 100



    $APO.CDIS=30

    $APO.CPTP=30



    ;FOLD PTP P1 CONT Vel=100 % PDAT1 Tool[5] Base[0];%{PE}%R 8.3.42,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P1, 3:C_DIS, 5:100, 7:PDAT1

    $BWDSTART=FALSE

    PDAT_ACT=PPDAT1

    FDAT_ACT=FP1

    BAS(#PTP_PARAMS,100)

    PTP XP1 C_PTP

    ;ENDFOLD


    $ADVANCE=1


    For i=1 to N_Punkte step 1

    Point1 = {x 0,y 0,z 0,a 0,b 0,c 0}

    Point1.A= R_A/Num_Points

    Point1.B= R_B/Num_Points

    Point1.C=R_C/Num_Points

    PTP_REL Point1 C_DIS #BASE

    ENDFOR


    $TOOL = TOOL_DATA[6]

    BAS(#TOOL,6)


    For i=1 to N_Punkte step 1

    Point1 = {x 0,y 0,z 0,a 0,b 0,c 0}

    Point1.x= Trans_X/Num_Points

    Point1.y= Trans_Y/Num_Points

    Point1.z= Trans_Z/Num_Points

    PTP_REL Point1 C_DIS #BASE

    ENDFOR

    Edited once, last by Tefysv ().

  • $ADVANCE=1 means, the programmpointer(?) only runs one movement line ahead, so I think it's not possible to do a continuous movment.

    Den Roboter "in seinem Lauf hält weder Ochs noch Esel auf!"

  • Thank you for your answer,


    I was suspicious of the $Advance command, but I wasn't sure, since I understand that $Advance=1 is necessary to perform all the calculations. I'll prove it with 3. Thank you very much.

  • ...

    since I understand that $Advance=1 is necessary to perform all the calculations....

    The robot will never change the sequence of the statements. You have to take care of using triggers and Interrupts that change variables. In that case the calculations can be done too late.

  • Thank you for your answer,


    I was suspicious of the $Advance command, but I wasn't sure, since I understand that $Advance=1 is necessary to perform all the calculations. I'll prove it with 3. Thank you very much.

    Actually $ADVANCE has nothing to do with KRC's ability to perform calculations.

    It tells how many (known) points are to be collected so motion planner has data to plan the motions if motions are to be blended.


    Any non-zero value will allow approximated motion, including $ADVANCE=1 but... there may be other things in program that advance run pointer pause...


    But i have few questions:

    Why compute same thing over and over in a loop?

    Why bother to interpolate with N_Punkte steps at all?

    Why interpolate and blend instead of moving in one motion?

    If you plan to stop at any of those steps, why not use an interrupt?


    Btw. i tried my version of this example in a simulator (used $STOPNOAPPROX=TRUE) and robot moves smoothly without stopping.

  • Any non-zero value will allow approximated motion, including $ADVANCE=1 but... there may be other things in program that advance run pointer pause...


    But i have few questions:......

    Hi,


    thanks for the clarification of $Advance


    what I'm trying to move is within functions, actually the program is like this. I publish here in summary what I try to do and I don't know if the jump to the function and the mix with For can be the problem now that I understand that $Advance and Bas() are not the cause.


    I appreciate your questions, and here I explain what I can understand:


    1. I calculate in a loop over and over again because if I send the robot to rotate in tool 250 degrees around Z. It arrives at the end point rotated 250 degrees but does not maintain the orientation. And by doing it in small steps it does.


    2. As you see in the code I need both tool and base movements. For example move the robot in X together with rotation in B relative to Base and rotate with Tool in Z. And I can't find any other way than to combine both movements in a step-by-step loop.


    3. I think the previous two points answer this. I don't really plan on stopping between these points, it's a sequence.


    I apologize if something doesn't make sense, I appreciate your answers.


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