Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

RoboDK post processor for KUKA robot using KR C5.

#1
Hi RoboDK and other in the community.

I have a KR50, with KRC5 controller, and I was using RoboDK, version 5.2.5. I made a complete simulation of the cell and tested the program for reach limits and singularities. Then I went towards the offline programming, where I selected the postprocessor. There was no KR C5, which is also fairly new, so I selected the KR C4.

The result of the .src file and .dat file was however a bit different from what I normally would expect the outcome would look like. I transferred however the code to the robot, and it was working fine, but I was not able to e.g. touch-up the given robot position, because the code was in a different format.

One example is as below for a simple program, where the robot should move from home position to the position called StacksHome. The real code that will work on the robot is below, where it is possible to inline "touch-up" the e.g. StacksHome position.

The .src file is here and also attached as: KRL.txt
Code:
&ACCESS RVO
&REL 51
&PARAM EDITMASK = *
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM DISKPATH = KRC:\R1\Program
DEF Stack1( )
;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)

;FOLD SPTP HOME Vel=100 % DEFAULT ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=HOME; Kuka.BlendingEnabled=False; Kuka.MoveDataPtpName=DEFAULT; Kuka.VelocityPtp=100; Kuka.VelocityFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SPTP
;ENDFOLD
SPTP XHOME WITH $VEL_AXIS[1] = SVEL_JOINT(100.0), $TOOL = STOOL2(FHOME), $BASE = SBASE(FHOME.BASE_NO), $IPO_MODE = SIPO_MODE(FHOME.IPO_FRAME), $LOAD = SLOAD(FHOME.TOOL_NO), $ACC_AXIS[1] = SACC_JOINT(PDEFAULT), $APO = SAPO_PTP(PDEFAULT), $GEAR_JERK[1] = SGEAR_JERK(PDEFAULT), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD

;FOLD SPTP StacksHome Vel=100 % PDAT1 Tool[2]:ForkNew Base[4]:EUpalletNEW ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=StacksHome; Kuka.BlendingEnabled=False; Kuka.MoveDataPtpName=PDAT1; Kuka.VelocityPtp=100; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SPTP
;ENDFOLD
SPTP XStacksHome WITH $VEL_AXIS[1] = SVEL_JOINT(100.0), $TOOL = STOOL2(FStacksHome), $BASE = SBASE(FStacksHome.BASE_NO), $IPO_MODE = SIPO_MODE(FStacksHome.IPO_FRAME), $LOAD = SLOAD(FStacksHome.TOOL_NO), $ACC_AXIS[1] = SACC_JOINT(PPDAT1), $APO = SAPO_PTP(PPDAT1), $GEAR_JERK[1] = SGEAR_JERK(PPDAT1), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD

And the associated .dat file.

Code:
&ACCESS RVO
&REL 51
&PARAM EDITMASK = *
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM DISKPATH = KRC:\R1\Program
DEFDAT STACK1
;FOLD EXTERNAL DECLARATIONS;%{PE}%MKUKATPBASIS,%CEXT,%VCOMMON,%P
;FOLD BASISTECH EXT;%{PE}%MKUKATPBASIS,%CEXT,%VEXT,%P
EXT BAS (BAS_COMMAND :IN,REAL :IN )
DECL INT SUCCESS
;ENDFOLD (BASISTECH EXT)
;FOLD USER EXT;%{E}%MKUKATPUSER,%CEXT,%VEXT,%P
;Make your modifications here

