01-12-2022, 09:51 AM
(This post was last modified: 01-12-2022, 09:56 AM bychristian.hansen.)
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
And the associated .dat file.
Code from RoboDK using postprocessor KR C4.
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.
So is there a way for, that RoboDK will produce two 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?
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( )
,符合D INI;%{PE}
,符合D BASISTECH INI
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
,符合D USER INI
;Make your modifications here
;ENDFOLD (USER INI)
;ENDFOLD (INI)
,符合D SPTP HOME Vel=100 % DEFAULT ;%{PE}
,符合D 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
,符合D SPTP StacksHome Vel=100 % PDAT1 Tool[2]:ForkNew Base[4]:EUpalletNEW ;%{PE}
,符合D 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
,符合D EXTERNAL DECLARATIONS;%{PE}%MKUKATPBASIS,%CEXT,%VCOMMON,%P
,符合D BASISTECH EXT;%{PE}%MKUKATPBASIS,%CEXT,%VEXT,%P
EXT BAS (BAS_COMMAND :IN,REAL :IN )
DECL INT SUCCESS
;ENDFOLD (BASISTECH EXT)
,符合D USER EXT;%{E}%MKUKATPUSER,%CEXT,%VEXT,%P
;Make your modifications here
;ENDFOLD (USER EXT)
;ENDFOLD (EXTERNAL DECLARATIONS)
DECL MODULEPARAM_T LAST_TP_PARAMS = {PARAMS[]”库卡。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
,符合D 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
,符合D ---- Quickly skip BCO ----
; PTP $AXIS_ACT
;ENDFOLD
,符合D ---- 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.
So is there a way for, that RoboDK will produce two 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?