Managing NC-program analysis

INCT_Analyzer - SprutCAM X interface that implements access to control management text analysis settings. The analyzer settings affect the algorithm for determining the registers and values in the text of the NC-code.

Description of interface methods:

Method

Method Description

Description of use

BeginUpdate

Signals the start of the update operation INCT_Analyzer.

No input and output parameters.

Call BeginUpdate to run the INCT_Analyzer settings change operation. After completing the configuration changes, call EndUpdate to apply all changes made.

Each call to BeginUpdate must be accompanied by the corresponding EndUpdate method.

If only one of the INCT_Analyzer settings is changed at a time, the use of BeginUpdate, EndUpdate is optional.

EndUpdate

Signals the end of the update operation. Any changes that occur between the start and end of the INCT_Analyzer update will be applied.

No input and output parameters.

Get_CanUseEqualToAssignRegister

The function returns the value of the setting 'You can use the character = to set the register value' (boolean). True: the '=' character is used by the control program text analyzer to set the register value. False: when defining the register value, the encountered '=' character is considered an invalid token.

No input parameters.

If the setting is enabled (the value is True), the following combination of registers and values in the text of the control program will be considered correct:

X = 10.0 Y10.0 Z-1 A = -1 B + 3.5 C = -3.5

If the setting is disabled (the value is False), the following combination of setting values to registers will be considered correct:

Y10.0 Z-1 B + 3.5


Set_CanUseEqualToAssignRegister

The method sets the value of the setting 'You can use the = symbol to set the register value'.

Input parameter: Value (boolean), see parameter description in Get_CanUseEqualToAssignRegister.

No output parameters.


Get_RegistersContainSpaces

Deprecated

The function returns the value of the setting 'Register may contain spaces' (boolean). True: when defining a register, the analyzer text of the control program takes into account the possibility of using spaces in the address of the register. False: when defining a register, the space is considered only as a token separator.

No input parameters.

Deprecated

If the setting is enabled (the value is True), the following combination of registers and values in the text of the NC-code will be considered correct:
TOOL CALL 1
CYCL CALL
provided that in the list the registers are defined with the addresses 'TOOL CALL', 'CYCL CALL'. The register with the address 'TOOL CALL' will be assigned the value 1. The register with the address 'CYCL CALL' must be defined as a register with no value (vatOnlyAddr).

If the setting is turned off, the analyzer will consider 'TOOL', 'CALL', 'CYCL', 'CALL' as separate lexemes.

Set_RegistersContainSpaces

Deprecated

The method sets the value of the 'Register may contain spaces' setting.

Input parameter: Value (boolean), see parameter description in Get_RegistersContainSpaces.

No output parameters.


Get_RegistersCanEndWithPlusOrMinus

Deprecated

The function returns the value of the setting 'Register can end with a plus or a minus' (boolean). True: when defining a register, the text program analyzer takes into account the possibility of using plus or minus characters in the ending of the address of the register of characters. False: when defining a register, the plus and minus characters are considered to be separate tokens that are not part of the register address.

No input parameters.

Deprecated

If the setting is enabled (the value is True), the following combination of registers and values in the text of the NC-code:

DL+0 DR+0

will be recognized as the register 'DL +' and the value 0, the register 'DR +' and the value 0. Provided that in the address list the registers are defined with the addresses 'DL +', 'DR +'.

If the setting is disabled, the analyzer will consider 'DL', '+0', 'DR', '+0' as separate lexemes.

Set_RegistersCanEndWithPlusOrMinus

Deprecated

The method sets the value of the 'Register can end with a plus or a minus' setting.

Input parameter: Value (boolean), see parameter description in Get_RegistersCanEndWithPlusOrMinus.

No output parameters.

Get_RegistersCanEndWithNumber

Deprecated

The function returns the value of the setting 'Register can end with a number' (boolean). True: when defining a register, the analyzer of the text of the NC-code takes into account the possibility of using an integer in the end of the register address. False: When defining a register, the characters of a number are considered to be separate tokens that are not part of the register address.

No input parameters.

Deprecated

If the setting is enabled (the value is True), the following combination of registers and values in the text of the NC-code:

DR2+0 R0

will be recognized as register 'DR2' and value 0, register 'R0' without value. Provided that in the address list the registers are defined with the addresses 'DR2', 'R0'. A register with the address 'R0' must be defined as a register without a value (vatOnlyAddr).

