CAM system kernel interface
INCT_Kernel - the CAM system kernel interface. The interface provides work with the NC program text and restarting the interpreter in the contour mode.
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| Get_ProgramManager | The function returns the interface for working with the NC program of the current operation (INCT_ProgramManager). |
|
| InterpreteContour | The method starts a new interpreter instance to analyze the NC program text and get the contour. Input parameters: NCProgram (INCT_Program interface) - NC program text; Contour (IUnknown interface) - contour interface. | If the generator built into the kernel (Turning stock removal cycle) is not enough to form the tool path of a turning contour cycle (like CYCLE95 for the Sinumerik controller), a new copy of the interpreter can be started to get the geometry from the NC program of the contour path on your own. The InterpreteContour method is intended for this. To form the contour geometry:
While InterpreteContour is executed, the CAM system gets a new INCT_Interpreter instance from the interpreter library, initializes the new interpreter, passes to it in the SetInterface method, in addition to the usual list of interfaces, the Contour interface, and translates and interprets the passed NC program text as in a usual interpretation. During the interpretation, the interpreter, knowing that it works in the contour mode (see Get_IsContourMode), must form the contour path with its own Contour object and the interface developed to store the geometric path. After InterpreteContour finishes, the Contour object contains the geometric contour path ready to be used for forming the tool path in the primary interpreter instance. |
| Get_IsContourMode | The function returns the flag of whether the interpreter instance works in the contour mode. No input parameters. Result: (boolean) True - in the contour mode, False - in the tool path mode. | If the interpreter starts its new copy itself (see InterpreteContour), the new interpreter instance must know in which mode it is started. If the new interpreter is started in the contour mode, it must form the contour geometry from the NC program text (see the Contour object). If the new interpreter is not started in the contour mode, it must form the tool path from the NC program text. |
INCT_Kernel2 - the CAM system kernel interface.
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| DoSubprogram | The method switches the translation and interpretation to the NC program text set by the NCProgram parameter, the number of times set by the Count parameter. After that, the translation of the NC program text continues from the place where it stopped. Input parameters: NCProgram (INCT_Program interface) - NC program (subprogram) text; Count (integer) - number of repetitions. |
Used to execute subprograms (CALL for Sinumerik, M98 for Fanuc). To get the subprogram text, use one of the following functions: GetPartByLabels, GetPartByLabelsFromCurPos, GetPartByRegisters. |
| Log | The method outputs a message to the CAM system log. Input parameters: Msg (string) - message text; MsgType (TNCMessageType) - message type: nmtInfo - information; nmtSuccess - success; nmtWarning - warning; nmtError - error; nmtCritical - critical; nmtException - exception; nmtDebug - debug. |
Used to debug the interpreter. |
| Notify | The method outputs a message to the notification panel of the CAM system. Input parameters: Msg (string) - message text; MsgType (TNCMessageType) - message type (see the description in the Log method). |
Used to warn the user while the interpreter works. |