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 the post processor editor plug-in is enabled and follow these steps to make the post processor modifications:
1.Select Program➔Post Processor Editor.
2.Select the post processor you want to customize (KUKA KRC4).
3.Select OK. A new window will open, and you’ll see the variables you can modify as shown in the following image.
4.Set the Include Sub Programs variable to True instead of False.
5.Select Save Post Processor as…
6.Enter a new name to save it (the default name uses the modification date).
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.Select Select 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.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 a text editor.
4.Set the variable MAX_LINES_X_PROG to 3000.
5.Set the variable INCLUDE_SUB_PROGRAMS to True.