If the setting is disabled, the analyzer will treat the 'DR', '2', '+0', 'R', '0' as separate lexemes.

Set_RegistersCanEndWithNumber

Deprecated

The method sets the value of the setting 'Register can end with a number'.

Input parameter: Value (boolean), see parameter description in Get_RegistersCanEndWithNumber.

No output parameters.

Get_LineBeginWithNumber

The function returns the value of the 'NC-code string can start with a number' (boolean). True: when analyzing a string of the text of NC-code, the first token is a number ignored. False: when analyzing a line of text of a NC-code, the first number is considered a token.

No input parameters.

If the setting is enabled (the value is True), the first token - the number in the line of the NC-code will be skipped.

Set_LineBeginWithNumber

The method sets the value of the 'NC-code string can begin with a number'.

Input parameter: Value (boolean), see parameter description in Get_LineBeginWithNumber.

No output parameters.

Get_Comments

The function returns an interface for managing the settings for defining comments in the text of the control program (interface INCT_Comments).

No input parameters.


If the following combinations of opening and closing symbols are added to the comments setting:

'!', ''

'(*', '*)'

then the lines of text of the NC-code:

! X10 Y20 Z30.5 skip A+1

(* test G01 X100 F100 *)

will be considered as comments (will be skipped).

Get_Brackets

The function returns an interface for managing the settings for defining brackets in the text of the NC-code (INCT_Brackets interface).

No input parameters.

Added to define brackets in expressions. At present, settings made via the interface are not used for analyzing the text of the NC-code.

Get_Quotes

The function returns an interface to control the definition of strings in the text of the NC-code (INCT_Quotes interface).

No input parameters.


If the symbol: '"' is added to the line definition setting, and the setting 'You can use the = symbol to set the register value' is enabled, then the text of the NC-code:

T="1"

will be recognized by the analyzer as a register T and the value 1. The string value "1" will be converted to the number 1.

Get_UnionLineChars

The function returns an interface for managing the settings of the union of text lines of the NC-code (INCT_UnionLineChars interface).

No input parameters.


If the symbol "~" is added to the string merge setting, the strings:

1 CYCL DEF 200 ~
Q200=+1~
Q201=-30.645~
Q206=+200~

will be translated and interpreted as one line:

1 CYCL DEF 200 Q200=+1 Q201=-30.645 Q206=+200

Get_EndOfLineChars

The function returns an interface for managing the settings for separating lines of NC-program (INCT_EndOfLineChars interface).

No input parameters.

If the character ';' is added to the string separation setting, the NC-program:

MoveL [10,10,10,10];MoveL [20,20,20,20];

MoveC [10,10,10,10],

[10,10,10,10];

will be passed to the interpreter for translation according to the specified separator:

MoveL [10,10,10,10];

MoveL [20,20,20,20];

MoveC [10,10,10,10], [10,10,10,10];

Get_ExcludeEOLChars

The function returns the value of the 'Exclude characters at the end of a line from the text' setting (boolean). True: when dividing lines according to the settings set in INCT_EndOfLineChars, the end-of-line character will be excluded from the text and will not be passed to the interpreter. False: the end-of-line character will be left in the text and passed to the interpreter.

No input parameters.

If the setting is enabled (value True) and the specified separator is ';' (INCT_EndOfLineChars) then the next text of the NC-program:

MoveL [10,10,10,10];MoveL [20,20,20,20];

MoveC [10,10,10,10],

[10,10,10,10];

It will be passed to the interpreter in the following form:

MoveL [10,10,10,10];

MoveL [20,20,20,20];

MoveC [10,10,10,10],[10,10,10,10];

if the setting is disabled, the text will be sent as:

MoveL [10,10,10,10]

MoveL [20,20,20,20]

MoveC [10,10,10,10],[10,10,10,10]

that is symbol of the separator lines will be eliminated

Set_ExcludeEOLChars

This method sets the value of the 'Exclude characters at the end of a line from the text' setting.

Input parameter: Value (boolean), see parameter description in Get_ExcludeEOLChars.

No output parameters.


INCT_Comments is the SprutCAM X interface that implements a list of settings for managing comments. Settings consist of pairs of lines: the opening character set and the closing character set. When analyzing NC-code frame, characters between any pair of an opening set of characters from a closing character set are considered a comment and are skipped. The closing character set may be an empty string, in which case the comment is the remainder of the line from the opening character set.