;ENDFOLD (USER EXT)
;ENDFOLD (EXTERNAL DECLARATIONS)
DECL MODULEPARAM_T LAST_TP_PARAMS={PARAMS[] "Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.MovementParameterFieldEnabled=True; Kuka.IsAngleEnabled=False; Kuka.PointName=stack1pickposTEMP; Kuka.FrameData.base_no=4; Kuka.FrameData.tool_no=2; Kuka.FrameData.ipo_frame=#BASE; Kuka.FrameData.point2=; Kuka.isglobalpoint=False; Kuka.MoveDataName=CPDAT8; Kuka.MovementData.cb={AUX_PT {ORI #CONSIDER,E1 #CONSIDER,E2 #CONSIDER,E3 #CONSIDER,E4 #CONSIDER,E5 #CONSIDER,E6 #CONSIDER},TARGET_PT {ORI #INTERPOLATE,E1 #INTERPOLATE,E2 #INTERPOLATE,E3 #INTERPOLATE,E4 #INTERPOLATE,E5 #INTERPOLATE,E6 #INTERPOLATE}}; Kuka.MovementData.apo_fac=50; Kuka.MovementData.apo_dist=500; Kuka.MovementData.axis_acc=100; Kuka.MovementData.axis_vel=100; Kuka.MovementData.circ_typ=#BASE; Kuka.MovementData.jerk_fac=50; Kuka.MovementData.ori_typ=#VAR; Kuka.MovementData.vel=2; Kuka.MovementData.acc=100; Kuka.MovementData.exax_ign=0; Kuka.VelocityPath=2; Kuka.BlendingEnabled=False; Kuka.APXEnabled=False; Kuka.CurrentCDSetIndex=0; Kuka.MoveDataPtpName=PDAT1; Kuka.MovementDataPdat.apo_mode=#CDIS; Kuka.MovementDataPdat.apo_dist=500; Kuka.VelocityPtp=100 "}
DECL E6POS XStacksHome={X -546.012268,Y -4.26492643,Z 327.078278,A 0.477458119,B -0.0832620561,C 0.387397945,S 22,T 50,E1 0.0,E2 0.0,E3 0.0,E4 0.0,E5 0.0,E6 0.0}
DECL FDAT FStacksHome={TOOL_NO 2,BASE_NO 4,IPO_FRAME #BASE,POINT2[] " "}
DECL PDAT PPDAT1={VEL 100.000,ACC 100.000,APO_DIST 500.000,APO_MODE #CDIS,GEAR_JERK 100.000,EXAX_IGN 0}
ENDDAT

Code from RoboDK using postprocessor KR C4.
Code:
&ACCESS RVP
&REL 1
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM EDITMASK = *
DEF Prog1 ( )
EXT BAS (BAS_COMMAND :IN,REAL :IN )


; GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
; INTERRUPT ON 3

;FOLD Initialise and set default speed
BAS (#INITMOV,0)
BAS (#VEL_PTP,100)
BAS (#ACC_PTP,20)
$VEL.CP=0.2
BAS (#TOOL,0)
BAS (#BASE,0)
;ENDFOLD

;;FOLD STARTPOS
;$BWDSTART = FALSE
;PDAT_ACT = PDEFAULT
;BAS(#PTP_DAT)
;FDAT_ACT = {TOOL_NO 0,BASE_NO 0,IPO_FRAME #BASE}
;BAS(#FRAMES)
;;ENDFOLD

$ADVANCE = 5

;FOLD ---- Quickly skip BCO ----
; PTP $AXIS_ACT
;ENDFOLD

;FOLD ---- GO HOME ----
; PTP {A1 0.000, A2 -90.000, A3 90.000, A4 0.000, A5 0.000, A6 0.000, E1 0, E2 0, E3 0, E4 0, E5 0, E6 0}
;ENDFOLD


; Program generated by RoboDK v5.2.5 for KUKA KR 50 R2500 on 12/01/2022 10:35:50
; Using nominal kinematics.
; ---- Setting reference (Base) ----
$BASE = {FRAME: X 0.000,Y 0.000,Z 0.000,A 0.000,B 0.000,C 0.000}
; BASE_DATA[1] = {FRAME: X 0.000,Y 0.000,Z 0.000,A 0.000,B 0.000,C 0.000}
; $BASE = BASE_DATA[1]
; --------------------------
PTP {A1 0.00000,A2 -90.00000,A3 90.00000,A4 0.00000,A5 0.00000,A6 0.00000,E1 0.00000}
PTP {A1 -36.68420,A2 -71.24000,A3 101.52500,A4 -55.90380,A5 -46.17160,A6 45.65050,E1 0.00000}
END

So the result from RoboDK will run on the robot, but I can not touch-up/reteach the position, i.e. online programming, using the teach-pendant.

那么有没有办法,RoboDK将产生太瓦o files, i.e. a .src file and a .dat file, which can be transferred directly over to the real robot, and then also be able for online programming editing afterwards?


Attached Files Thumbnail(s)


.txt KRL.txt(尺寸:1.5 KB /下载:2022世界杯国家队名单152)
.txt RoboDK-postprocessorResult.txt(Size: 1.27 KB / Downloads: 162)
#2
Did you try the KUKA KRC4 DAT post processor?

//www.sinclairbody.com/doc/en/Post-Processor...SelectPost

Jeremy
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间 and by watching tutorials on ourYoutube Channel.


#3
(01-12-2022, 09:07 PM)Jeremy Wrote:Did you try the KUKA KRC4 DAT post processor?

//www.sinclairbody.com/doc/en/Post-Processor...SelectPost

Jeremy

Hi Jeremy.

Thanks for your reply. Ahh, I was a making a big mistake :) I was going to "Program" --> "Add/Edit postprocessor" and then beleved that I was actually using that given one. So thanks for linking the tutorial, that showed that I should right click on the given robot and then use "Select postprocessor". Make more sense :) Sorry for this.

However.... I then did the right way of select "KUKA KRC4 DAT", which successfully gave me 2 files, i.e. a .src and .dat file, which is shown in the attachment.

But:

在我的程序中,我第一次搬到两个位置,which is defined in the base frame of the KR50 robot. Then I change frame to e.g. "Ceiling frame" and then move to two other position there, "Top" and "Top 2".

Then something is missing. Because the dat file shows that the BASE_NO is always reference to the same frame, i.e. the base frame.

As you can see in the code below, the dat file is only referring to P1,P2,P3,P4 where all these points are referring the BASE_NO 1.

And also, this makes me think about, that the names in the program tree is called "Home", "NewPos", "Top" and "Top 2". So there is something missing between the program tree and the final .src and .dat file.

One idea: Is it because I am not use Python here? I.e. should I make all this from the Python program, so that it can see the link from the program tree, i.e. "Home" to write exactly "Home" in the .dat file? :)
Code:
&ACCESS RVP
&REL 1
&COMMENT Generated by RoboDK
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM EDITMASK = *
DEFDAT Prog2

DECL E6AXIS XP1={AXIS: A1 0.96375,A2 -89.94240,A3 89.94240,A4 90.00030,A5 -7.28648,A6 -90.00030}
DECL FDAT FP1={TOOL_NO 1,BASE_NO 1,IPO_FRAME #BASE,POINT2[] " ",TQ_STATE FALSE}
DECL PDAT PPDAT1={VEL 100.000,ACC 100.000,APO_DIST 1.000,GEAR_JERK 50.0000,EXAX_IGN 0}
DECL E6AXIS XP2={AXIS: A1 -47.94000,A2 -123.69000,A3 97.09000,A4 89.41000,A5 47.94000,A6 -89.12000}
DECL FDAT FP2={TOOL_NO 1,BASE_NO 1,IPO_FRAME #BASE,POINT2[] " ",TQ_STATE FALSE}
DECL PDAT PPDAT2={VEL 100.000,ACC 100.000,APO_DIST 1.000,GEAR_JERK 50.0000,EXAX_IGN 0}
DECL E6AXIS XP3={AXIS: A1 27.95340,A2 -68.34080,A3 42.58620,A4 -39.75510,A5 32.10980,A6 35.16840}
DECL FDAT FP3={TOOL_NO 1,BASE_NO 1,IPO_FRAME #BASE,POINT2[] " ",TQ_STATE FALSE}
DECL PDAT PPDAT3={VEL 100.000,ACC 100.000,APO_DIST 1.000,GEAR_JERK 50.0000,EXAX_IGN 0}
DECL E6AXIS XP4={AXIS: A1 28.13540,A2 -75.47550,A3 81.95750,A4 -107.18400,A5 21.03480,A6 108.33200}
DECL FDAT FP4={TOOL_NO 1,BASE_NO 1,IPO_FRAME #BASE,POINT2[] " ",TQ_STATE FALSE}
DECL PDAT PPDAT4={VEL 100.000,ACC 100.000,APO_DIST 1.000,GEAR_JERK 50.0000,EXAX_IGN 0}

ENDDAT


Attached Files Thumbnail(s)


.rdk TestingKRC4 postprocessor.rdk(Size: 4.39 MB / Downloads: 171)
#4
Two things,

You should add an ID at the end of your frame name: Ceiling Frame 2

Exporting the name of the target is not supported with this post processor.

I will try to add this feature in the next release of RoboDK.

Jeremy
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间 and by watching tutorials on ourYoutube Channel.


#5
(01-13-2022, 08:20 PM)Jeremy Wrote:Two things,

You should add an ID at the end of your frame name: Ceiling Frame 2

Exporting the name of the target is not supported with this post processor.

I will try to add this feature in the next release of RoboDK.

Jeremy

Hi Jeremy.

Thanks for your reply. First of all, I wondered why I did not get a notification of your reply. :)

But what do you mean with adding a ID at the end of the frame :" Ceiling Frame 2" ?

(01-17-2022, 10:09 AM)christian.hansen Wrote:
(01-13-2022, 08:20 PM)Jeremy Wrote:Two things,

You should add an ID at the end of your frame name: Ceiling Frame 2

Exporting the name of the target is not supported with this post processor.

I will try to add this feature in the next release of RoboDK.

Jeremy

Hi Jeremy.

Thanks for your reply. First of all, I wondered why I did not get a notification of your reply. :) Update: I saw that I could "subscribe" to this thread. I have done that now.

But what do you mean with adding a ID at the end of the frame :" Ceiling Frame 2" ?
#6
Literally, just change the name of the frame in RDK so that it has a number at the end of it.
You might have to reselect the frame in the setref instruction (right-click->"set frame link")

Jeremy
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间 and by watching tutorials on ourYoutube Channel.


#7
(01-17-2022, 09:11 PM)Jeremy Wrote:Literally, just change the name of the frame in RDK so that it has a number at the end of it.
You might have to reselect the frame in the setref instruction (right-click->"set frame link")

Jeremy

Ok, I for it.

But why should I change the frame name to "Ceiling frame 2", when the robot program has no frame named "Ceiling frame 2"? See attachment...


Attached Files Thumbnail(s)

#8
The way the post-processor is built right now, it uses a "BASE" + "ID".
The robot base will be BASE 1 and is you add "2" after the frame name it will become "BASE 2"

Jeremy
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间 and by watching tutorials on ourYoutube Channel.


#9
Just to catch up on this one.

Will this be added in the next release, and if yes, when will this be launched approximately?

Or was this already well functioning in the latest release?

Just wanted to clear up my understanding of your last comment.. :)

(01-18-2022,下午12:03)Jeremy Wrote:The way the post-processor is built right now, it uses a "BASE" + "ID".
The robot base will be BASE 1 and is you add "2" after the frame name it will become "BASE 2"

Jeremy

(01-26-2022, 09:59 PM)christian.hansen Wrote:Just to catch up on this one.

Will this be added in the next release, and if yes, when will this be launched approximately?

Or was this already well functioning in the latest release?

Just wanted to clear up my understanding of your last comment.. :)

Ahh...

Now I think I got it :D

So this could actually work pretty fine, as long as I remember your comment about "name" + "ID".

(01-18-2022,下午12:03)Jeremy Wrote:The way the post-processor is built right now, it uses a "BASE" + "ID".
The robot base will be BASE 1 and is you add "2" after the frame name it will become "BASE 2"

Jeremy

(01-26-2022, 09:59 PM)christian.hansen Wrote:Just to catch up on this one.

Will this be added in the next release, and if yes, when will this be launched approximately?

Or was this already well functioning in the latest release?

Just wanted to clear up my understanding of your last comment.. :)

(01-18-2022,下午12:03)Jeremy Wrote:The way the post-processor is built right now, it uses a "BASE" + "ID".
The robot base will be BASE 1 and is you add "2" after the frame name it will become "BASE 2"

Jeremy

(01-26-2022, 09:59 PM)christian.hansen Wrote:Just to catch up on this one.

Will this be added in the next release, and if yes, when will this be launched approximately?

Or was this already well functioning in the latest release?

Just wanted to clear up my understanding of your last comment.. :)

Ahh...

Now I think I got it :D

So this could actually work pretty fine, as long as I remember your comment about "name" + "ID".

Now also with screen dump of the .src file...


Attached Files Thumbnail(s)

#10
Yes, this feature existed for a few years now.

Jeremy
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间 and by watching tutorials on ourYoutube Channel.






Users browsing this thread:
3 Guest(s)