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

Kuka Krc2 Program call

  • Hancock Concrete
  • November 11, 2020 at 7:56 PM
  • Thread is Unresolved
  • Hancock Concrete
    Trophies
    2
    Posts
    11
    • November 11, 2020 at 7:56 PM
    • #1

    Good afternoon, I have created multiple individual programs on our KRC2 210 to complete different tasks needed. I have looked through the Kuka manual multiple times on how to create a program to call the individual programs in sequence. I was taught and used this method on Fanuc and it was called call command. I'm not finding how to accomplish this in the KRL.

  • Fubini
    Reactions Received
    278
    Trophies
    9
    Posts
    1,893
    • November 11, 2020 at 8:24 PM
    • #2

    Create another program and simply call them:

    Def main

    Prog1(<parameters>)

    Prog2(...)

    Prog3(...)

    End

  • massula
    Reactions Received
    204
    Trophies
    8
    Posts
    1,431
    • November 11, 2020 at 8:28 PM
    • #3

    You just need to put the program name You want to call, followed by (). What is inside the parenthesis will depend if the subprogram works with arguments/parameters, or not.

    Code
    MyProgram ()

    The example below is an excerpt from Cell.src

    You will see program P00 being called some times, with different parameters, and some EXAMPLE programs, being called normally.

    Code
    LOOP
    
    P00 (#EXT_PGNO,#PGNO_GET,DMY[],0 )
    
    SWITCH  PGNO ; Select with Programnumber
    
    CASE 1
    P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request
    EXAMPLE1 ( ) ; Call User-Program
    
    CASE 2
    P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request
    EXAMPLE2 ( ) ; Call User-Program
    
    CASE 3
    P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request
    EXAMPLE3 ( ) ; Call User-Program
    
    DEFAULT
    
    P00 (#EXT_PGNO,#PGNO_FAULT,DMY[],0 )
    
    ENDSWITCH
    
    ENDLOOP
    
    END
    Display More
  • Online
    SkyeFire
    Reactions Received
    1,052
    Trophies
    12
    Posts
    9,431
    • November 11, 2020 at 8:59 PM
    • #4

    KRL has no equivalent to Fanuc TP-Language's CALL command. Instead, calls are implicit.

    Generally, if you have created a module call FOO, you can call it from any other program by simply coding FOO() -- the () are required. If FOO accepts arguments, you would need to fill in the arguments you are passing inside the (), separated by commas: FOO(variable1,variable2)

    It becomes slightly more complicated if you have multiple subroutines and/or functions defined inside a single module .SRC file. For KRL modules, the "top" routine has the same name as the module itself, so FOO.SRC would begin with DEF FOO(). This "top" routine is global by default, and can be called from anywhere.

    If FOO.SRC contains other DEFs or DEFFCTs, however, those subroutines (DEFs) and functions (DEFFCTs) can only be called by routines inside of FOO.SRC (their "scope" is to the module), unless the DEF/DEFFCT line includes the keyword GLOBAL. If any routine/function is declared using the GLOBAL keyword, it becomes available to be called from anywhere in the robot. This can be convenient, but also requires you to ensure that no two Global routines ever have the same name.

  • Hancock Concrete
    Trophies
    2
    Posts
    11
    • November 11, 2020 at 9:13 PM
    • #5

    Thank you very much for the replies. That is simple enough. I didn't know if I needed to stop the advance run at the end of each program to stop it from jumping to the next before one is complete.


    Each program runs great on their own, and they all go to the home position when completed, so I will not need arguments at all. I simply just want it to complete one program after the next in order.

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

Similar Threads

  • KRC2 File exceeded maximum size

    • Alex_Moser564
    • August 30, 2017 at 11:58 PM
    • KUKA Robot Forum
  • What does the "SYNC( )" command do?

    • mbull
    • September 15, 2017 at 6:38 AM
    • KUKA Robot Forum
  • RobotSensorInterface 3.3 with OfficeLite 8.3, does it work?

    • Crystal Dragon
    • August 28, 2019 at 12:26 PM
    • KUKA simulation software
  • LOAD DETERMINATION AND KUKA.LOAD IN KUKA ROBOT

    • Counterspeller
    • May 14, 2020 at 1:52 PM
    • KUKA Robot Forum
  • Archive in an old krc2

    • robotecnik
    • March 12, 2019 at 5:26 PM
    • KUKA Robot Forum
  • How to watch subprogram execution

    • RobotsRock
    • June 28, 2018 at 9:40 PM
    • KUKA Robot Forum
  • Position corruption in KUKA PalletTech

    • SkyeFire
    • April 27, 2018 at 10:59 PM
    • KUKA Robot Forum
  • Calling subroutines

    • maxwell
    • January 11, 2017 at 11:00 PM
    • KUKA Robot Forum
  • help for cwrite function

    • Danilo
    • November 16, 2016 at 11:35 AM
    • KUKA Robot Forum
  • Help upgrading KR350 for Virtual Reality Ride!

    • novoreality
    • October 6, 2016 at 3:00 PM
    • KUKA Robot Forum

Tags

  • Program Multiple
  • Call
  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