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

Postprocessing not working for KUKA robots

#1
Hi, after updating to the latest RoboDK version I can't generate any program for KUKA robot, all postprocessors except KUKA_KRC1_DAT.py produces the following error.

Code:
Using Python version: sys.version_info(major=3, minor=11, micro=9, releaselevel='final', serial=0)
RoboDK Post Processor: C:\RoboDK\Posts\KUKA_KRC4.py
Using Python version: sys.version_info(major=3, minor=11, micro=9, releaselevel='final', serial=0)
RoboDK Post Processor: C:\RoboDK\Posts\KUKA_KRC2.py
Invalid Python version or post processor not found. Make sure to download the latest version of RoboDK.
Select Tools-Options-Python and select a supported Python version
This script was executed using Python 3.11.9
Information about the error:
NameError("name 'DEFAULT_HEADER' is not defined")
Traceback (most recent call last):
  File "C:\RoboDK\Posts\KUKA_KRC4.py", line 39, in <module>
    from libspp.KUKA_KRC4 import RobotPost as BasePost
  File "KUKA_KRC4.py", line 61, in init KUKA_KRC4
    # Set to True to include subprograms in the main program. Otherwise, programs can be generated separately.
  File "C:\RoboDK\Posts\KUKA_KRC2.py", line 56, in <module>
    class RobotPost(BasePost):
  File "C:\RoboDK\Posts\KUKA_KRC2.py", line 148, in RobotPost
    HEADER = DEFAULT_HEADER
             ^^^^^^^^^^^^^^

I managed to solve the problem by commenting out the following line HEADER = DEFAULT_HEADER in the KUKA_KRC2.py, but I'm not sure is it ok.
#2
You can replace the HEADER variable of your KUKA post processor by this variable:
Code:
HEADER = '''

; 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

'''
We are working on an update to fix this.
#3
The update is ready, you should be able to use the KUKA post processors with the latest version published a few minutes ago without issues:
https://robodk.com/download
#4
Hi Albert, thanks for reply. Unfortunately the problem is still here. I'm not sure if I installed the latest version.
I downloaded Install-RoboDK-64-v5.9.4.25453.exe from site and installed it.
In the Help -> About menu I see the following version RoboDK v5.9.4.25452-Release date: 2025-10-28

So clearly build version from file name and from About window are different.
#5
The latest version of the installer for Windows should be: Install-RoboDK-64-v5.9.4.25461.exe.

Can you try again? Make sure to clear cache and refresh the download page.
#6
Hi, today I downloaded new version v5.9.4.25460 and I confirm that the problem was solved.
Thanks for quick fix.
#7
Perfect, thank you for letting us know.
  




Users browsing this thread:
1 Guest(s)