I am working on robotic machining. In our facility, we have KUKA KR240 R2900 with KRC4 and we are using KUKA.cnc to be able to carry out machining operations.
I have been trying to utilize g-codes by changing spindle speed and wrist rotation simultaneously. I generated a program that add points between the initial one and the last point to change wrist axis orientation and spindle speed variation. I tried to write that code in KRL by using C_DIS command to interpolate points . It worked but i need this kind of interpolation in KUKA CNC.
However, robot's feed rate dropped to lower levels than predetermined one (for example, it should be 3600 mm/min but it dropped to roughly 200 mm/min) and it stopped at the points which i add,between the initial and final points.
To prevent this situation , is there any option for high-level linear interpolation or some commands that robot reads certain lines and keep them in its memory to interpolate these points? (or do you have any other suggestions ? )
( I added a graph & G-code to be more understandable and i upload g-code example may be i did mistake or i forget to add something in the g-code lines)
## Spindle speed and wrist rotation variation ##
N14 T1
N18 G54
N22 S16000 M3
N24 G0 X-13. Y15. Z40. A=0.0 B=-90. C=-180. Y1=0.000000
N26 X-13. Y15. Z3. A=0.0 B=-90. C=-180. Y1=0.000000
N28 G90 G17 G94 G1 X-13. Y15. Z0.0 A=0.0 B=-90. C=-180. Y1=0.000000 F3600.
N31 X0 Y15 Z0 A=0 B=-90. C=-180. Y1=0.000000
N22 S16000 M3
N31 X20.5882 Y15 Z0 A=-22.5 B=-90. C=-180. Y1=0.000000
N22 S16070 M3
N31 X41.1765 Y15 Z0 A=-45 B=-90. C=-180. Y1=0.000000
N22 S16140 M3
N31 X61.7647 Y15 Z0 A=-45 B=-90. C=-180. Y1=0.000000
N22 S16140 M3
N31 X82.3529 Y15 Z0 A=-22.5 B=-90. C=-180. Y1=0.000000
N22 S16060 M3
N31 X102.9412 Y15 Z0 A=0 B=-90. C=-180. Y1=0.000000
N22 S15980 M3
N31 X123.5294 Y15 Z0 A=0 B=-90. C=-180. Y1=0.000000
N22 S15980 M3
N31 X144.1176 Y15 Z0 A=22.5 B=-90. C=-180. Y1=0.000000
N22 S16240 M3
N31 X164.7059 Y15 Z0 A=45 B=-90. C=-180. Y1=0.000000
N22 S16500 M3
N31 X185.2941 Y15 Z0 A=45 B=-90. C=-180. Y1=0.000000
N22 S16500 M3
N31 X205.8824 Y15 Z0 A=0 B=-90. C=-180. Y1=0.000000
N22 S15750 M3
N31 X226.4706 Y15 Z0 A=-45 B=-90. C=-180. Y1=0.000000
N22 S15000 M3
N31 X247.0588 Y15 Z0 A=-45 B=-90. C=-180. Y1=0.000000
N22 S15000 M3
N31 X267.6471 Y15 Z0 A=-22.5 B=-90. C=-180. Y1=0.000000
N22 S15445 M3
N31 X288.2353 Y15 Z0 A=0 B=-90. C=-180. Y1=0.000000
N22 S15890 M3
N31 X308.8235 Y15 Z0 A=0 B=-90. C=-180. Y1=0.000000
N22 S15890 M3
N31 X329.4118 Y15 Z0 A=22.5 B=-90. C=-180. Y1=0.000000
N22 S10945 M3
N31 X350 Y15 Z0 A=45 B=-90. C=-180. Y1=0.000000
N22 S6000 M3
N34 X363. Y15. Z0.0 A=45 B=-90. C=-180. Y1=0.000000
N36 X363. Y15. Z3. A=45 B=-90. C=-180. Y1=0.000000
N38 G0 X363. Y15. Z40. A=45 B=-90. C=-180. Y1=0.000000
N40 M5
N44 M2
## KRL ##
DEF testcont_constant()
INI
PTP HOME Vel 100% DEFAULT
$ Vel.CP= 0.0533
$ORI_TYPE=#VAR
LIN {X -13, Y 15, Z 40, A 0.0, B -90, C -180} C_DIS
LIN {X -13, Y 15, Z 3, A 0.0, B -90, C -180} C_DIS
LIN {X -13, Y 15, Z 0, A 0.0, B -90, C -180} C_DIS
LIN {X 58.33, Y 15, Z 0, A 0.0, B -90, C -180} C_DIS
LIN {X 166.67, Y 15, Z 0, A 40.0, B -90, C -180} C_DIS
LIN {X 175, Y 15, Z 0, A 20.0, B -90, C -180} C_DIS
LIN {X 233.33, Y 15, Z 0, A -20.0, B -90, C -180} C_DIS
LIN {X 291.67, Y 15, Z 0, A -40.0, B -90, C -180} C_DIS
LIN {X 350, Y 15, Z 0, A -60.0, B -90, C -180} C_DIS
PTP HOME VEL 100% DEFAULT
END