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: C:/RoboDK/Posts/.

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

You can easily select a post processor by right clicking a robot or a program. The choice of a post processor is assigned to a robot, therefore, changing the post processor assigned to a program will update the post processor used by all programs assigned to the same robot.

To select a 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).

Follow these steps 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 Go➔Debug (F5) to preview the result. Make changes if necessary. Depending on the text editor you use you may have to select Run➔Run module (F5) instead.

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

This section shows how you can modify an existing post processor to force an axial movement using joint values instead of Cartesian values. In this example we’ll see how to apply this change for an ABB IRC5 robot controller.

1.Find the programming manual of your 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 using higher speeds when generating a program from 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 PLC

Aubo: for AUBO robot controllers

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

Doosan: for Doosan collaborative robots

Epson: for Epson robot controllers

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

HCR: for Hanwha robot controllers

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

Omron: for Omron/Techman robot controllers

OTC: for Daihen OTC robot controllers

Panasonic: For Panasonic PRG programs

Precise: for Precise Scara robots

Robostar: for Robostar robot controllers

Siasun: for Siasun robot controllers

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

Techman: for Omron/Techman robot controllers

Universal Robots: for UR robots, it generates linear movements as pose targets

Universal Robots URP: for UR robots, it generates a URP that can be loaded and modified in Polyscope (the UR robot controller)

Universal Robots_RobotiQ: for UR robots including support for RobotiQ gripper

Universal Robots_MoveP: for UR robots, it generates linear movements as MoveP commands

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.