Creating and Editing a Subroutine

You can define a sequence of auxiliary machine motions (such as machining axis changes, PP instructions, machine rotation, or machine instructions), in a machine in a manufacturing program. This sequence is a machining subroutine. Subroutines are stored in the machine itself, but also in the programming representation of the manufacturing cell. This allows you to define subroutines locally and to avoid modifying the machine. Subroutines take parameters as input and are based on IO behavior modeling concepts. Subroutines can also be directly defined in a tool change to define the simulation behavior of the tool change. With this option, NC output is based on tool change syntax, and the PP syntax of the subroutine is ignored. Subroutines generate sub-programs in robot OLP output.


Before you begin: Select a machine or a manufacturing cell in the Activities Process Tree.
  1. In the Manage Subroutines panel that appears, click Add to create a new subroutine.
  2. Enter a name for the subroutine, such as Subroutine.X.
  3. Click Edit to edit the subroutine with the Sequencing Editor. For more information, see About the Sequencing Editor.
  4. In the Sequencing Editor that appears, in the Useable In panel, add the required IO parameters. For more information, see Creating IOs.
  5. In the Sequential toolbox, insert sequencing instructions. For more information, see Using the Sequencing Editor.
  6. In the Machining toolbox, insert machining instructions:

You can now run the subroutine.