Description of interface methods:

Method

Method Description

Description of use

Add

The function adds a pair of settings to the list, returns the index of the added pair in the list (integer).

Input parameters: Open (line) - opening set of comments; Close (line) - closing set of comments.

To add comment settings when configuring the analyzer.

Get

The method returns comment settings by index.

Input parameter: Idx (integer) - index of the pair of settings.

Output parameters: Open (string) - opening comment set; Close (line) - closing set of comments.

To get the settings.

Delete

The method deletes a pair of settings for the specified parameter.

Input parameter: Idx (integer) - index of the pair of settings.

To add comment settings when reconfiguring the analyzer.

Get_Count

The function returns the number of pairs of settings (integer).

To get the number of settings.


INCT_Brackets - the SprutCAM X interface that implements a list of settings for managing the definition of brackets in the text of the NC-code. Settings consist of a pair of characters: opening and closing. At present, the settings specified via the interface are not used for analyzing the text of the control program; they are added for future use.

Description of interface methods:

Method

Method Description

Description of use

Add

The function adds a pair of settings to the list, returns the index of the added pair in the list (integer).

Input parameters: Open (symbol) - the opening parenthesis symbol; Close (symbol) - the closing parenthesis symbol.

To add brackets settings when configuring the analyzer.

Get

The method returns setting brackets by index.

Input parameter: Idx (integer) - index of the pair of settings.

Output parameters: Open (symbol) - the opening parenthesis symbol; Close (symbol) - the closing parenthesis symbol.


To get the settings.

Delete

The method deletes a pair of settings for the specified parameter.

Input parameter: Idx (integer) - index of the pair of settings.

To add brackets settings when reconfiguring the analyzer.

Get_Count

The function returns the number of pairs of settings (integer).

To get the number of settings.


INCT_Quotes - a SprutCAM X interface that implements a list of settings for defining strings. Each setting consists of a character that starts and ends with a string value. When analyzing a control program frame, characters that are between any pair of line definition characters are considered a string value.

Description of interface methods:

Method

Method Description

Description of use

Add

The function adds the setting to the list, returns the index of the added setting in the list (integer).

Input parameters: Sym (symbol) - the symbol with which the string value begins and ends.

To add settings for defining string values when configuring the analyzer.

Get

The method returns the setting by index.

Input parameter: Idx (integer) - setting index.

Output Parameters: Sym (symbol) - the symbol with which the string value begins and ends.

To get the settings.

Delete

The method removes the setting for the specified parameter.

Input parameter: Idx (integer) - setting index.

To add settings for defining string values when reconfiguring the analyzer.

Get_Count

The function returns the number of settings (integer).

To get the number of settings.


INCT_UnionLineChars - SprutCAM X interface, which implements a list of settings for combining lines of text of the NC-code. Each setting consists of a symbol of combining lines of text. If the NC-code frame ends with any of the characters in the settings list, then such a line is combined with the next one, without considering the concatenation character.

Description of interface methods:

Method

Method Description

Description of use

Add

The function adds the setting to the list, returns the index of the added setting in the list (integer).

Input parameters: Sym (symbol) - string concatenation symbol.

To add character string string settings when configuring the analyzer.

Get

The method returns the setting by index.

Input parameter: Idx (integer) - setting index.

Output Parameters: Sym (symbol) - string concatenation symbol.

To get the settings.

Delete

The method removes the setting for the specified parameter.

Input parameter: Idx (integer) - setting index.

To add character settings for string concatenation when reconfiguring the analyzer.

Get_Count

The function returns the number of settings (integer).

To get the number of settings.


INCT_EndOfLineChars - SprutCAM X interface, that implements a list of settings for separate lines of NC-program. Each configuration consists of a string - delimiter. The text of the NC-program is passed to the interpreter line by line, where each line is the content between separators.

Description of interface methods:

Method

Method Description

Description of use

Add

The function adds the setting to the list, returns the index of the added setting in the list (string).

Input parameters: Str (string) - delimiter.

To add delimiters settings when configuring the analyzer.

Get

The method returns the setting by index.

Input parameter: Idx (integer) - setting index.

Output Parameters: Str (symbol) - delimiter.

To get the settings.

Delete

The method removes the setting for the specified parameter.

Input parameter: Idx (integer) - setting index.

To add delimiter settings when reconfiguring the analyzer.

Get_Count

The function returns the number of settings (integer).

To get the number of settings.