Introduction
What is a postprocessing system in general?
A postprocessing system is a program that converts a toolpath generated by the CAM system from a universal format (CLData) into output files understandable by a specific CNC machine.
CLData (cutter location data) is a set of commands like tool loading, movements, spindle and coolant switch on/off, etc.
A postprocessing program gets it as an input and converts to the format which is required by the exact CNC machine, for example G-code text file. There are a lot of CNC machines and each type of machine can use their own format of files. Therefore the postprocessing system should contain at least two parts.
- The first is independent from the exact type of machine part. It must be able to read the input CLData and provide it for further convenient processing.
- The second part is the adjustable part. It should provide the flexible way to translate the universal commands into the specific output files.
Main program modules of the system
From the point of view of program modules, it looks like the one shown below.
The first main starting module is an InpCore.exe utility. It's a console application which means that it has no user interface, it has only a console window. Inside this console window you can type some command line parameters like the name of the input CLData file (stc-project), the name of the postprocessor and some additional settings (output file name, program number etc.) and then run the process of translation. This utility reads the input CLData file and starts to call a special kind of subroutines - command handlers - which are individual for each command type. For example for the LoadTool CLData command it will call the subroutine with OnLoadTool name, for Spindle command - OnSpindle subroutine, for Goto command - OnGoto subroutine etc. By default this command handlers are empty and do nothing. To be possible to override this empty behavior we need to load the second part of the post-processing system - the postprocessor itself.
The postprocessor is an additional dynamically loading program module with the dll extension. The name can vary. For example FanucPostprocessor.dll. It can implement some of the command handlers which will override the empty behavior and will write to the output file specific instructions corresponding to the command for the exact CNC machine. We can easily change the postprocessor to another one, for example HeidenhainPostprocessor.dll, to get the resulting G-code for another machine. You can make your own postprocessor if you want to have your unique output file content.