The test NC-code generation

The trial NC-program generation can be performed by pressing the images/download/attachments/128539497/btn-run.jpg button on the main toolbar or by pressing the [F9] key. If the technological commands processing programs are not compiled at this moment, the compilation will be activated automatically. If there are errors during the compilation, the trial running will not be performed.

The loaded files of technological commands are the input data for the NC-program generation. The NC-program is formed using the technological files, which are marked by the flags in the list.

The algorithm of generation is described below:

  1. The system reads the next command form the file of the technological commands.

  2. The system analyses the command code and according to the command parameters define the predefined <CLD> array and predefined variables.

  3. If the corresponding program for the command is activated then the program is executed.

  4. If the corresponding mask for the command is activated then the NC code line is generated by mask.

Note: So for any command both program and mask can be activated In this case the program will be executed first and mask later. If both mask and program are not activated then the command will be ignored.

  1. If in result of the previous actions the NC-code line is generated then the subprogram <Filter> is executed. Usually this subprogram is used for the replacement of some elements in the NC block before the final output to the NC program.

The corresponding operators form the NC block from the mask or from the processing program. If the processing program is used then only the identifiers and values the same registers are output that was changed after the previous block output.

The NC-program will be saved in the NC-program text window (it is in the right side of the main window) and in the file with the name, defined in the field of the NC-program name. If this field is empty then program is not saved in a file. If the NC-program contains subroutines, then they can also be displayed in separate files, in this case will have additional tabs, switching to which you can view the generated subroutines text.

The debug information, which is formed in the processing programs, is written in the debug window.

If there are errors during the generation process, they will be written in the system messages window.

After the faultless NC code generation there is the link between the NC code and the CLData commands. By double click on the command name in the window of CLData commands the corresponding line in the NC code will be selected. Conversely, by double click on the code line in the NC program window the corresponding CLData command will be selected.

See also:

The main window