• Articles
  • Api Documentation
Show / Hide Table of Contents
  • The main page
  • Introduction
  • Organization of the postprocessing system
    • Running the postprocessing
    • Postprocessors' development tools
    • Postprocessor's file set
  • User interface
    • CLData Viewer
      • Main window
      • Postprocessor settings window
      • Registers windows
    • Visual Studio Code
  • How to write postprocessors
    • How to prepare the computer to start writing the postprocessors
  • Postprocessors object model
    • TPostprocessor
    • CLData subsystem
      • ICLDProject
      • ICLDMachineInfo
      • ICLDFile
      • ICLDTechOperation
      • ICLDSub
      • ICLDCommand
    • Input data subsystem
      • Settings.Params
      • InputBox
      • CreateInputBox
    • Output files subsystem
      • TNCFilesManager
      • TNCFile
      • TTextNCFile
      • TSimpleTextNCFile
      • TExternalNCFile
      • TBinaryNCFile
    • Registers subsystem
      • NCBlock
      • NCWord
      • NumericNCWord
      • CountingNCWord
      • TextNCWord
  • Useful functions
    • String functions
      • SameText
      • Pos
      • Copy
      • Replace
      • Transliterate
      • Length
      • Chr
      • Ord
      • StringOfChar
      • Num
      • Str
      • STFloatToStr
      • STTryStrToFloat
      • TryStrToInt
    • Numerical functions
      • Abs
      • Sgn
      • IsEqD
      • IsGeD
      • IsGtD
      • IsLeD
      • IsLtD
      • IsZeroD
      • Refine
      • Round
      • Trunc
      • Sqr
      • Sqrt
    • Trigonometric functions
      • ArcCos
      • ArcSin
      • ArcTan
      • ArcTan2
      • Cos
      • Sin
      • Tan
    • Point, Vector, Matrix, Quaternion functions
      • Main geometrical types
      • Geometrical functions
      • Euler angles and Matrix converter
      • Geometrical objects visualizer
      • Geometrical objects visualizer methods
    • Date-Time functions
      • CurDate
      • CurISODate
      • CurTime
    • Input-output functions
      • CreateInputBox
      • InputBox
      • Log.MessageBox
      • Log.Error
      • Log.Info
      • Log.Warning
      • Print
    • Specific postprocessing functions
      • BreakTranslation
      • Cross
      • FlagIn
      • NextToolNum
      • ToolChange
    • CLData functions
      • CLDProject.FindCommand
      • CurrentFile.FindCommand
      • CurrentFile.Cmd[i], CurrentFile[i]
      • CurrentFile.GetCommandType(int index)
      • CurrentFile.IndexOfCmd
      • CurrentFile.IndexOfCmdName
      • CurrentCmd.FindNextCommand
      • CurrentCmd.Next
      • CurrentCmd.Prev
      • CurrentCmd.NextMotion
      • CurrentCmd.PrevMotion
      • CurrentOperation.NextOp
      • CurrentOperation.PrevOp
      • CurrentOperation.PPFunCommand
      • CurrentOperation.LocalCSCommand
      • CurrentOperation.PlaneCommand
      • CurrentOperation.SpindleCommand
      • CurrentOperation.Tool
      • CurrentOperation.WorkpieceCSCommand
      • CurrentOperation.Props
    • Useful types
      • InpArray<T>
      • InpNumber
      • TInp2DPoint
      • TInp3DPoint
      • TInp5DPoint
      • TInpQuaternion
      • TInpRotation
      • TInpLocation
      • CLDCmdType
      • CLDConst
      • INCLabel
  • CLData documentation
  • API documentation
  • Tutorials
    • C# programming language official documentation (available in many languages)
    • Visual Studio Code introductory videos

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

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.

Postprocessing system modules

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.

In this article
Back to top Generated by DocFX