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. Comau Robots
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

Comau Program Template

  • AndreasPoe
  • July 4, 2024 at 8:35 PM
  • Thread is Unresolved
  • AndreasPoe
    Trophies
    1
    Posts
    5
    • July 4, 2024 at 8:35 PM
    • #1

    Hello everyone,

    Can someone provide me with a program template that utilizes subprograms and calls programs from various files globally?

    I have the programming manuals, but I am struggling to make sense of them.

    I would greatly appreciate any help.

    Thank you!

  • MOM July 4, 2024 at 9:40 PM

    Approved the thread.
  • massula
    Reactions Received
    200
    Trophies
    8
    Posts
    1,421
    • July 8, 2024 at 12:42 AM
    • #2

    I'm assuming You want to write Your programs by hand, instead on the robot itself.

    Here follow an small example.

    Code
    PROGRAM MyProg STACK = 2048   -- This is a comment
    CONST
    
    VAR pnt0009P : POSITION
     xtn0002X, xtn0001X, xtn0003X, xtn0004X, xtn0005X : XTNDPOS FOR ARM[1]
     pnt0004P, pnt0005P, pnt0006P, pnt0007P, pnt0008P : POSITION
     p_f_i_prel, p_prel, pnt0001P, pnt0002P, pnt0003P : POSITION
     
    ROUTINE CD_End EXPORTED FROM CDetect
    ROUTINE CD_Start(ai_Coll : INTEGER) EXPORTED FROM CDetect
    ROUTINE ToolFrame(ai_tool, ai_frame, ai_arm : INTEGER()) EXPORTED FROM TT_TOOL
     
    BEGIN
     
     -----------------------
     $STRESS_PER := 50
     $TOOL_RMT := FALSE
     $LIN_SPD := 0.30000001
     $SPD_OPT := SPD_CONST
     $ARM_SPD_OVR := 100
     $ARM_ACC_OVR := 100
     $ARM_DEC_OVR := 100
     $TERM_TYPE := COARSE
     -----------------------
     ToolFrame(10, 0)
     CD_Start(21)
     ----------------------------
     
     MOVEFLY JOINT TO p_f_i_prel ADVANCE 
     MOVEFLY JOINT TO pnt0005P ADVANCE 
     
     MOVE LINEAR TO p_prel,
       WITH $PROG_SPD_OVR = 50,
       WITH $PROG_ACC_OVR = 25,
       WITH $PROG_DEC_OVR = 25,
     ENDMOVE
         
     CD_End
     
    END MyProg 
    Display More

    Routines like ToolFrame and CD_Start are inside in other libraries (TT_Tool and CDetect, respectively), so they must be declared on the declaration section of the program.

    Since You didn't told what is the controller You will be using, I'm assuming it is a C5G Plus. So would be a good idea to use WinCRC software to write Your programs, since it can find syntax errors.

  • AndreasPoe
    Trophies
    1
    Posts
    5
    • July 29, 2024 at 7:05 PM
    • #3

    Hi, thanks for the example program.

    Yes, we are already using WinCRC, although I don't find it very user-friendly.

    Does it require a special command to make the robot loop continuously? We are using movefly and advance, but the robot stops at each point.

  • massula
    Reactions Received
    200
    Trophies
    8
    Posts
    1,421
    • July 31, 2024 at 4:03 AM
    • #4

    Are using logic commands between these movements?

    If yes, robot will make small stops, and would be better use WITH CONDITION statement in combination with the MOVE instructions.

  • AndreasPoe
    Trophies
    1
    Posts
    5
    • July 31, 2024 at 9:52 PM
    • #5

    Between the movements, I only write an integer variable as a reference marker for the home position. If I comment out this line, it doesn't change anything.

    Linear movements work without stopping, but the robot stops during joint movements.

    I will try to post part of the program tomorrow.

  • AndreasPoe
    Trophies
    1
    Posts
    5
    • August 1, 2024 at 12:27 PM
    • #6
    Code
    ROUTINE mv20VP_10VP
    BEGIN
     ToolFrame(tGreifer, 1, 1)
     $FLY_DIST := 200
     
     IF $FDIN[doAutoAktiv] = OFF THEN
       MOVEFLY JOINT TO p20VP ADVANCE 
     ENDIF
     nActPos := 2010001
     MOVEFLY JOINT TO p10VP_20VP_3 ADVANCE 
     nActPos := 2010002
     MOVEFLY JOINT TO p10VP_20VP_2 ADVANCE 
     nActPos := 2010003
     MOVEFLY JOINT TO p10VP_20VP_1 ADVANCE 
     nActPos := 2010004
     MOVE JOINT TO p10VP
     nActPos := 10
    END mv20VP_10VP
    Display More
  • massula
    Reactions Received
    200
    Trophies
    8
    Posts
    1,421
    • August 1, 2024 at 4:45 PM
    • #7

    I would try to use WITH or WITH CONDITION clauses.

    Something like this


    Code
    ROUTINE mv20VP_10VP
    BEGIN
    ToolFrame(tGreifer, 1, 1)
    $FLY_DIST := 200
    
    IF $FDIN[doAutoAktiv] = OFF THEN
      MOVEFLY JOINT TO p20VP ADVANCE 
    ENDIF
    nActPos := 2010001
    MOVEFLY JOINT TO p10VP_20VP_3 ADVANCE 
        WITH nActPos := 2010002,
    ENDMOVE
    MOVEFLY JOINT TO p10VP_20VP_2 ADVANCE 
        WITH nActPos := 2010003,
    ENDMOVE
    MOVEFLY JOINT TO p10VP_20VP_1 ADVANCE 
        WITH nActPos := 2010004,
    ENDMOVE
    MOVE JOINT TO p10VP
        WITH nActPos := 10,
    ENDMOVE
    END mv20VP_10VP
    Display More
  • AndreasPoe
    Trophies
    1
    Posts
    5
    • August 1, 2024 at 8:00 PM
    • #8

    I will test this, but as I said, converting the assignment into a comment does not improve the situation either.

    Today, I had the robots in remote operation for the first time, and here too, they stop after each joint movement.

    Between my linear movements, the same assignment is made, and it does not cause a stop.

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

Tags

  • robot
  • Program
  • Comau
  • Templates
  • pld2
  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