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

Python: Specific post processor and run mode for machining project

#1
Hi,
I am using a Python script to generate a 3D-printing project. As of yet I have not figured out how to use the ProgramStart, AddProgram, RunCode or MakeProgram methods correctly. The procedure is roughly this:
- user is prompted to choose a geometry file
- object is loaded into RoboDK using

Code:
PrintPart=RDK.AddFile(GeomFile, parent=frame)
- a machining project is added using

Code:
PrintProject=RDK.AddMachiningProject(name,robot)
- the object is added to the machining project:

Code:
PrintProject.setMachiningParameters(part=PrintPart)
This way the printing object is attached to the machining project and RoboDK automatically generates a RoboDK-program. So far so good.
I would now like to translate the RoboDK program into a real robot program. This raises two questions.
1) How can I do this, using a specific post processor?
I am currently using MakeProgram to save the robot program to a folder. This works but is not satisfying, because it uses the KRC2 post processor per default. I need to use another one.
2)其实我do not want to safe the program to a folder, so MakeProgram could be entirely wrong. I would either like to
a) send the program to and run it on the robot. This should refer to RunMode = 6 as I understand it. Or
b) send the program to and run it on the robot independently from RoboDK and the laptop. This should be RunMode = 5 if I got that right.

Please let me know if I left out any crucial information. I can not see which method to use to achieve these goals.
I already tried ProgramStart as it is shown in the API documentation, but it does not seem to work for the automatically generated printing program. On the other side it seems to be the only method that allows me to choose the post processor.
Any advice where to go from here is appreciated.

Best regards
David


Messages In This Thread
Python: Specific post processor and run mode for machining project - byDavidG- 02-12-2019, 04:47 PM



Users browsing this thread:
1 Guest(s)