List of objects to interpret

INCT_BlockExecArray - the SprutCAM X interface, which implements the list of objects in the current frame for interpretation.

Description of interface methods:

Method

Method Description

Description of use

Add

The function adds an object for interpretation to the end of the list of objects, returns the index of the added object (number).

Input parameter: ExecType (TNCExecObj) - type of the interpreted object, ExecParam (Pointer) the interpreted object parameter (see description below).

  1. When analyzing the text of a G-code that goes beyond the typical analysis of the SprutCAM X kernel (implementation of the INCT_Interpreter.TransLine method), recognized lexemes and semantic constructs are thought to add to the list of objects (the Add method) for interpretation with an object type (ExecType = exObj field), ExecParam field fill in the array index, or a pointer to the appropriate structure that stores data about the object for its subsequent interpretation.

  2. When interpreting the next command of the current list INCT_BlockExecArray, knowing that the current command should be interpreted at the end of the frame, it is possible to add it to the list using the Add function.

Insert

The function adds an object for interpretation to the list of objects with the Index number, returns the index of the added object (number).

Input parameters: Index (number) - the number of the object in the list, ExecType (TNCExecObj) - type of the interpreted object, ExecParam (Pointer) the interpreted object parameter (see description below).

When translating the text of the G-code, you can add translated objects to the top of the interpretation list, or add an object after another object we need, using the Insert function, if the execution of interpreted objects requires it.

Get

The function returns the object with the Index number from the interpretation list (INCT_BlockExecObject interface).

Important! The result returned by the function will be correct only until the next change in the list of INCT_BlockExecArray objects.

Index (number) - the number of the object in the list.

The Get function is required when interpreting list objects. Using this function, by the object number in the list you need to get the interface of the object being interpreted (INCT_BlockExecObject). Then, depending on the type and purpose of the object, perform actions on shaping the tool movement path or preparing for such actions (storing values, initializing variables, etc.).

Find

The function searches the interpretation object in the list by ExecType, ExecParam parameters starting from the object with the number FromIdx, returns the found object (INCT_BlockExecObject interface).

Important! The result returned by the function will be correct only until the next change in the list of INCT_BlockExecArray objects.

Input parameters: ExecType (TNCExecObj) - the type of the object being interpreted; ExecParam (pointer) for the register - the number of the base register, for the object - the pointer filled in by the interpreter; FromIndex (number) - the starting number of the object in the list.

The Find function can be used to determine if there is a register or object in an already translated part of the frame.

For example:

  1. In order to add after this object a new interpretation object (the Insert function).

  2. To determine the type of register (when implementing INCT_Interpreter.DefineRegister). Example. For the Fanuc rack in the G-code 'G4 F100' frame, the 'F' register is louder, and in the control program 'G01 X10 F100' frame, the 'F' register is the feed. At the stage of register determination, knowing that the G4 register already exists in the translated frame, it is possible to unambiguously determine the register 'F' that is dwell, and not the feed.

MoveTo

The function returns the result of moving the interpretation object with the FromIdx index to a place in the list with the ToIdx index (boolean). Truth - successful False - movement is not produced.

Input parameters: FromIdx (integer) - the index of the object being moved in the list, ToIdx (integer) - the index.

The MoveTo function can be used to sort the list of objects for interpretation after a frame is broadcast. For example, at the Heidenhain rack, there are registers that are always processed at the beginning or at the end of a frame, regardless of their location in the G-code text.

Get_Count

The function returns the number of interpretation objects in the list (integer).

No input parameters.

The function Get_Count can be used when sorting the list for interpretation, to determine the number of list items.


INCT_BlockExecObject - SprutCAM X interface (return function INCT_BlockExecArray.Get, INCT_BlockExecArray.Find) or interpreter (passed in the function INCT_BlockExecArray.Add, INCT_BlockExecArray.Insert), which implements the object for interpretation.

Description of interface methods:

Method

Method Description

Description of use

Get_ExecType

The function returns the type of the interpreted object (TNCExecObj)

exReg - base register
exObj - interpreter object

No input parameters.

  1. The function Get_ExecType is used when interpreting list objects. With this function, the type of the object of interpretation is determined. Depending on the type and parameter of the object of interpretation, actions are taken to form the tool path or to prepare for such actions (storing values, initializing variables, etc.).

  2. The function is used to get the value when adding an interpretation object to the list.

Get_ExecParam

The function returns the interpreted object parameter (pointer). If the object being interpreted as a register (exReg), then the parameter will be the number of the base register. If the interpreted object as an interpreter object, the parameter that was passed by the interpreter when the object was added will be returned (INCT_BlockExecArray.Add, INCT_BlockExecArray.Insert)

No input parameters.

  1. The function Get_ExecParam is used when interpreting list objects. This function is used to determine the parameter of the object of interpretation that is filled in by the interpreter. Depending on the type and parameter of the object of interpretation, actions are taken to form the tool path or to prepare for such actions (storing values, initializing variables, etc.).

  2. The function is used to get the value when adding an interpretation object to the list.

Get_IsUsed

The function returns the attribute interpreted (IsUsed) of the object for interpretation (boolean).

Truth - the object is interpreted in the current frame, False - the object is not interpreted.

No input parameters.

The function is used to get the value when adding an interpretation object to the list.

Set_IsUsed

The method allows you to set the sign of the interpreted (IsUsed) object for interpretation.

Input parameter: IsUsed (boolean)

True - the object is interpreted in the current frame, False - the object is not interpreted.

The function can be used to force a change in the attribute of an object, in which case the object will not be interpreted in the same way.

Get_IsOwn

The function returns the 'own' (IsOwn) of the object to interpret the exObj type. For objects of type exReg always returns False.

True - the object added by interpreter, False - the object added by heir or parent of interpreter.

No input parameters.

The function can be used in an inherited interpreter when deciding to interpret the command independently or to pass it to the parent for interpretation.