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

KR C2 Stacker Offset

  • Kevin Wollmann
  • November 15, 2022 at 3:54 AM
  • Thread is Unresolved
  • Kevin Wollmann
    Trophies
    3
    Posts
    4
    • November 15, 2022 at 3:54 AM
    • #1

    Hi All.

    I'm working on a Stacking robot that the customer wants to add a height offset of 10mm for everytime the robot drops a part. I haven't spent a lot of time with a kuka, but I hope i can get this to work. will the following work?

    (Pos1) top of the stack

    (Pos2) bottom of the stack

    (Pos3) offset temp

    (INT A) layers count

    (INT B) offset measurement.

    (INT C) temp

    PLC is doing the batch counting $IN(3308)

    robot acknowledge that the signal was received. $OUT(3342)

    Code
    if $IN(3308) == true then     //devicenet input
    
        PULSE($OUT[3342] , 1)    // pulseoutput signal to show plc robot reset the stacking
    
        POS3 = POS2                    // restore the temp position to the set point
    
        A = 0                                  // restore int to 0
    
    else
    
        A = A + 1                           // add layer
    
        C = A * B                           //multiply layer height
    
        LIN Pos3(a1 0, a2 0, a3 C, a4 0, a5 0, a6 0)   //new position
    
    endif
    
    
    
    PTP Pos1  //go back to top and cycle....
    Display More
  • hermann
    Reactions Received
    412
    Trophies
    9
    Posts
    2,628
    • November 15, 2022 at 6:49 AM
    • #2

    Can't follow your logic, but at least

    Code
    LIN Pos3(a1 0, a2 0, a3 C, a4 0, a5 0, a6 0)

    Won't work.

    Wrong Syntax. Think you forgot a ':', but that's not enough.

    You want to give offsets in cartesian coordinates (not axis values) so you have to use x, y, Z, a, b, c instead of a1, a2...

    You can't use variable like C in the offset frame direct, you need to declare a frame and then set the components separate like:

    Code
    Decl frame offset
    Offset=$nullframe
    Offset.z = C
    Lin offset:offset

    Changed the order around ':', as in palletizing programs normally offsets are relative to base.

  • panic mode
    Reactions Received
    1,297
    Trophies
    11
    Posts
    13,141
    • November 15, 2022 at 3:46 PM
    • #3

    that is correct except for typo in line 4,

    to offset base should be

    Code
    LIN offset:Pos3

    to offset tool should be

    Code
    LIN Pos3:offset 

    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

  • Kevin Wollmann
    Trophies
    3
    Posts
    4
    • November 18, 2022 at 1:30 AM
    • #4

    Hi, what is wrong with the following code.

    This is in my DAT file

    Code
    DECL FRAME Ofset
    DECL INT A
    DECL INT A1
    DECL INT B
    DECL INT C

    This is in my SRC File. I get the error on the Ofset line.

    Code
    PTP P8 Vel=30 % PDAT4 Tool[1] Base[0]
    LIN P9 Vel=0.2 m/s CPDAT5 Tool[1] Base [0]
    
    A = A + 1
    A1 = 120 - A
    B = 10
    C = A1 * B
    
    Ofset = $nullframe
    Ofset.z = -C
    LIN P9:Ofset
    
    PTP P10 Vel=30 % PDAT6 Tool[1] Base[0]
    PTP P11 Vel=0.2 m/s CPDAT7 Tool[1] Base [0]
    Display More
  • panic mode
    Reactions Received
    1,297
    Trophies
    11
    Posts
    13,141
    • November 18, 2022 at 4:36 AM
    • #5

    You may want to be more specific...

    Which line of code exactly and what kind of message?

    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

  • Fubini
    Reactions Received
    283
    Trophies
    9
    Posts
    1,905
    • November 18, 2022 at 8:18 AM
    • #6

    Could be it needs to be XP9 in line 11 since its defined inside an Inline form.

    Fubini

  • hermann
    Reactions Received
    412
    Trophies
    9
    Posts
    2,628
    • November 18, 2022 at 8:31 AM
    • #7
    Code
    -C

    should be

    Code
    -1.0*C
  • DannyDJ
    Reactions Received
    67
    Trophies
    6
    Posts
    506
    • November 18, 2022 at 9:01 AM
    • #8

    Usually value of inline points in .dat is stored with X prefix. So if you want to use values from inline form point P9, one should write XP9 in program.

    LIN XP9:ofset

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
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • 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
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Tags

  • variable
  • Offset
  • global
  • positions
  • dat
  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