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. ABB 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

Program Structure Good Practices

  • jyimg
  • August 14, 2023 at 9:39 PM
  • Thread is Resolved
  • jyimg
    Reactions Received
    1
    Trophies
    2
    Posts
    17
    • August 14, 2023 at 9:39 PM
    • #1

    Hello,

    Getting a few ABB robots (IRC5 controllers) so I'm trying to figure out how it all works. Reading through the RAPID manuals, it sorta makes sense, but wondering if I'm approaching this properly. The only internal example projects I have access to display some ~50 procedures inside one main.

    Here's a pic of some sample modules I created:

    6crC3Vh.png

    Basically I've separated global procedures in "grouped" modules. Does this make sense for ABB or does it fall flat on a real teach pendant? If this seems okay, should some of these be system modules (namely the handshakes/EOAT stuff)?

  • Lemster68 August 14, 2023 at 9:46 PM

    Approved the thread.
  • Lemster68
    Reactions Received
    295
    Trophies
    9
    Posts
    2,454
    Blog Articles
    7
    • August 14, 2023 at 9:51 PM
    • #2

    The one downside that I have experienced to having many modules with few routines is that to view other routines I have to go back to module view, then select view routines for the other selected modules. Kind of adds that extra step when trying to follow/examine the code. I am not saying to lump everything together, just something to keep in mind.

    System modules are OK for handshakes, like you might combine EOAT and Handshakes, for the reason above.

  • JMF
    Reactions Received
    9
    Posts
    55
    • August 15, 2023 at 9:04 AM
    • #3

    What I've done is to declare Global items inside System Modules and they are always active on the system. I do add "NOVIEW' declaration to the ones that I do not wish the operators should be able to modify. Then my Part modules is separately loaded as required from the HDD and inside them is all data required for the use in that Module. At the end of the day if you can keep your modules and routines nice and tidy and know what is going on, it should be good.

  • jyimg
    Reactions Received
    1
    Trophies
    2
    Posts
    17
    • August 15, 2023 at 3:20 PM
    • #4
    Quote from Lemster68

    The one downside that I have experienced to having many modules with few routines is that to view other routines I have to go back to module view, then select view routines for the other selected modules. Kind of adds that extra step when trying to follow/examine the code.

    Ahh, ran the flex pendant sim and I see what you mean. Suppose I can make my groups more loose. Thanks!

    Quote from JMF

    Then my Part modules is separately loaded as required from the HDD and inside them is all data required for the use in that Module.

    Is loading/unloading modules like this common practice or is it just used when you've hit your memory limit? Seems a little extra for small-ish programs?

  • ColoradoTaco
    Reactions Received
    16
    Trophies
    3
    Posts
    103
    • August 18, 2023 at 12:32 AM
    • #5

    Here's the structure I typically use, unless there is a process or production sequence that requires more complicated decisions...

    Code
    T_ROB1
        Program Modules
            >MainModule
                (/) main 
            >MatlHandling
                (/) loadparts
                (/) unloadparts
            >Service
                (/) MoveToHome
                (/) MoveToService
        System Modules
            >ToolControl
                (/) GripperOpen
                (/) GripperClose
            >ProductionData
                (/) CalculateOffsets
                (/) InitializeData
    Display More

    Your MainModule (and MAIN routine) should generally consist of Proc Calls which set initial conditions and then send you into your production loop, and NOTHING ELSE. I shoot for 20 lines or less.

    Each MODULE should stick to a "theme" of sorts. "Part Handling" or "Product #12" or "Plant Tour Demo".

    ROUTINES within Modules should be written to handle a specific task. This can be a few lines or a thousand if needed, but keep it focused.

    System Modules cannot contain motion commands, so only use them for I/O and data manipulation.

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

  • New to Staubli --- Need a little help to start in the good direction

    • proceng
    • March 26, 2021 at 10:59 AM
    • Stäubli & Bosch Robot Forum
  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