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

Reference Frame and TCP in every subprogram

#1
Is there an option to put the reference frame and TCP in every subprogram generated by the post processor?
I want to use a program structure where I have one program per station. This program should consist of all approach and retract subprograms for this station. I want to be able to call this subprograms from other programs which I would code manually.
I did not find a better way to achieve this than to create a program where I call all the subprograms of the station and put an
Code:
IF FALSE THEN
...
ENDIF
around the calls so I don't accidentally execute the code:
   

Each subprogram defines the reference frame and TCP:
   

But while generating the program with the post processor (a customized KRC4 DAT pp) RoboDK seems to be smart enough to recognize that it does not need to define the reference frame and TCP for each new subprogram when they didn't change between subprogram calls:

Code:
DEF sws_magazin()

; Program generated by RoboDK v5.5.3 for KUKA KR10 R1100-2 on 01/02/2023 17:27:24
; Using nominal kinematics.
IF FALSE THEN
swsmZuHfSpindelFahren()
swsmHfSpindelAufnehmen()
swsmHfSpindelAblegen()
...
ENDIF
END
GLOBAL DEF swsmZuHfSpindelFahren()
; ---- Setting reference (Base) ----
BASE_DATA[10] = {FRAME: X -836.064,Y -387.605,Z 500.211,A -179.840,B 0.052,C -0.898}
$BASE = BASE_DATA[10]
; --------------------------
; ---- Setting tool (TCP) ----
; TOOL_DATA[1] = {FRAME: X 0.000,Y 0.000,Z 105.400,A 0.000,B -90.000,C 0.000}
$TOOL = TOOL_DATA[1]
; --------------------------
$VEL.CP = 0.30000
;FOLD LIN P1 Vel=0.300 m/s CPDAT1 Tool[1] Base[10];%{PE}%R 8.3.42,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P1, 3:, 5:0, 7:CPDAT1
$BWDSTART=FALSE
LDAT_ACT=LCPDAT1
FDAT_ACT=FP1
BAS(#CP_PARAMS,0.300)
LIN XP1 C_DIS
;ENDFOLD
;FOLD LIN P2 Vel=0.300 m/s CPDAT2 Tool[1] Base[10];%{PE}%R 8.3.42,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P2, 3:, 5:0, 7:CPDAT2
$BWDSTART=FALSE
LDAT_ACT=LCPDAT2
FDAT_ACT=FP2
BAS(#CP_PARAMS,0.300)
LIN XP2 C_DIS
;ENDFOLD
$VEL.CP = 0.02000
;FOLD LIN P3 Vel=0.020 m/s CPDAT3 Tool[1] Base[10];%{PE}%R 8.3.42,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P3, 3:, 5:0, 7:CPDAT3
$BWDSTART=FALSE
LDAT_ACT=LCPDAT3
FDAT_ACT=FP3
BAS(#CP_PARAMS,0.020)
LIN XP3 C_DIS
;ENDFOLD
END
GLOBAL DEF swsmHfSpindelAufnehmen()
$VEL.CP = 0.02000
;FOLD LIN P4 Vel=0.020 m/s CPDAT4 Tool[1] Base[10];%{PE}%R 8.3.42,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P4, 3:, 5:0, 7:CPDAT4
$BWDSTART=FALSE
LDAT_ACT=LCPDAT4
FDAT_ACT=FP4
BAS(#CP_PARAMS,0.020)
LIN XP4 C_DIS
;ENDFOLD
$VEL.CP = 0.20000
;FOLD LIN P5 Vel=0.200 m/s CPDAT5 Tool[1] Base[10];%{PE}%R 8.3.42,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P5, 3:, 5:0, 7:CPDAT5
$BWDSTART=FALSE
LDAT_ACT=LCPDAT5
FDAT_ACT=FP5
BAS(#CP_PARAMS,0.200)
LIN XP5 C_DIS
;ENDFOLD
END
GLOBAL DEF swsmHfSpindelAblegen()
$VEL.CP = 0.20000
;FOLD LIN P6 Vel=0.200 m/s CPDAT6 Tool[1] Base[10];%{PE}%R 8.3.42,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P6, 3:, 5:0, 7:CPDAT6
$BWDSTART=FALSE
LDAT_ACT=LCPDAT6
FDAT_ACT=FP6
BAS(#CP_PARAMS,0.200)
LIN XP6 C_DIS
;ENDFOLD
$VEL.CP = 0.02000
;FOLD LIN P7 Vel=0.020 m/s CPDAT7 Tool[1] Base[10];%{PE}%R 8.3.42,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P7, 3:, 5:0, 7:CPDAT7
$BWDSTART=FALSE
LDAT_ACT=LCPDAT7
FDAT_ACT=FP7
BAS(#CP_PARAMS,0.020)
LIN XP7 C_DIS
;ENDFOLD
END


Unfortunately this is not the behavior that I need.
#2
You can remove the automatic filter that applies to changing the tool and reference/base frames by following these steps:
  • Select Tools-Options
  • Select Program tab
  • Uncheck the option "Filter setting reference and tool frames", towards the bottom right.
#3
(02-01-2023, 09:13 PM)Albert Wrote: You can remove the automatic filter that applies to changing the tool and reference/base frames by following these steps:
  • Select Tools-Options
  • Select Program tab
  • Uncheck the option "Filter setting reference and tool frames", towards the bottom right.

Oh... it's about the only option I didn't try. Thank you very much!
#4
I have the same issue with the positions now. RoboDK does not create a movement to a position when it thinks, that the robot must be in that position anyway because of the prior call to another subprogram. Is there an option too?

Or maybe there is a better way to create station programs into a single program?
  




Users browsing this thread:
1 Guest(s)