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

Tracking distance travelled by TCP for adhesive refilling

  • Carleton Hall
  • June 13, 2023 at 5:43 PM
  • Thread is Unresolved
  • Carleton Hall
    Reactions Received
    1
    Trophies
    3
    Posts
    20
    • June 13, 2023 at 5:43 PM
    • #1

    Hello, I'm working on an adhesive dispensing project where our application has a cartridge on it that has to be manually filled and does not contain enough to cover the entire part we are utilizing.

    I was looking for help to come up with a solution where the program can track the distance traveled by the TCP and call an interrupt that pauses the program so the cartridge may be refilled and then continued until the part has been covered. I am needing to do this programmatically because due to the nature of the project, the distances/speeds between passes may vary as we further develop. Or maybe there is an alternative route that is less complicated.

    I am utilizing a KRC4 controller running KSS 8.6.

    I've attached a snippet of the code below for reference:

    Code
    DECL REAL passDistance,zCalc1,passRemainder
       DECL REAL arcAngle,arcBaseLength,arcHeightLength,maxArcLength,radiusCenterBase,radiusCenterHeight,arcLength
       DECL REAL count1,count2,count3,radius1,radius2,pi,sinReturn,cosReturn,cosReturn2,sinReturn2,newX,newZ,rotationAngle
       
       pi=3.14159
       radius1=0.25 * 25.4
       radius2=24 * 25.4
       maxArcLength=0.298 * 25.4
       count1=1
       count2=1
       count3=1
       passDistance=3.5
       passRemainder=0
       arcLength=0
       rotationAngle=68.382
       
       ;FOLD INI;%{PE}
          ;FOLD BASISTECH INI
             GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS == TRUE DO IR_STOPM()
             INTERRUPT ON 3
             BAS(#INITMOV, 0)
          ;ENDFOLD (BASISTECH INI)
          ;FOLD USER INI
             ;Make your modifications here
          ;ENDFOLD (USER INI)
       ;ENDFOLD (INI)
       
       
       SPTP XHOME
       
       
       ;OVER PART
       SPTP XP8
       
       
       ;APPROACH
       SLIN XP2
       
       
       ;PATH START
       SLIN XP19
       
       $OUT[1] = TRUE
       
       ;FOLD OUTER FLAT
       ;first pass around the base
       SCIRC XP26, XP27
       
       SCIRC XP28, XP29
       
       WHILE XP30.Z < 33.8074 ;while the height is less than the start of the radius
          
          zCalc1=XP30.Z + passDistance ;increase height by pass distance
          
          XP30.Z=zCalc1
          XP22.Z=zCalc1
          XP23.Z=zCalc1
          XP24.Z=zCalc1
          XP25.Z=zCalc1
          
          XP26=XP24
          XP27=XP23
          XP28=XP22
          XP29=XP25
          
          IF XP30.Z > 33.8074 THEN ;if height is greater than start of radius, exit while loop
             passRemainder=XP30.Z - 33.8074
             EXIT
          ENDIF
          
          SLIN XP30
          
          IF ((count1 / 2) <> (count1 / 2.0)) THEN ;flip CW/CCW rotations 
             ;odd
             SCIRC XP22, XP23
             SCIRC XP24, XP25
          ELSE
             ;even
             SCIRC XP26, XP27
             SCIRC XP28, XP29
          ENDIF
          count1=count1 + 1
       ENDWHILE
       ;ENDFOLD
       
       ;FOLD RADIUS
       WHILE arcLength < maxArcLength
          IF count2 ==1 THEN ;if first pass on the radius
             
             arcLength=passRemainder ;create arc equal to pass remainder
             
             IF passRemainder > maxArcLength THEN ;if the remaining pass will not land on the radius
                count2 = count1
                passRemainder = passRemainder - maxArcLength ;remaining distance for top surface
                EXIT
             ENDIF
             
             arcAngle=(arcLength * 360) / (2 * pi * radius1)
             count2 = count1
          ELSE ;if not first pass on the radius
                arcLength = arcLength + passDistance ;increment arc by pass distance
                arcAngle=(arcLength * 360) / (2 * pi * radius1)
          ENDIF
          
          sinReturn=SIN(arcAngle)
          cosReturn=COS(arcAngle)
          
          arcBaseLength=radius1 * sinReturn
          arcHeightLength=radius1 * cosReturn
          
          radiusCenterBase=228.6 - radius1
          radiusCenterHeight=33.8074
          
          sinReturn2=SIN(90)
          cosReturn2=COS(90)
          
          newX=-1*((arcBaseLength * cosReturn2) - (arcHeightLength * sinReturn2)) ;2d rotation of point around 0,0
          newZ=(arcBaseLength * sinReturn2) + (arcHeightLength * cosReturn2) ;2d rotation of point around 0,0
          
          XP1.X=radiusCenterBase + newX ;shift new values to radius center
          XP1.Z=radiusCenterHeight + newZ
          
          XP31.Y=-1 * (radiusCenterBase + newX)
          XP31.Z=radiusCenterHeight + newZ
          
          XP32.X=-1 * (radiusCenterBase + newX)
          XP32.Z=radiusCenterHeight + newZ
         
          XP33.Y=radiusCenterBase + newX
          XP33.Z=radiusCenterHeight + newZ
          
          XP34.X=radiusCenterBase + newX
          XP34.Z=radiusCenterHeight + newZ
    
          XP36=XP32
          XP35=XP33
          XP38=XP34
          XP37=XP31
          
          IF arcLength > maxArcLength THEN
             passRemainder=arcLength - maxArcLength ;remaining distance for top surface
             EXIT
          ENDIF
          
          SLIN XP1
          
          IF ((count2 / 2) <> (count2 / 2.0)) THEN ;flip CW/CCW rotations
             ;odd
             SCIRC XP31, XP32
             SCIRC XP33, XP34
          ELSE
             ;even
             SCIRC XP35, XP36
             SCIRC XP37, XP38
          ENDIF
          count2=count2 + 1
       ENDWHILE
       ;ENDFOLD
    Display More
  • Fubini
    Reactions Received
    282
    Trophies
    9
    Posts
    1,903
    • June 13, 2023 at 5:59 PM
    • #2

    Why are you trying to add up everything yourself. You can use $distance. Its nulled whenever you do not blend so over a blended sequence it adds up.

    Fubini

  • Carleton Hall
    Reactions Received
    1
    Trophies
    3
    Posts
    20
    • June 13, 2023 at 6:20 PM
    • #3
    Quote from Fubini

    Why are you trying to add up everything yourself. You can use $distance. Its nulled whenever you do not blend so over a blended sequence it adds up.

    Fubini

    Thanks for the tip, I'm currently doing my development in KUKA.Sim while waiting for some stuff. Do you know if this variable does not get calculated in this environment, or do my point shift calculations somehow cause it to be nulled/0? When I try to monitor the value it remains at 0 throughout the program. I imagine it shouldn't be the calculations, as the advance run pointer works fine and the motions are blending properly.

  • Fubini
    Reactions Received
    282
    Trophies
    9
    Posts
    1,903
    • June 13, 2023 at 6:30 PM
    • #4

    You simulate directly with kuka.sim or do you simulate with a office lite connected to Kuka.sim? In the first case its not supported. So no update in this case because it does not use the robot controller under the hood.

    Fubini

  • Mentat
    Reactions Received
    61
    Trophies
    5
    Posts
    243
    • June 13, 2023 at 7:33 PM
    • #5

    Hi, some alternative solutions:

    Why not put a sensor or three (depends on the shape and whether the cartridge is attached to the robot) into the cartridge? Then you could just see when it's empty from the inputs, no guesstimation needed.

    Could run a procedure in a submit that adds differences between previous position and current one when some flag is raised. No need to calculate movement lengths then. It's not going to be as mathematically rigorous due to timing issues, but I am going to assume you don't intend to use all the liquid/gas down to the last molecule :smiling_face: Also significantly easier to implement coding wise.

  • Carleton Hall
    Reactions Received
    1
    Trophies
    3
    Posts
    20
    • June 14, 2023 at 4:25 PM
    • #6
    Quote from Fubini

    You simulate directly with kuka.sim or do you simulate with a office lite connected to Kuka.sim? In the first case its not supported. So no update in this case because it does not use the robot controller under the hood.

    Fubini

    Just KUKA.Sim, no OfficeLite, so that makes sense. Thanks for your help

    .

    Quote from Mentat

    Hi, some alternative solutions:

    Why not put a sensor or three (depends on the shape and whether the cartridge is attached to the robot) into the cartridge? Then you could just see when it's empty from the inputs, no guesstimation needed.

    Could run a procedure in a submit that adds differences between previous position and current one when some flag is raised. No need to calculate movement lengths then. It's not going to be as mathematically rigorous due to timing issues, but I am going to assume you don't intend to use all the liquid/gas down to the last molecule :smiling_face: Also significantly easier to implement coding wise.

    I would love to for the sake of simplicity to but unfortunately, this is a research project, and the adhesive cartridge was given to us by our customer and I'm unable to modify it. I will ponder the submit interpreter idea for sure, might be an relatively easier solution.

  • Online
    SkyeFire
    Reactions Received
    1,060
    Trophies
    12
    Posts
    9,456
    • June 14, 2023 at 8:09 PM
    • #7

    What pushes the plunger of the cartridge? It should be possible to place a sensor on that, even if it's just a temporary mount (some hot glue, or even light-duty Loctite adhesive).

    You mentioned changing speeds -- does the adhesive extrusion speed also change as the TCP speed changes? If not, then the TCP distance travelled won't match up with the extruded volume -- if the adhesive extrusion rate remains constant, then running the same path at 100mm/s will use up much less adhesive than running it at 1000mm/s.

    I would avoid using an interrupt, in any case. It's unnecessary complexity. I would break up the overall program into adhesive segments, and check the adhesive fill state (sensor, counter, whatever) between segments. Then set the "stop for refill" limit to leave enough "extra" to do your biggest, longest segment. That way, you never leave a segment short of adhesive, but once you're below the limit, the program won't run the next segment until you refill the cartridge.

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

  • tcp
  • distance
  • adhesive
  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