Simulating a Main Program Calling Multiple Subprograms

You can simulate a main program while calling multiple Subprograms.


Before you begin: Subprograms can be called by the main ISO program or some other Subprogram during their own execution. It can be a part of same ISO file or it can be a part of another ISO file. The sequence is:
  • Main process jumps to another part of ISO file which can be same file or some other file
  • After processing a few blocks it jumps back to the previous part where it was before the call
  • This whole process can be done multiple times using Subprograms to call another Subprogram or themselves.

Continuation deals with the simulation when a large ISO file (for a program or Subprogram) is split into many smaller files. In this case the next file should be loaded whenever end of current file is reached.

Note: Calling a Subprogram from another Subprogram is not supported. Each Subprogram file has only one Subprogram. Subprogram simulations is supported only for Milling Machines (without interchangeable heads).
Note: Each Subprogram panel is independent of each other when it comes to persisting the panel location in the session. When we change the location of one Subprogram panel in the session during Simulation (by moving it to different location), then it does not affect the other Subprogram Panel. And this new location is persisted, and these location values are used next time the same Subprogram Panel is launched.

  1. On generating the NC Code, multiple NC code files will be generated one for each Subprogram from the APT file and is shown in the main program dialog box in the Additional NC file list.
  2. Select the program and click Play.
    During the simulation of NC code, only the current Subprogram which is being simulated along with the main NC Code file in the live simulation browser is shown.
    • 1 - Main NC code file
    • 2 -Current simulated Subprogram (name of the Subprogram appears at the top of the panel)
    • 3 -Current simulated ISO line is highlighted


  3. Close the simulation player, the Subprogram panel disappears from the browser.
  4. Select a line corresponding to the Subprogram in the main NC code file.
    The corresponding Subprogram panel opens.
    Note: Right-click the Subprogram ISO line in the Main NC code file and select Simulate this line from the contextual menu to launch the simulation for the entire Subprogram.
  5. Select a ISO line in the Subprogram
    The machine is positioned based on the machine DOFs for that particular ISO line.