1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. KUKA Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Bas Function

  • MissM
  • January 19, 2017 at 12:05 AM
  • Thread is Resolved
  • MissM
    Reactions Received
    1
    Trophies
    3
    Posts
    9
    • January 19, 2017 at 12:05 AM
    • #1

    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!

  • Online
    panic mode
    Reactions Received
    1,280
    Trophies
    11
    Posts
    13,085
    • January 19, 2017 at 4:21 AM
    • #2

    BAS.SRC is just a text file, it can be read as is...

    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

  • Online
    SkyeFire
    Reactions Received
    1,052
    Trophies
    12
    Posts
    9,429
    • January 19, 2017 at 4:58 PM
    • #3

    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.

  • Koppel
    Reactions Received
    19
    Trophies
    3
    Posts
    132
    • December 31, 2019 at 4:20 PM
    • #4

    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?

  • AndrewWang
    Reactions Received
    6
    Trophies
    3
    Posts
    63
    • January 2, 2020 at 2:30 AM
    • #5
    Quote from Koppel

    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:

    Code
    FDAT_ACT=FDEFAULT
    FDAT_ACT.TOOL_NO=1          
    FDAT_ACT.TOOL_NO=1          
    FDAT_ACT.IPO_FRAME=#BASE  
    BAS(#FRAMES)
    PDAT_ACT=PDEFAULT
    PDAT_ACT.VEL=50          
    PDAT_ACT.ACC=20            
    PDAT_ACT.APO_DIST=5
    PDAT_ACT.APO_MODE=#CDIS
    BAS(#PTP_DAT)
    PTP {X 100 ,Y -100 ,Z 810 ,A 0 ,B -20 ,C 75} C_DIS
    Display More
  • Online
    SkyeFire
    Reactions Received
    1,052
    Trophies
    12
    Posts
    9,429
    • January 2, 2020 at 8:34 PM
    • #6

    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.

  • gar_car
    Trophies
    3
    Posts
    5
    • May 1, 2020 at 6:06 PM
    • #7

    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.

  • Online
    panic mode
    Reactions Received
    1,280
    Trophies
    11
    Posts
    13,085
    • May 1, 2020 at 6:36 PM
    • #8

    enjoy

    Files

    BaseProject.zip 1.6 MB – 359 Downloads

    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

  • gar_car
    Trophies
    3
    Posts
    5
    • May 1, 2020 at 6:59 PM
    • #9

    Thanks man!

  • Online
    panic mode
    Reactions Received
    1,280
    Trophies
    11
    Posts
    13,085
    • May 1, 2020 at 7:05 PM
    • #10

    hey did you just assume my gender? :thumbs_up::grinning_face_with_smiling_eyes:

    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

  • Timo P
    Trophies
    2
    Posts
    6
    • January 7, 2022 at 9:31 AM
    • #11

    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?

  • hermann
    Reactions Received
    407
    Trophies
    9
    Posts
    2,612
    • January 7, 2022 at 9:35 AM
    • #12

    It will use tool 1, as wished.

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

  • Fubini
    Reactions Received
    278
    Trophies
    9
    Posts
    1,889
    • January 7, 2022 at 9:51 AM
    • #13
    Quote from hermann

    It will use tool 1, as wished.

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

    Also depends on absolute accuracy, Load changes are no problem without absolute accuracy.

  • Timo P
    Trophies
    2
    Posts
    6
    • January 7, 2022 at 10:11 AM
    • #14
    Quote from hermann

    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.

  • Timo P
    Trophies
    2
    Posts
    6
    • January 7, 2022 at 10:47 AM
    • #15
    Quote from hermann

    It will use tool 1, as wished.

    Would this also apply to frame stored in a variable?

    Code
    $Advance = 3
    
    ;Go to Pos1 with offset 500
    Pos1.BaseOff = $NULLFRAME
    Pos1.BaseOff.Z = 500
    LIN Pos1.BaseOff : Pos1
    
    
    ;Go to Pos1 with offset 0
    Pos1.BaseOff = $NULLFRAME
    LIN Pos1.BaseOff : Pos1
    Display More

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

  • Fubini
    Reactions Received
    278
    Trophies
    9
    Posts
    1,889
    • January 7, 2022 at 1:03 PM
    • #16
    Quote from Timo P

    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?

    Quote from Timo P

    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.

    Quote from Timo P

    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

  • Online
    SkyeFire
    Reactions Received
    1,052
    Trophies
    12
    Posts
    9,429
    • January 7, 2022 at 4:09 PM
    • #17
    Quote from Timo P

    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.

  • jaiiyer
    Reactions Received
    15
    Trophies
    2
    Posts
    91
    • February 24, 2025 at 10:54 PM
    • #18
    Quote from panic mode

    BAS.SRC is just a text file, it can be read as is...

    I admire you panic mode

  • Online
    panic mode
    Reactions Received
    1,280
    Trophies
    11
    Posts
    13,085
    • February 25, 2025 at 12:38 AM
    • #19

    :smiling_face_with_smiling_eyes:

    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

  • RoboTux
    Trophies
    3
    Posts
    15
    • June 19, 2025 at 3:49 PM
    • New
    • #20
    Quote from hermann

    It will use tool 1, as wished.

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

    Oh my God! The load data! I don't think this touch the approx. I read all manual, read the BAS, but here is the solution. Big thanks!

    ABB Robot -Programming - Service - Maintenance - Training

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download