Post Processors are a key step in Offline Programming because they allow flexibility to support any robot controller. A robot post processor defines how robot programs must be generated for a specific robot controller.
The conversion from the RoboDK simulation to a specific robot program is done by a Post Processor. Each robot has a post processor assigned to it by default. The post processor is used when the program is generated offline, as shown in the Generate Program section (by right clicking a program, then, selecting Generate Robot Program).
RoboDK comes with many post processors supporting many robot controllers, listed in the Available Post Processors section. Alternatively, it is possible to create customized post processor or modify an existing post processor. All available post processors are in the folder:
One post processor is a PY file (each post processor is defined by a Python script). It is possible to manually add, modify or delete the files in the Posts folder of RoboDK. If you have been provided a RoboDK post processor (PY file) it should be placed in the Posts folder so that it can be selected from RoboDK.
This section shows how to select, edit or create a post processor and use it with your robots in RoboDK. A quick introduction is available in the following video: https://www.robodk.com/help#PostProcessor
Note: Most robot brands have different controller versions. It is important to select the right post processor to generate appropriate robot programs supported by a specific robot controller.
Important: Each robot has a specific post processor assigned to it by default. The default selection might not generate appropriate programs for a specific robot controller. In that case it is required to select the post processor for the right robot controller.
To select a specific post processor for a robot:
1. Right click a robot or a program
2. Select Select Post Processor
3. Choose a post processor from the list
4. Select OK.
The change is now applied and the program can be generated again to see the result.
Note: The selection of a Post Processor is linked to a specific robot. Changing the post processor of a program will update the post processor for all programs linked to the same robot.
As an alternative, it is also possible to select the post processor by following these steps:
1. Open the robot panel (double click a robot)
2. Select Parameters
3. Select your post processor in the Robot brand box, as shown in the following image.
Tip: It is possible to quickly preview the output of each post processor by double clicking its PY file in the C:/RoboDK/Posts/ folder. More information available in the next section.
It is possible to modify existing post processors or create new post processors. Post processors must be placed in the folder C:/RoboDK/Posts/ so that they can be selected in RoboDK. The previous section describes how to link a specific robot to a post processor.
Each post processor is one PY file. It is possible to rename the file or copy files from/to the C:/RoboDK/Posts/ folder to share different post processors. To delete an existing post processor script, simply delete the corresponding PY file in the Posts folder.
Post processors can be edited using any text editor or a Python editor (Python IDLE). Using the Python editor allows to quickly debug and evaluate a sample program at the end of the file.
Python should be installed to test and use the post processors properly (Python is installed by default with RoboDK).
To modify an existing post processor:
1. Select Program➔Add/Edit Post Processor
2. Select an existing post processor
3. Select OK. A text editor will open and the program.
4. Select Run➔Run module (F5) to preview the result. Make any changes if necessary.
Alternatively, it is possible to edit a post processor manually:
1. Go to the post processors folder: C:/RoboDK/Posts/
2. Open a PY file with Python IDLE (right click➔ Edit with IDLE) or other text editor
3. Make the desired changes
4. Run the file to test the result: Select Run➔Run module (F5 by default) from Python IDLE.
Alternatively, it is possible to edit this file using a text editor and run it with Python by double clicking it.
Tip: It is possible to change the default editor for post processors in RoboDK by selecting Tools➔Options➔Other and providing the editor path in the Python editor command.
Important: If a text editor such as Notepad++ is used, it is important to replace tabs by 4 spaces. Otherwise, we will get a TabError saying that there is an inconsistent use of tabs and spaces in indentation.
This section shows how to make a small change for an existing post processor.
As an example, the following 3 changes will be made to the existing KUKA KRC4 post processor:
● Override the maximum speed to 500 mm/s. Even if the robot is programmed to move faster, the speed will be limited to 500 mm/s in the post processor.
● Generate each program as a separate file and force programs to have 3000 lines of code per program at most. Large programs will be divided into smaller programs and called sequentially.
The previous section shows how to open an existing post processor for editing:
1. Select Program➔Add/Edit Post Processor
2. Select KUKA_KRC4
3. Select OK. The post processor will be shown in the Python IDLE editor.
The following sections show how to make the suggested changes on the text editor.
Follow these steps to set a speed limit of 500 mm/s and avoid setting higher speeds using RoboDK:
1. Locate the setSpeed function definition (def setSpeed)
Add the following line before generating the $VEL.CP output which will
change the speed in m/s:
speed_mms = min(speed_mms, 500)
Note: A default speed of 200 mm/s is defined in the HEADER variable, at the top of the post processor ($VEL.CP=0.2). This default speed can also be changed if the speed is not modified from RoboDK.
Add the following changes to avoid adding more than one program per file and to generate programs with 3000 lines of code at most:
1. Set the variable MAX_LINES_X_PROG to 3000
2. Set the variable INCLUDE_SUB_PROGRAMS to False
Note: The variable MAX_LINES_X_PROG may be overridden if the maximum lines per program is specified from the RoboDK Program Options menu. Modify the __init__ section of the post processor to avoid changing this variable from the RoboDK settings.
By default, the following post processors are available in RoboDK:
● ABB_RAPID_IRC5: for ABB IRC5 robot controllers
● ABB_RAPID_S4C: for ABB S4C robot controllers
● Adept_Vplus: for Adept V+ programming language
● Allen_Bradley_Logix5000: for Allen Bradley Logix5000 PCL
● CLOOS: for CLOOS robot controllers
● Comau_C5G: for Comau C5G robot controllers
● Denso_PAC: for Denso RC7 (and older) robot controllers (PAC programming language)
● Denso_RC8: for Denso RC8 (and newer) robot controllers (PacScript programming language)
● Dobot: for educational Dobot robots
● Fanuc_R30iA: for Fanuc R30iA and R30iB robot controllers
● Fanuc_R30iA_Arc: for Fanuc Arc welding
● Fanuc_RJ3: for Fanuc RJ3 robot controllers
● GCode_BnR: for B&R robot controllers
● GSK: for GSK robots
● HIWIN_HRSS: for HIWIN robots
● KAIRO: for Keba Kairo robot controllers
● KUKA_IIWA: for KUKA IIWA sunrise programming in Java
● KUKA_KRC2: for KUKA KRC2 robot controllers
● KUKA_KRC2_CamRob: for KUKA CamRob milling option
● KUKA_KRC2_DAT: for KUKA KRC2 robot controllers including DAT data files
● KUKA_KRC4: for KUKA KRC4 robot controllers
● KUKA_KRC4_Config: for KUKA KRC4 robot controllers with configuration data in each line
● KUKA_KRC4_DAT: for KUKA KRC4 robot controllers including DAT data files
● Kawasaki: for Kawasaki AS robot controllers
● Mecademic: for Mecademic Meca500 robot
● Mitsubishi: for Mitsubishi robot controllers
● Motoman/Yaskawa: for different Motoman robot controllers using Inform II and Inform III (JBI)
● Nachi_AX_FD: for Nachi AX and FD robot controllers
● OTC: for Daihen OTC robot controllers
● Panasonic: For Panasonic PRG programs
● Precise: for Precise Scara robots
● Siemens_Sinumerik: for Siemens Sinumerik ROBX robot controller
● Staubli_VAL3: for Staubli VAL3 robot programs (CS8 controllers and later)
● Staubli_VAL3_InlineMove: to generate Staubli VAL3 programs with inline movement data
● Staubli_S6: for Staubli S6 robot controllers
● Toshiba: for Toshiba robots
● Universal_Robots: for UR robots, generates linear movements as pose targets
● Universal_Robots_RobotiQ: for UR robots including support for RobotiQ gripper
● Universal_Robots_joints: for UR robots, generates linear movements as joint targets
● Yamaha: for Yamaha robots
The following video shows an overview of
Post Processors in RoboDK:
Reference documentation for each method in
the post processor is available online:
All post processors use the robodk.py
The robodk.py module provides tools for pose operations (multiplications, inverse, …) and conversions between poses to Euler angles in different formats, among other things.
Note: By default, Python is installed with RoboDK and the robodk.py module is added to the Python path.
Documentation is available online to learn
about Python programming:
When a program is generated, a preprocessed/universal Python program is generated and saved in a local temporary folder. The preprocessed program is linked with the right post processor (selected by the user in RoboDK). The post processor defines a RobotPost class that generates the desired code.
The precompiled programs and executed with Python.
Tip: On Windows, the preprocessed programs are saved in the C:/Users/username/AppData/Local/Temp folder (type %TEMP% in windows file explorer). These programs can also be used for debugging new post processors.