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

How to Repeat a group of movements

  • Joe27
  • February 22, 2021 at 1:26 AM
  • Thread is Unresolved
  • Joe27
    Trophies
    2
    Posts
    2
    • February 22, 2021 at 1:26 AM
    • #1

    Hi All,

    I have a Kuka KR4, with a compact controller that I am trying to do some basic programming on. I'm fairly new to this, so this may be a basic question for all, so apologies if that is the case

    I want to redo a movement in multiple locations and not sure the best way to set this up. Think of it like I have a group of movements that traces out the letter "W". I want to do this multiple times in the workspace with a new start point for each "W".

    At present I have defined the movement in the Base coordinate system, but not sure how to make it such that I can repeat the movement path with a new starting point (without doing each "W" as a new set of point).

    I'm sure there is an easy way, but I am not sure where to start searching to do this. Any pointers would be much appreciated

  • Online
    panic mode
    Reactions Received
    1,278
    Trophies
    11
    Posts
    13,079
    • February 22, 2021 at 1:34 AM
    • #2

    there are different ways to go about it:

    1. recalculate positions

    2. offset base

    3. use relative motions

    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,051
    Trophies
    12
    Posts
    9,423
    • February 22, 2021 at 3:21 PM
    • #3

    An array of points:

    Code
    DECL FRAME Array[5]
    Array[1] = {X 0,Y 0,Z 0,A 0,B 0,C 0}
    Array[2] = {X 100,Y 0,Z 0,A 0,B 0,C 0}
    Array[3] = {X 100,Y 100,Z 0,A 0,B 0,C 0}
    Array[4] = {X 0,Y 100,Z 0,A 0,B 0,C 0}
    Array[5] = {X 0,Y 0,Z 0,A 0,B 0,C 0}
    
    DECL INT Index
    
    FOR Index = 1 TO 5
      LIN Array[Index]
    ENDFOR
    Display More

    To do the same with Base offsets:

    Code
    DECL E6POS MyPoint
    
    MyPoint = $POS_ACT_MES ; set to current physical position
    FOR Index = 1 TO 5
      $BASE = BASE_DATA[1] : Array[Index] ; active base is BASE_DATA[1] plus the offset
      LIN MyPoint
    ENDFOR

    Point Offsets:

    Code
    DECL E6POS MyPoint
    
    MyPoint = $POS_ACT_MES
    FOR Index = 1 TO 5
      LIN MyPoint : Array[Index] ; point plus offset
    ENDFOR
  • Joe27
    Trophies
    2
    Posts
    2
    • February 22, 2021 at 11:40 PM
    • #4

    Thanks all - from a little more searching, I found a similar example here using the base offset:

    Kuka Subprogram/array

    So I adapted that code for my application, and it seems to be working - now I just need to adapt it to add the real code/offsets etc

    Thanks so much for the help


    Code
    &ACCESS RVP
    &REL 2
    DEF DB_BC_FOLD_TEST_base_off()
      DECL INT X,Y; variable used for loop counter
      DECL INT X_Max, Y_Max ; variables that specify number of repetitions
      DECL REAL dX, dY ; offsets
      DECL FRAME Ofs ; this is the base offset
    
    
      dX = 0 ; X-offset
      dY = -3; Y-offset
    
      X_Max = 1; one row
      Y_Max = 2 ; four columns
    
      Ofs=$nullframe
      ;Base 3 is the original values for the Fold Base
      ;Base 2 is the one that is offset and moved each time
      BASE_DATA[2] = BASE_DATA[3]; ReSet Base 2 (from 3) incase the program was interrupted
       
         FOR X=1 to X_Max
           FOR Y=1 to Y_Max
              Ofs.X = (X-1)*dX
              Ofs.Y = (Y-1)*dY
              BASE_DATA[2] = BASE_DATA[2]:Ofs ; Offset Base[2] 
              DB_test01(); Deburring program (for 1 channel)
           ENDFOR
         ENDFOR
      BASE_DATA[2] = BASE_DATA[3]; Reset Base 2 to the original values 
    
    END
    Display More

    Edited 3 times, last by Joe27: cleaned up code (February 23, 2021 at 2:20 AM).

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

  • KUKA
  • movement
  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