Generate all programs in one file

This example will show you how you can change the default behavior of the KUKA KRC4 post processor to generate a main program with its subprograms in the same file.

Make sure thepost processor editorplug-in is enabled and follow these steps to make the post processor modifications:

1.SelectProgramPost Processor Editor.

2.Select the post processor you want to customize (KUKA KRC4).

3.SelectOK. A new window will open, and you’ll see the variables you can modify as shown in the following image.

4.Set theInclude Sub Programsvariable to True instead of False.

5.SelectSave Post Processor as…

6.Enter a new name to save it (the default name uses the modification date).

Post Processors - Image 8

You should now have a new post processor in the Posts folder of RoboDK. You can now update your project to use this new post processor by following these steps:

1.Right click your robot.

2.SelectSelect Post Processor.

3.Select the new post processor you created.

4.Generate your programs again to see the result.

You could also make these changes using a text editor. Follow these steps to change the default Python code of the post processor:

1.SelectProgramAdd/Edit Post Processor

2.Select your post processor. For example, for KUKA KRC4 selectKUKA_KRC4.

3.SelectOK. The post processor will be shown in a text editor.

4.Set the variableMAX_LINES_X_PROGto 3000.

5.Set the variableINCLUDE_SUB_PROGRAMSto True.

Post Processors - Image 9