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

生成的机器人program doesn't work with Python

#1
When I right-click on python file to "Generate Robot Program (F6)" it doesn't do anything (creation of SRC file would be expected). It starts the simulation, which runs properly but doesn't save any output file. To make sure it is not a post-processor issue, I created another program in the same station, this time as set of RoboDK instructions - that one always generates src output properly.
Attached is picture to clarify the issue and rdk file. I'm using the latest version of the software.


Attached Files Thumbnail(s)


.rdk New Station (1).rdk(Size: 320.9 KB / Downloads: 243)
#2
Hello,

I was able to generate the .src file in a new VS Code window.

Output:
Code:
&ACCESS RVP
&REL 1
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM EDITMASK = *
DEF Prog1 ( )


; 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.4 for KUKA KR 6 R900 sixx on 06/07/2021 09:41:36
; ---- 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]
; --------------------------
; ---- Setting tool (TCP) ----
$TOOL = {FRAME: X 0.000,Y 0.000,Z 0.000,A 0.000,B 0.000,C 0.000}
; --------------------------
PTP {A1 0.00000,A2 -68.54280,A3 87.51750,A4 0.00000,A5 -108.97500,A6 90.00000,E1 0.00000}
LIN {X 600.000,Y 0.000,Z 760.000,A -90.000,B 0.000,C 0.000,E1 0.00000}
LIN {X 433.131,Y -191.850,Z 800.000,A -90.000,B 0.000,C 0.000,E1 0.00000}
LIN {X 433.131,Y -191.850,Z 840.000,A -90.000,B 0.000,C 0.000,E1 0.00000}
LIN {X 433.080,Y -191.700,Z 800.000,A -90.000,B 0.000,C 0.000,E1 0.00000}
LIN {X 433.062,Y -194.700,Z 800.000,A -90.000,B 0.000,C 0.000,E1 0.00000}
LIN {X 433.062,Y -197.700,Z 800.000,A -90.000,B 0.000,C 0.000,E1 0.00000}
LIN {X 433.131,Y -195.000,Z 800.000,A -90.000,B 0.000,C 0.000,E1 0.00000}
LIN {X 433.131,Y -195.000,Z 760.000,A -90.000,B 0.000,C 0.000,E1 0.00000}
LIN {X 433.143,Y -166.050,Z 800.000,A -90.000,B 0.000,C 0.000,E1 0.00000}
LIN {X 433.143,Y -166.050,Z 840.000,A -90.000,B 0.000,C 0.000,E1 0.00000}
PTP {A1 0.00000,A2 -68.54280,A3 87.51750,A4 0.00000,A5 -108.97500,A6 90.00000,E1 0.00000}
END


I was using the KUKA KRC4 Post Processor. I recommend you to select Set Default Settings under Options.
Let me know if that works.
#3
(07-06-2021, 01:49 PM)Vineet Wrote:Hello,

I was able to generate the .src file in a new VS Code window.

Output:
[...]

I was using the KUKA KRC4 Post Processor. I recommend you to select Set Default Settings under Options.
Let me know if that works.

Well, it did work for me for long time before, with older versions of RDK - now it somehow stopped and cannot be run even in old version of RDK.
Yes, I did set default options but still no success.

One thing I observed:
I deleted RDK Prog2 so only had python Prog1 in the station.
When I right-click to "Generate Robot Program" only simulation starts and the bottom left corner reads "Running python script..."
When I click F6, however, the bottom left corner reads: "No available programs to generate." and simulations/script doesn't start.

Please would you help further to understand and fix this issue?
#4
F6 will only generate robot program of a Program in RoboDK and not a script. I have noted it down and will forward this to our Dev guys to see if this needs to be changed or not.

You should try to remove most of your code in your Python script and try generating the robot program again. Make sure you have the robot.MoveJ instruction in your script. There is some part in your script which is not running properly on your system.
Let me know how it goes.
#5
(07-07-2021, 08:19 PM)Vineet Wrote:F6 will only generate robot program of a Program in RoboDK and not a script. I have noted it down and will forward this to our Dev guys to see if this needs to be changed or not.

You should try to remove most of your code in your Python script and try generating the robot program again. Make sure you have the robot.MoveJ instruction in your script. There is some part in your script which is not running properly on your system.
Let me know how it goes.
Thanks, Vineet for your help.
I do agree there is something not working properly on my RDK system. I did reduce python code, used robot.MoveJ instruction but don't think this is the way to resolve the problem. We need to find the root cause rather than tweaking the code so it suddenly starts working again - without understanding what's going wrong. There isn't a problem with the code (the same code worked before and generated perfect src output). The problem is somewhere in the system and I'm seeking the way to diagnose it and fix it. Again - playing with python code is not the way (I did however as you asked but no results).
有可能完全重置RoboDK设施tion? Or remove some temporary files, clean registry, etc. I did try standard Windows uninstall and reinstallation but the problem still persists. Is there any log/debug files I can generate so you can review to trace the problem?

Many thanks for all your help so far.
#6
@Vineet,

I cannot reinstall my entire Windows (company rules). Is there any way to reset the relevant Windows registries associated with RDK? So that installing RDK from scratch would work in the same way as if it was a fresh (first-time) installation?

I did uninstalled and re-installed RDK few times but it still doesn't work. New installation of RDK somehow remembers old settings, most likely including those corrupted ones too.

Please help, thanks!
#7
We are unable to reproduce this issue with the RDK file you sent in the first post of this thread.

Make sure you are using the latest version of RoboDK. Also, you can revert all settings back to default by selecting Tools-Options-Set default settings.

Let us know if you still have issues.
#8
Yes, I still have the issue with this. None of the suggestions above have fixed the problem. I use the latest version, reinstalled few times, on default settings - robot program doesn't generate from python file. I'm happy to let you in via remote desktop if you are willing to investigate this issue with RDK.
#9
The problem went away only after complete reinstallation of Win10.




Users browsing this thread:
1 Guest(s)