Post Processors

Post Processors are a key step in Offline Programming because they can generate robot programs for a specific robot controller. Robot programming must follow vendor-specific programming rules, these rules are implemented in the post processor. 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 is linked to a post processor which will define a specific robot programming style. 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:


Select a Post Processor

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.

Post Processors - Image 1    Post Processors - Image 2

The change is now applied and the program can be generated again to see the result.

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.

Post Processors - Image 3


Modify a Post Processor

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.

Post Processors - Image 4

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.

Post Processors - Image 5


Modification Examples

This section shows how to make small changes for an existing post processor. Most post processors have some variables that can be easily modified to modify or activate vendor-specific robot programming features.

As an example, the following changes will be made to existing ABB and KUKA post processors:

   Set a joint movement to generate the motion command using joint angles information.

   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 your post processor. For example, for KUKA KRC4 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 a text editor (or Python IDLE).

Impose a movement using joint angles

The following steps show how to modify an existing post processor to force an axial movement using joint angles. In this example we show how to apply this change for an ABB IRC5 robot controller.

1.Find the programming manual of your specific robot controller. In this example we use the ABB IRC5 RAPID programming manual.

2.Look for the joint movement instructions. In this case, ABB’s absolute joint movement command is called MoveAbsJ. This command requires a jointtarget variable that defines the joint axes.


Post Processors - Image 6

3.Select Program➔Add/Edit Post Processor and select the post processor you are currently using to modify it. If you are currently using a customizable post processor it will be selected by default.

4.You should look for the MoveJ function inside the post processor. This function defines the way post processors generate the joint motion commands. Alternatively, RoboDK uses MoveL for linear movements. Using Python programming language, modify the line that is added to the program file to provide joint angle information, as shown in the following image.

Post Processors - Image 7

5.Finally, you may need to modify the way the post processor converts the joint angles or the pose to a string. The functions angles_2_str and pose_2_str define how the joint angles and a pose, respectively, is converted to text.

Post Processors - Image 8

Most RoboDK post processors use joint data for joint movements and Cartesian coordinates for linear movements. It is recommended to always start the first point in a sequence of linear movements as a joint movement, specifying joint coordinates. This avoids starting a program with the wrong robot configuration and reaching a singularity or axis limits.

Force a speed limit

Follow these steps to set a speed limit of 500 mm/s and avoid setting higher speeds using RoboDK. In this example we assume we are using a KUKA KRC2 or KRC4 controller:

1.Locate the setSpeed function definition (def setSpeed)

2.Add the following code before generating the $VEL.CP output which will change the speed in m/s:           
speed_mms = min(speed_mms, 500)

Post Processors - Image 9

Generate one program per file

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

Post Processors - Image 10


Available Post Processors

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 module:

The module provides tools for pose operations (multiplications, inverse, …) and conversions between poses to Euler angles in different formats, among other things.

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 are executed with Python.