Author Topic: Interpolation of toolpath with variable movement speed  (Read 716 times)

Altrinis

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 9
    • View Profile
Interpolation of toolpath with variable movement speed
« on: February 05, 2020, 01:54:30 PM »
Hello,

I am trying to enhance my algorithm for single wall (corkscrew) 3d printing with an option to vary robot's speed according to length of the printed curve. Mapping went fairly easily and Kuka PRC component "linear movement" accepted the grafted data fine.

The problem is, whenever the speed changes, robot briefly stops. That's very unwanted behaviour because our extruder keeps going, resulting in a blob (the latency of extrudate would be too big to try to stop it for such a brief moment anyway)/

I have tried to adjust the interpolation settings in following ways:

  • set higher interpolation value in interpolation by distance
  • reduce distance between points on curves which have different speeds
  • change interpolation type to "by velocity"
  • tried to use spline movement component, unfortunately the file size is larger then our robot can process (we already use the "reduce filesize" option)

During the robots work, the KRC informs at the problematic point that the toolpath could not be approximated (translated from my native language).

Is there a general "blend movement" solution?

Here's a screenshot for better visualisation of the problem https://i.imgur.com/HRyiLeu.png.

Kind regards,
Michael.
« Last Edit: February 05, 2020, 01:58:03 PM by Altrinis »

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1067
    • View Profile
    • Robots in Architecture
Re: Interpolation of toolpath with variable movement speed
« Reply #1 on: February 05, 2020, 04:18:37 PM »
Hello,

The variable $Advance sets how many positions the robot will look into the future to blend movements.
Activate the user group Expert and then go to Display/Variable/Single and enter $Advance.
Make if the value is lower than 3, set it to 3. I've never had to use values higher than 5 or so.

Best,
Johannes

Altrinis

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 9
    • View Profile
Re: Interpolation of toolpath with variable movement speed
« Reply #2 on: February 05, 2020, 08:35:57 PM »
Hi,
Thank you for the reply - I forgot to mention I did set the $Advance to 5 beforehand. This is what the header of my program looks like:
Code: [Select]
;FOLD INI
;FOLD BASISTECH INI
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;ENDFOLD (INI)
;FOLD STARTPOSITION - BASE IS 4, TOOL IS 4, SPEED IS 40%, POSITION IS A1 0,A2 -77,A3 127,A4 0,A5 -51,A6 0,E1 0,E2 0,E3 0,E4 0
$BWDSTART = FALSE
PDAT_ACT = {VEL 40,ACC 100,APO_DIST 50}
FDAT_ACT = {TOOL_NO 4,BASE_NO 4,IPO_FRAME #BASE}
BAS (#PTP_PARAMS,40)
PTP  {A1 0,A2 -77,A3 127,A4 0,A5 -51,A6 0,E1 0,E2 0,E3 0,E4 0}
;ENDFOLD
;FOLD LIN SPEED IS 0.1 m/sec, INTERPOLATION SETTINGS IN FOLD
$VEL.CP=0.1
$APO.CDIS=3
$ADVANCE=5
;ENDFOLD

Is there any abnormality?
Would it be possible that the command is not accepted by the robot?
We have a KR C4, with modern 8.3 kuka system software.

Kind regards,
Michael.

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1067
    • View Profile
    • Robots in Architecture
Re: Interpolation of toolpath with variable movement speed
« Reply #3 on: February 06, 2020, 09:10:26 AM »
Hello Michael,

That looks normal enough. Can you post a few lines of code and indicate where the problem with the interpolation occurs?

Thanks!
Johannes

Altrinis

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 9
    • View Profile
Re: Interpolation of toolpath with variable movement speed
« Reply #4 on: February 07, 2020, 01:32:14 PM »
Hi,

I managed to pinpoint the exact moment and cause of unplanned stops. It was hidden in plain sight:

Code: [Select]
LIN {X 82.582,Y 97.199} C_DIS
LIN {X 86.222,Y 93.781} C_DIS
LIN {X 90.261,Y 90.846} C_DIS
LIN {X 94.636,Y 88.441} C_DIS
LIN {X 99.279,Y 86.603} C_DIS
LIN {X 104.115,Y 85.361} C_DIS
LIN {X 109.068,Y 84.735} C_DIS
LIN {X 114.061} C_DIS
LIN {X 119.015,Y 85.361} C_DIS
LIN {X 123.851,Y 86.603} C_DIS
LIN {X 128.493,Y 88.441} C_DIS
LIN {X 132.869,Y 90.846} C_DIS
LIN {X 136.908,Y 93.781} C_DIS
LIN {X 140.548,Y 97.199} C_DIS
LIN {X 143.731,Y 101.046} C_DIS
LIN {X 146.406,Y 105.262} C_DIS
LIN {X 148.532,Y 109.78} C_DIS
LIN {X 150.075,Y 114.528} C_DIS
LIN {X 151.01,Y 119.433} C_DIS
slimak=21
;ommit
$VEL.CP=0.03
$OUT_C[1]=TRUE
LIN {X 150.136, Y 124.416, Z 44.8, A 0, B 90, C 0, E1 0, E2 0, E3 0, E4 0} C_DIS
LIN {X 149.832,Y 129.25} C_DIS
LIN {X 148.925,Y 134.008} C_DIS
LIN {X 147.428,Y 138.615} C_DIS
LIN {X 145.365,Y 142.998} C_DIS
LIN {X 142.77,Y 147.088} C_DIS
LIN {X 139.682,Y 150.82} C_DIS
LIN {X 136.151,Y 154.136} C_DIS
LIN {X 132.233,Y 156.983} C_DIS
LIN {X 127.988,Y 159.316} C_DIS
LIN {X 123.484,Y 161.1} C_DIS
LIN {X 118.793,Y 162.304} C_DIS
LIN {X 113.987,Y 162.911} C_DIS
LIN {X 109.143} C_DIS

The "slimak=21" is a variable sent to extruder via ethernetIP. This causes the robot to stop for a fraction of time. What I would need is a way to send this numeric value as you can send digital output with parameter "continous". Is it possible?

By the way, I had solved the problem of sending single value through ethernetIP by using "KRL command" component from KukaPRC. I could not find any other component that could send values (the same way you have suggested with $Advance variable).

Kind regards,
Michael.
« Last Edit: February 07, 2020, 01:35:21 PM by Altrinis »

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1067
    • View Profile
    • Robots in Architecture
Re: Interpolation of toolpath with variable movement speed
« Reply #5 on: February 07, 2020, 01:47:30 PM »
Hello,

Just put CONTINUE above the line with the variable.
But note that this will cause the variable to be set in advance.

Best,
Johannes

Altrinis

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 9
    • View Profile
Re: Interpolation of toolpath with variable movement speed
« Reply #6 on: February 10, 2020, 01:04:40 PM »
I did not expect there would be such a simple and (after testing) efficient solution, many thanks.

Kind regards,
Michael.

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1067
    • View Profile
    • Robots in Architecture
Re: Interpolation of toolpath with variable movement speed
« Reply #7 on: February 10, 2020, 01:05:15 PM »
Great, thanks for the update!
Best,
Johannes