Bas Function

  • Hello everyone,


    I am new to Kuka robots (but have worked with Fanuc and ABB a lot) and I am trying to understand the BAS function (on KRC4). I know i can use it for TOOL and BASE setting, but I saw it was used for other things also. So my question is : What are all the other things BAS function can be used for ? And what is exaclty the purpose of this function ? I've got trough the programming manuals I have but haven't found any mention of it, any idea where else I could find the info ?


    Thanks for your help!

  • Place your Ad here!
  • BAS isn't terribly special -- it's just some KRL code written to assist the "easy mode" menu-driven teach pendant programming. If you open it in a text editor, as Panic said, it's guts are completely exposed. Long story short, it's an easy-mode method for setting your active Tool, Base, Velocity, Accel, and other motion parameters on the fly. If you create a point on the pendant, a call to BAS gets inserted into the motion Fold, with various variable arguments set by whatever you type into the various menu option boxes.

  • Do I understand correctly that if I do not make a call to the external program BAS.SRC, the inline forms in my program will not work and I will not be able to create new ones.


    What are the risks if I do not include the row:

    Code
    EXT BAS (BAS_COMMAND :IN,REAL :IN )
    BAS (#INITMOV,0 )

    Tools, Bases, Speeds, Accelerations can remain unchanged from the previous program that was run before?

  • Do I understand correctly that if I do not make a call to the external program BAS.SRC, the inline forms in my program will not work and I will not be able to create new ones.


    What are the risks if I do not include the row:

    Code
    EXT BAS (BAS_COMMAND :IN,REAL :IN )
    BAS (#INITMOV,0 )

    Tools, Bases, Speeds, Accelerations can remain unchanged from the previous program that was run before?

    If you are experienced , it's no need to use BAS(#INITMOVE,0).For example:

  • The EXT BAS line is a holdover from waay back in KSS 2.x, or maybe earlier, where it was necessary to use the EXT command to create a callable connection between one module and another. It hasn't been necessary for quite a few versions now.


    The BAS (#INITMOV) call is just boilerplate to set the initial motion settings. It sets all the motion parameters to their default values, so you can immediately use a PTP motion to achieve BCO, after which all PTP, LIN, and other motions will be available.


    So, the INITMOV is not necessary, but something to set the motion parameters must be performed before executing any motion commands. This can be done by calling BAS with different individual options, as Andre showed, or by directly setting each parameter individually in your own executable code. BAS is just provided to make things much easier.

  • Hi. I´m new too with KUKA robots (i have worked with ABB) and i'm just started learn krl language with WorkVisual but don't have access to a KUKA robot. Could you provide me the BAS.src file and other filesn that exist in a real controller? Thanks in advance.

  • I have a question regarding calling the BAS function. Would calling the function in the middle of a running program, more specifically between motion commands cause the advance pointer to stop?


    Bellow is an example of a motion with tool switching, assuming all motion parameters have been prepared somewhere above.

    Code
    BAS(#BASE, 1)
    BAS(#TOOL, 1)
    $advance = 3
    
    PTP Pos1 
    PTP Pos2 C_DIS
    BAS(#TOOL, 2)
    PTP Pos3 C_DIS

    Would approximation work in this case? And if it does, what would happen if the advance pointer changes the tool before the main pointer starts the first motion, would it still go to Pos1 with tool1 or would it use tool2?

  • It will use tool 1, as wished.

    Approximation depends on changing load data or not (AFAIK).

    The tools have different transformation/TCP, but the change in Load data between them is not too big it think ~10% for inertia.


    Do you maybe know if the call of "BAS" itself would cause a advance run stop with the "IF" statement that are inside the function? I am having some problems where sometimes the approximation works and sometimes it stops at the start of the approximation and then again at the end before continuing motion. i have moved all functions and outputs to Trigger commands but still something is stopping the advance run.

  • It will use tool 1, as wished.

    Would this also apply to frame stored in a variable?

    Does the 1. Lin use 500 as an offset even if the advance pointer already went over the second assignment of "Pos1.BaseOff"

  • Do you maybe know if the call of "BAS" itself would cause a advance run stop with the "IF" statement that are inside the function?

    No. An if does not trigger an advance run stop. Its the evaluation condition inside the if that triggers the stop. If for example an input or output needs avaluation. The BAS functions apart from BAS(#INITMOV) do not trigger advance run stops apart the before mentioned load change in case of absolute accuracy. Here it is irrelevant whether ist 10% or 0.001%. A change is a change.


    So ypur problem must be hidden elsewhere. Did you check with $STOPNOAPROX?


    Would this also apply to frame stored in a variable?

    Sure. why would it not be. All thesese expressions are evaluted in advance run in the same order they are written in the program.


    Does the 1. Lin use 500 as an offset even if the advance pointer already went over the second assignment of "Pos1.BaseOff"

    Yes it uses 500. All the expressions are evaluated in advance run. In the given sequence order by the program. The Advance run can not be behind the First Lin when evaluating

    Code
    Pos1.BaseOff.Z = 500


    Fubini

  • I have a question regarding calling the BAS function. Would calling the function in the middle of a running program, more specifically between motion commands cause the advance pointer to stop?

    Depends on the parameters. Calling BAS(#INITMOV...) will break the ARP. But if you examine the inside of any motion Inline Form, you'll see that they set Base, Tool, Approximation, and Velocity data (among others) by calling BAS with other parameters without breaking the ARP.


    Different subroutines inside the BAS module have different effects on the ARP. You can count on the ones used by the ILFs to not break the ARP.

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

Advertising from our partners