Interpreters development
  • Interpreters development
v3.0.4
Search Results for

    Show / Hide Table of Contents

    List of objects to interpret

    INCT_BlockExecArray - a CAM system interface that implements the list of objects of the current block for interpretation.

    Description of the interface methods:

    MethodMethod descriptionDescription of use
    Add

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

    Input parameters: ExecType (TNCExecObj) - type of the object added for interpretation; ExecParam (pointer) - parameter of the interpreted object (see the description below).

    1. When the NC program text is analyzed beyond the standard analysis of the CAM system kernel (implementation of the INCT_Interpreter.TransLine method), it makes sense to add the recognized tokens and semantic constructions to the list of objects for interpretation (Add method) with the object type (ExecType = exObj), and to fill the ExecParam field with an array index or with a pointer to a structure storing the object data for its later interpretation.
    2. When the next command of the current INCT_BlockExecArray list is interpreted and it is known that this command must be interpreted at the end of the block, it can be added to the list with the Add function.
    Insert

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

    Input parameters: Index (integer) - number of the object in the list; ExecType (TNCExecObj) - type of the object added for interpretation; ExecParam (pointer) - parameter of the interpreted object (see the description below).

    When the NC program text is translated, the translated objects can be added to the beginning of the interpretation list, or an object can be added after another required object with the Insert function, if the execution of the interpreted objects requires it.
    Get

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

    Important! The result returned by the function is valid only until the next change of the INCT_BlockExecArray list of objects.

    Input parameters: Index (integer) - number of the object in the list.

    The Get function is needed when the objects of the list are interpreted. With it, the interface of the interpreted object (INCT_BlockExecObject) can be obtained by the object number in the list. Then, depending on the object type and purpose, the actions forming the tool path or preparing for them (storing values, initializing variables, etc.) are performed.
    Find

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

    Important! The result returned by the function is valid only until the next change of the INCT_BlockExecArray list of objects.

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

    Output parameters: Index (integer) - number of the found object in the list.

    The Find function can be used to find out whether a register or an object is present in the already translated part of the block.

    For example:

    1. To add a new interpretation object after this object (Insert function).
    2. To determine the register type (when implementing INCT_Interpreter.DefineRegister). Example: for the Sinumerik controller, in the NC program block 'G4 F100' the register 'F' is a dwell, and in the block 'G01 X10 F100' the register 'F' is a feed. When the register is determined, knowing that the translated block already contains the register G4, it can be determined unambiguously that the register 'F' is a dwell and not a feed.
    MoveTo

    The function moves the interpretation object with the index FromIdx to the place in the list with the index ToIdx and returns the result (boolean). True - success, False - the object has not been moved.

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

    The MoveTo function can be used to sort the list of objects for interpretation after the block is translated. For example, the Heidenhain controller has registers that are always processed at the beginning or at the end of a block regardless of their position in the NC program text.
    Get_Count

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

    No input parameters.

    The Get_Count function can be used when sorting the interpretation list to find out the number of list elements.

    INCT_BlockExecObject - an interface of the CAM system (returned by the functions INCT_BlockExecArray.Get, INCT_BlockExecArray.Find) that implements an object for interpretation. The object is created by the functions INCT_BlockExecArray.Add, INCT_BlockExecArray.Insert from the object type (ExecType) and parameter (ExecParam) passed to them.

    Description of the interface methods:

    MethodMethod descriptionDescription of use
    Get_ExecType

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

    exReg - base register;
    exObj - interpreter object;
    exProc - reserved, not used by the CAM system kernel.

    No input parameters.

    1. The Get_ExecType function is used when the objects of the list are interpreted. It determines the type of the interpretation object. Depending on the type and parameter of the interpretation object, the actions forming the tool path or preparing for them (storing values, initializing variables, etc.) are performed.
    2. The function returns the value specified when the interpretation object was added to the list.
    Get_ExecParam

    The function returns the parameter of the interpreted object (pointer). If the interpreted object is a register (exReg), the parameter is the base register number. If the interpreted object is an interpreter object, the parameter passed by the interpreter when adding the object (INCT_BlockExecArray.Add, INCT_BlockExecArray.Insert) is returned.

    No input parameters.

    1. The Get_ExecParam function is used when the objects of the list are interpreted. It determines the parameter of the interpretation object filled by the interpreter. Depending on the type and parameter of the interpretation object, the actions forming the tool path or preparing for them (storing values, initializing variables, etc.) are performed.
    2. The function returns the value specified when the interpretation object was added to the list.
    Get_IsUsed

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

    True - the object has been interpreted in the current block, False - the object has not been interpreted.

    No input parameters.

    The function is used to check whether the object has been interpreted in the current block.
    Set_IsUsed

    The method sets the 'interpreted' flag (IsUsed) of the object for interpretation.

    Input parameter: Value (boolean) - True - the object has been interpreted in the current block, False - the object has not been interpreted.

    The method can be used to force the interpretation flag of an object; in this case the object will not be interpreted.
    Get_IsOwn

    The function returns the 'own' flag (IsOwn) of an object for interpretation of the exObj type. For objects of the exReg type it always returns False.

    True - the object has been added by the interpreter, False - the object has been added by a descendant or the parent of the interpreter.

    No input parameters.

    The function can be used in a descendant interpreter to decide whether to interpret the command itself or to pass it to the parent for interpretation.
    In this article