Brief description

The control processes language elements according to DIN 66025 syntax or customary design and logical language extensions:

q Text-oriented program names

q Very comprehensive parameter calculations (local and global parameters)

q Access to control-internal data such as positions, measurement and tool data, offsets etc., through plain text designations (V.A.name, V.G.name)

q Definition of plain texts to designate free parameters in the NC-program (V.L.name, V.S.name, V.P.name)

q Control blocks based on the programming language "C"; for example:

- Conditional jumps: $IF, $ELSEIF, $ELSE, $ENDIF,
$SWITCH, $CASE, $DEFAULT, $ENDSWITCH, $BREAK

- Loops with counter: $FOR, $ENDFOR, $CONTINUE, $BREAK

- Loops with running condition: $WHILE, $ENDWHILE, $CONTINUE, $BREAK

- Loops without running condition: $DO, $ENDDO, $CONTINUE, $BREAK

- Jumps within the same NC-program level: $GOTO

q Differentiation between global (accessible by all main programs) and local subroutines (accessible only from the concerned main program)

q Mathematical expressions:

- Arithmetic standard operations: + , - , * , / , ** , MOD

- Numerical functions like ABS,SQR,SQRT,EXP,LN,DEXP,LOG

- Trigonometric functions like SIN,COS,TAN,ASIN,ACOS,ATAN

- Conversion functions such as INT,FRACT,ROUND

q Technological information with configurable effect of each function:

- Additional functions (MO....M65535)

- Auxiliary functions (H0....H65535)

- Spindle functions (S, M3, M4, M5, M19)

- Tool functions (T, D)

q Processing of coordinate notation A, B, C, ..., U, V, W (if they are not used in any other way), and / or programming of strings (e.g. X_ACHSE, SPINDEL_1 ...).

The complete summary of the NC commands is listed in the appendix!


Representation of the syntax

The following convention applies to the representation of the syntax of the NC-commands described in this documentation:

Bold Obligatory syntax elements of the NC-command.

[ ] Optional non-recurrent occurrence

{ } 0 or multiple occurrence

| Alternative among several symbols (or)

< > Mathematical expression (in accordance with Chapter 2.6.1) or string


Explanation of the symbols

Caution; describes restrictions, faulty programming, errors or indicates a danger.

Optional function; the availability of this function depends on the version or the configuration of the system.

Programming example (complete part program or program sequence) of the described function or NC-command.

Important Hint; description of extended basic facts and additional informations.


Character- and number- formats

More:

button Character set and file format

button Numerical input


Character set and file format

The decoder processes NC control data in the ASCII-format. NC control data can be prepared with a programming system that is integrated in a control system or with an editor.

The CNC processes the following characters:

character = letters and / or

digits and / or

special characters and / or

control characters

Letter | { A B C ... Z a b c ... z }
Digit | { 1 2 3 ... 9 0 }
Special character | { ! @ # $ % & * - _ = ~ { } ( ) [ ] , ; : " < > / ? }
Control character = HT | Horizontal tabulator TAB
SP Intermediary space | SPACE
CR Carriage return | CARRIAGE RETURN
LF Line Feed | LINE FEED


Numerical input

Numericals are entered as integers or decimal point inputs. Decimal point inputs are basically separated with a ".". Leading zeros can be omitted. The input for lengths and positional values is done in mm or inch, depending on the configuration and the programming. The input of angles is done in degrees or gon.

Example:

Values: [µm] | Inputs : [mm]
0,1 | 0.0001 or .0001
1 | 0.001 or .001
10 | 0.01 or .01
100 | 0.1 or .1
1000 | 1.0 or 1
10000 | 10.0 or 10
100000 | 100.0 or 100
1000000 | 1000.0 or 1000

The input of numerical values is limited by the internal numerical display.

This numerical representation allows traversing movements in the range of 200 m with a resolution of 0,1 µm!

By changing the internal conversion factors in a specification file, the input of positions, feeds, etc., may also be done in other units than mm or inch.


Structure of NC control data

Definitions for understanding:

NC-programs are, besides tool data, zero offsets, etc., a constituent of NC control data. NC-programs describe the flow of processing steps.

Separating characters reveal that a sequence of characters has concluded. The decoder evaluates the block end character, the space character, the tabulator, the character with the ASCII representation /0, the file end character or the comment as a separating character.

Comments contain non decodable ASCII information, which must remain between the character "(" and ")". If within a comment, an additional "(" is found, the corresponding ")" is expected. The block end character and the file end character conclude the comments.

Mathematical expressions are constructed out of numbers, parameters, operators, functions, etc. (see the paragraph 2.4.1 "Mathematical expressions). These are evaluated by a built-in computing function.

Examples: "100", "100+20", "100+P10", "100+PP10", "100*[2+P3]", "DEXP[2]", "100+SIN[P10+PP20]".

A NC-program consists of:

q Comments,

q Definitions of local subroutines, consisting of:

- String "%L ", followed by a subroutine name having a maximum of 14 characters, where either the block end character, the space character, a tabulator, the character with the ASCII representation /0 or the file end character concludes the program name.

- A number of NC-program blocks,

- A code, identifying the end of the subroutine (M17 or M29),

q Definition of the main program, consisting of

- String "%", followed by the main program name, where either the block end character, the space character, a tabulator, the character with the ASCII representation /0 or the file end character terminates the program,

- A number of NC-blocks,

- A code identifying the end of main program (M02 or M30).

If in a file outside the comments, a character is noticed as the first character that is neither a separating character nor a "%", then this character is evaluated as the first character of an unnamed main program. This also means that in front of "%", no block numbers may be programmed.


NC-block structure

A NC-block consists of a

block number (optional),

a number of words

and a block end identification.

The application of special commands (#<Statement>) as described in paragraph 11 excludes the programming of further words in the NC program (except of NC block number).

Generally each block begins with a block-number, consisting of an N-Character, followed by a mathematical expression. This expression is mapped, in case of respective setting of the decoder, into the display data rounded off as integer.

For program flow the block number is of no significance. Hence it need not be programmed in ascending order.

Example for a block structure:

The NC commands conforming to DIN 66025 must not be compulsorily separated through space characters or tabulators. For programming of text commands deviating from DIN (control statements, special functions, ... ), separating characters are necessary and useful also for structuring a NC-program.

Examples for an NC-program structure:

without | partial | complete
numbering | numbering | numbering
% 100 | % 100 | % 100
"Block 1" | N10 "Block 1" | N10 "Block 1"
"Block 2" | "Block 2" | N20 "Block 2"
"Block 3" | N20 "Block 3" | N30 "Block 3"
. | "Block 4" | N40 "Block 4"
. | . | .
. | . | .
M30 | M30 | N700 M30

Words are to be differentiated according to their significance in words with:

q Geometrical information (e.g. positions),

q Technological information (e.g. spindle speed, feedrate, right-handed spindlerotation),

q Information for the control of program sequential flow (so called control blocks like e.g. counting loop),

q Arithmetical information (for instance, calculation of a variable, parameter calculation).

Several words could be in a block (exception: the special commands from chapter 11-Special functions). The sequence of processing the control information within the block is specified through the control. Thus, the individual words of an NC-block can be entered in any desired order by the programmer. The sequence has no effect upon the processing. In cases of exceptions special notes are drawn in this programming manual.

The block end code is firmly given. It can be any control character. Customarily, the control character "CR" is used.

More:

button Skipping of blocks

button Block specific comments


Skipping of blocks

By pre-positioning the "/"-character (for instance, /N3412), specific blocks can be skipped, if the function "Skip block" is made active on the operating console. Skipped blocks permit optional processing stages, such as, measuring loops or dummy stages within an NC-program.


Block specific comments

Explanatory comments can be inserted at almost any position of a NC-program. Also at the beginning of a program. Comments have no effects on the processing of an NC-machining-routine.

Comments start with a "(" character. If the comment is extended to the block end, for the separation the "(" character is sufficient. For comments completely within a NC-block also the corresponding ")" character is necessary.

Alternative a comment can be started with a semicolon ";". This kind of comment always is extended to the block end.

Comments could be of any length where, however, the maximum number of characters per block may not be exceeded.

A nesting of comments is possible.

Programming example

% 100 (Comment in complete brackets)

N200 ... (Comment only with open bracket

N300 (Comment (Nested comment))

N500 X10 (Comment within a block) Y20

N700 ... ;Comment behind semicolon

N999 M30

With the special commands #COMMENT BEGIN / END, which are described in the paragraph 11.5, it is possible to make a comment over any number of lines.


Word structure

A word consists of address letters, arithmetical expressions and text <string>. The significance of the individual address letters is described in the following chapters. A survey is given in the paragraph 2.4.2. "Assigned address character".

More:

button Mathematical expressions

button Operations for character strings

button Assigned address characters

button Program examples


Mathematical expressions

Consisting of:

q Numerical values differentiated into

integers <int>

and

decimal values <float>,

q Arithmetic expressions <expr> are constructed out of

numerical values

operators,

functions,

parameters,

variables

and

symbol character sets.

Example: [[sin["MAX_ANZ" * 30.00] + P2] / V.G.SATZ_NR]

More:

button Integers <int>

button Decimal values <float>

button Arithmetical expressions <expr>


Integers <int>

Integers are specified without decimal point. The internally permissible value range corresponds to "long integer"-variables of the programming language C, that means, from -2.14*109 to +2.14*109. If, internally, calculation is done using the unit 0.1 µm for value input in mm, the numerical range is between 2.14*105 and +2.14*105. This corresponds to a traverse range of more than 400 meters. Because of an internal limitation in the position controler, the traverse range is, limited to half of it. That means, to somewhat more than 200 m. For negative numbers a "-" character is prefixed. For positive numbers the "+" character is not necessary.


Decimal values <float>

Decimal values are specified with a decimal point or alternatively in scientific notation. The value range corresponds to the integer value range. If, calculation is done internally with the unit 0.1 µm, then for input values in mm accordingly 4 digits after the decimal point are provided. For negative numbers a "-" character is prefixed. For positive numbers the "+" character is not necessary

Examples for decimal values:

123.3456 0.6789 .6789 -345.56 +78.987

12E5 +2.5E6 -4E7 -523.6E-3


Arithmetical expressions <expr>

In the handling of arithmetical expressions, the general computing rules are used:

- point before dash calculation

- the parenthesis rule, whereby square parentheses "[ ]" are to be used

In arithmetical expressions, parameters are often used; the notation of parameters is:

- P followed by an integer, for instance P12.

Example for an arithmetical expression:

- P5 = [[sin[R1*30.00] + P2] / P5]

Symbolic character sets can be assigned to arithmetical expressions and to parts thereof.

Such a string leads to the default string, which is analyzed in place of the character string. A recursive handling is also possible.

The character strings must be within quotation marks. During their decoding a differentiation is made between the upper-case and lower case letters. The nesting of strings is displayed through a pre-set '\'-character before the limiting quotation mark. Attention must be paid to the fact that always complete nesting levels are to be grouped in one string, i.e. the adding of ´[´ at the beginning and ´]´ at the end of the replacement text should not have any effect on the result of the mathematical expression.

Programming example

Correct:

N10 "STRING1" = "COS[\"STRING2\"]"

N20 "STRING2" = "5 * 12"

N30 "STRING3" = "SIN[89.5 + \"STRING1\"]"

N40 X[-2 * "STRING1" + "STRING2" + "STRING3"] (Traverse after X60)

M30

Wrong:

Only complete nesting levels should be put together in the string

N10 "STRING1" = "COS["

N20 "STRING2" = "90]"

N30 "STRING3" = "\"STRING1\" \"STRING2\" "

The character sets defined in the NC-program are valid program-globally.

The programming of symbol character sets outside the mathematical expressions is described in the separate programming manual symbolic character sets.

Survey of all available calculation operations:

Basic types of calculation:

Addition | + | P1 = P2 + P3 + 0.357
Subtraction | - | P1 = P2 - 0.031
Multiplication | * | P1 = P2 * [P3 + 0.5]
Division | / | P1 = P2 * P3 / [P5 + P6]
Exponential calculation | ** | P1 = 2**P3 (2 exponent P3)
Modulo calculation | MOD | P1 = 11 MOD 3 (-> 2)

Numerical functions:

Absolute value formation | ABS [..] | P1 = ABS [P2 - P4]
Squaring | SQR [..] | P1 = SQR [P2] + SQR [P3]
Square root extraction | SQRT [..] | P1 = SQRT [SQR[P2]+SQR[P3]]
e - function | EXP [..] | P1 = EXP [P2 * P4]
Natural logarithm | LN [..] | P1 = LN [P2] + LN [P3]
Tens - exponential | DEXP [..] | P1 = DEXP [P2]
Common logarithm | LOG [..] | P1 = LOG [P2]

In the case of LN, LOG and SQRT the argument must always be greater than 0 !

Bit operators:

AND-operation | & | P1 = P2 & P3
OR-operation | | | P1 = P2 | P3
exclusive OR | ^ | P1 = P2 ^ P3
Complement | INV[..] | P1 = INV[P2]

The arguments can be any positive mathematical expressions or numbers. Negative expressions or numbers are not allowed. Floating point arguments are converted to integer.

Logical operators :

logic AND operation | && / AND | $IF P1 >= P2 && P3 != P4 respectively $IF P1 >= P2 AND P3 != P4
logic OR operation | || / OR | $IF P1 >= P2 || P3 != P4 respectively $IF P1 >= P2 OR P3 != P4

Comparison operators:

In loop constructions (see paragraph 10: "Program branches) comparison operations will be necessary. Verifications can be done as follows:

Equality | == | $IF P1 == 5
Inequality | != | $IF P1 != 5
greater than or equal to | >= | $IF P1 >= 10
less than or equal to | <= | $IF P1 <= 10
less than | < | $IF P1 < 10
greater than | > | $IF P1 > 10

Possible truth values are:

TRUE | true | $IF V.A.MERF.X == TRUE
FALSE | not true | $WHILE V.G.WZ[2].OK == FALSE

Use of the truth values:

For TRUE control internally the value 1 is used.

For FALSE control internally the value 0 is used.

Trigonometric functions (specification of angles in degrees):

Sine | SIN [..] | P1 = SIN [P2 * 30 +10]
Cosine | COS [..] | P1 = COS [P2 * 30 +10]
Tangent | TAN [..] | P1 = TAN [P2 * 30 +10]
Arc sine | ASIN [..] | P1 = ASIN [P2 * 10]
Arc cosine | ACOS [..] | P1 = ACOS [P2 * 10]
Arc tangent | ATAN [..] | P1 = ATAN [P2 * 10]
Arc tangent with 2 arguments | ATAN2 [y,x] | P1 = ATAN2[100,100] (-> Result is 45°)

In the case of the trigonometric functions ASIN and ACOS the argument must always be between -1 and +1.

For the function TAN, the argument should not assume the values ... -90, 90, 270 ... degrees.

The function ATAN2 calculates for x != 0 the angle of a position to the X axis in the correct quadrant.

Exception: For ATAN2[0,0] (x = y = 0) the result is always 0.

Transformation functions:

Integer | INT [..] | cuts off the digits after the decimal point
Float | FRACT [..] | removes integer
Rounding Off | ROUND [..] | rounds off to integer

Special functions:

Check for existence of variables/ parameters/ M/H functions | EXIST [ <variable/parameter/ M function/ H function> ] | $IF EXIST[V.P.MY_VAR] == TRUE $IF EXIST[P1] != TRUE $IF EXIST[M55] == TRUE $IF EXIST[H20] == TRUE
Determine the size of an array dimension | SIZEOF [<array_name>, <dimension>] oder SIZEOF [<array_name>] (für 1. Dim.) |  | $IF SIZEOF [V.P.MY_ARRAY,2] == 3 P1 = SIZEOF[P10,2]


Operations for character strings

Survey of all available operations:

String operations:

Adding of strings

With + 2 strings are combined.

V.E.str = "Hello" + " world!"

(-> Result is "Hello world!")

+

Identification of
left partial string

LEFT determines the left starting string of a string. Based on the first character, get nbr characters from string str.

V.E.str = LEFT["Hello world!", 5]

(-> Result is "Hello")

LEFT[str, nbr]

Identification of
mean partial string

MID determines the partial string of a string. Starting with the character at position pos, get nbr characters from string str.

V.E.str = MID["How are you?", 3, 5]

(-> Result is "are")

MID[str, nbr, pos]

Identification of
right partial string

RIGHT determines the right closing string of a string. Based on the last character, get nbr characters from string str.

V.E.str = RIGHT["Hello world! How are you?", 12]

(-> Result is "How are you?")

RIGHT [str, nbr]

Identification of
string length

LEN determines the length (number of characters) of a string.

P1 = LEN["Hello world! How are you?"]

(-> Result is 25)

LEN[str]

FIND[..] is case sensitive!

Searching a
partial string

FIND searches a string str2 in a string str1 and determines the position of the first matching of str2 in str1 as a result.

V.E.str1 = "Hello world! How are you?"

V.E.str2 = "How"

P1 = FIND[V.E.str1, V.E.str2]

(-> Result is 14)

If string str2 does not exist in string str1, FIND determines value 0 as a result.

V.E.str1 = "Hello world! How are you?"

V.E.str2 = "today"

P1 = FIND[V.E.str1, V.E.str2]

(-> Result is 0)

FIND [str1, str2]

Deleting a
partial string

DELETE deletes in string str a number of certain characters nbr, starting with the character at position pos.

V.E.str = DELETE["Hello world! How are you?", 5, 7]

(-> Result is "Hello ! How are you?")

DELETE [str, nbr, pos]

Inserting a
partial string

INSERT inserts a string str2 into a string str1, starting behind the character at position pos.

V.E.str1 = "Hello ! How are you?"

V.E.str2 = "world"

V.E.str = INSERT[V.E.str1, V.E.str2, 6]

(-> Result is "Hello world! How are you?")

INSERT [str1, str2, pos]

Replacing a partial string

REPLACE replaces a number of characters nbr in string str1 by a partial string str2, starting with the character at position pos.

V.E.str1 = "What is your name?"

V.E.str2 = "age"

V.E.str = REPLACE[V.E.str1, V.E.str2, 4, 14]

(-> Result is "What is your age?")

REPLACE [str1, str2, nbr, pos]

Comparison operators:

The comparison operations are case sensitive!

Equality

V.E.str1 = "Peter"

V.E.str2 = "Peter"

$IF V.E.str1 == V.E.str2

#MSG ["%s is equal to %s!", V.E.str1, V.E.str2]

$ELSE

#MSG ["Strings are not equal!"]

$ENDIF

(-> Result is "Peter is equal to Peter")

==

Inequality

V.E.str1 = "Peter"

V.E.str2 = "Steve"

$IF V.E.str1 != V.E.str2

#MSG ["%s is not equal to %s!", V.E.str1, V.E.str2]

$ELSE

#MSG ["Strings are equal!"]

$ENDIF

(-> Result is "Peter is not equal to Steve")

!=

greater than

/

greater than or equal to

V.E.str1 = "Peter"

V.E.str2 = "Peter"

$IF V.E.str1 > V.E.str2

#MSG ["%s is greater than %s!", V.E.str1, V.E.str2]

$ELSEIF V.E.str1 >= V.E.str2

#MSG ["%s is greater than or equal to %s!", V.E.str1, V.E.str2]

$ENDIF

(-> Result is "Peter is greater than or equal to Peter!")

V.E.str1 = "Peter"

V.E.str2 = "Bob"

$IF V.E.str1 > V.E.str2

#MSG ["%s is greater than %s!", V.E.str1, V.E.str2]

$ELSEIF V.E.str1 >= V.E.str2

#MSG ["%s is greater than or equal to %s!", V.E.str1, V.E.str2]

$ENDIF

(-> Result is "Peter is greater than Bob!")

>

>=

less than

/

less than or equal to

V.E.str1 = "Peter"

V.E.str2 = "Peter"

$IF V.E.str1 < V.E.str2

#MSG ["%s is less than %s!", V.E.str1, V.E.str2]

$ELSEIF V.E.str1 <= V.E.str2

#MSG ["%s is less than or equal to %s!", V.E.str1, V.E.str2]

$ENDIF

(-> Result is "Peter is less than or equal to Peter!")

V.E.str1 = "Bob"

V.E.str2 = "Tim"

$IF V.E.str1 < V.E.str2

#MSG ["%s is less than %s!", V.E.str1, V.E.str2]

$ELSEIF V.E.str1 <= V.E.str2

#MSG ["%s is less than or equal to %s!", V.E.str1, V.E.str2]

$ENDIF

(-> Result is "Bob is less than Tim!")

<

<=

Conversion functions:

Integer to String | INT_TO_STR[...] | V.E.str = INT_TO_STR[123]
Real64 to String | REAL_TO_STR[...] | V.E.str = REAL_TO_STR[12.34]
String to Integer | STR_TO_INT[...] | V.E.sgn32 = STR_TO_INT["12"]
String to Real64 | STR_TO_REAL[...] | V.E.real64 = STR_TO_REAL["123.45"]


Assigned address characters

Fixed significances are assigned to the following address characters:

Address character relating to the technology:

D,d | <int, float, expr> | Tool compensation
E,e | <int, float, expr> | Feedrate at block end (not available)
F,f | <int, float, expr> | Feedrate at block beginning
H,h | <int, float, expr> | Auxiliary function
M,m | <int, float, expr> | Switching function
S,s | <int, float, expr> | Spindle speed, synchronization ratio etc.
T,t | <int, float, expr> | Tool number

Address character relating to geometry:

G,g | <int, float, expr> | Preparatory function
I,i | <int, float, expr> | Interpolation parameter for 1st axis
J,j | <int, float, expr> | Interpolation parameter for 2nd axis
K,k | <int, float, expr> | Interpolation parameter for 3rd axis
R,r | <int, float, expr> | Radius of circle

Address letters relating to the program flow:

L,l | <string> | sub routine call, global
LL,ll | <string> | sub routine call, local
N,n | <int, float, expr> | Block number
O,o | <int, float, expr> | Not assigned
$ |  | Ident. code for control block statements
# |  | Ident. code for extended language elements

Address letters relating to arithmetic:

P,p

<int, float, expr>

Parameter

Address letters for designating the numerical axes are assignable variably and in every machine data block. Normally, the letters X, Y, Z are used for designating the 3 linear axes of a Cartesian space coordinates system. A, B, C are often used for designating rotary axes. Further, all the remaining upper case and lower case characters can be used for designating the numerical axes.

Beside this simple possibility, axis designations may also consist of more than one character (strings) (X_ACHSE, Y22, ZA3). For differentiating the axis designation from the coordinate value, the "=" character is to be used in this case, i.e. X1=120.345

In the following chapters of this programming manual, the first named and often used address characters are used.


Program examples

For clarifying the subject introduced till now, a programming example is presented in the following paragraph.

Following address characters are used:

Preparatory functions:

G00 "Rapid traverse"

G01 "Linear interpolation"

Spindle:

S1000 "Spindle speed 1000 rpm."

Feedrate:

F5 "Feedrate 5 mm/min"

Numerical axes:

X, Y, Z "Three Cartesian axes"

Machine functions:

M03 "Spindle right hand rotation at programmed speed"

M05 "Spindle stop"

M30 "Program end"

Programming example

% 100 (program example)

N10 G00 X100 Y100 (Rapid traverse mode of the X- and Y-axes)

(to position 100)

N20 Z100 (Rapid traverse mode of the Z-axis to 100.)
(G00 remains active till deselection by)

(another G-function.)

N30 G1 Z50 F5 S1000 M3 (Spindle right-hand side rotation (1000 rpm)
(and linear interpolation with feedrate)

((5 m/min) to position Z=50)

N40 Z100 (Linear interpolation to Z=100)

N50 G0 X200 Y200 Z200 (Rapid traverse to position X=Y=Z=200)

N50 M5 (Spindle stop)

N60 M30 (Program end)


Axis commands

Axis designations can be configured and must be taken from the configuration-specific description. During their decoding, a differentiation must be made between upper and lower cases.

Following axis designations are available:

q Individual address characters: {A, B, C, U, V, W, X, Y, Z, Q}

After the programming of an axis designation, which is made of only one address character, there should be a space between the position value and the next character, in order not to cause any mix-up during a subsequent assignment with the equal-sign.

Example:

There are the axis designations "X" and "X50P1" in the NC-channel and axis "X" should be traversed to position "50".

X50P1=7 | (ERROR) | X50P1-axis is traversed to position 7.
X50 P1=7 | (CORRECT) | X-axis is traversed to position 50.

q Strings (for instance X_SCHLITTEN, X1, Y22, Z_ACHSE)

The first character of the string must correspond to one of the reserved address characters (see above). As further characters also the numbers 0 - 9 may be used. The string length of the axis designation must not exceed the maximum possible length (firmly given), otherwise an error message is output. To avoid confusion, after all axis designations with more than one character, an equal sign must be added in front of the position statement. Especially for axis designations ending with one of the numbers 0 - 9 this is indispensable.

X1 = <int, float, expr> | Examples:
 | X1 = 100.0
 | X22 = 0.001
 | X_SCHLITTEN = SIN [30]
 | Z_ACHSE = SQRT [2]/2

Further, declarations:

q Each axis designation has to be set in the channel parameters [1]-27.

q An axis designation must always be followed by a the numerical value or an expression:

X <int, float, expr> | Examples:
 | X 100.0
 | Y 0.001
 | Z SIN [30]
 | A SQRT [2]/2
 | B 4 * R1/R2

Programming example

(Used axis designations)

( Y )

( Y50 )

( Y_ACHSE_SCHL_1 )

( Z7 )

N010 G01 F1500

N020 Y50 = 51 (axis Y50 on position 51)

N030 Y52 (axis Y on position 52)

N040 Y50 Z7 = 54 (axis Y on position 50 and)

(axis Z7 on position 54)

N050 Y 70 Z7 = 55 (axis Y on position 70 and)

(axis Z7 on position 55)

N060 Y = 71 Z7 = 56 (axis Y on position 71 and)

(axis Z7 on position 56)

N070 Y[2+3] (axis Y on position 5)

N080 Y50 = [4*3] (axis Y50 on position 12)

N090 Y_ACHSE_SCHL_1 = 23 (axis Y_ACHSE_SCHL_1 on position 23)

N100 Y50 = P1 (axis Y50 on position P1)

N110 M30

In this programming manual, the commonly used designations X, Y, Z are used for the three linear axes of a Cartesian system and A, B for two further axes.


Measuring systems, input and precision ranges

The measuring systems for the specification of positions, angles and feedrates are set, depending on the user configuration:

Lengths and positions: mm or inch,

Traverse speed: mm or inch per s or min,

Angle: Degree or gon,

Angular speed: Degree or gon per s or min.

However the programmer has the freedom to use self-defined measuring systems with the help of parameter calculations.

All length specifications and traverse speeds, are, calculated to a standard accuracy of 0.1µm. The maximum traverse range with this resolution, will be -214m .... +214m. Numerical input should not exceed the range of -214 000.0000 mm to +214 000.0000 mm in the programming. This does not apply for individual elements (for instance, parameters) of an arithmetical expression, if the result of the arithmetical expression is within the given range. It has to be taken into account, that the numerical range must also not exceed in combination with offsets and corrections.

Exception: The definition of a circle radius is possible up to a maximum of 109 mm. However the end point of the circular arc has always to be within the maximum traverse range (-2,14 ... +2,14) * 105 mm of the axes.

In the machine data block the axis type has to be entered. If it relates to a rotary axis or spindle, the angles are handled with a resolution of 0.0001 degree. Thus, a range of n * 360 degree with n=11900 is programmable.

With a resolution of for instance 0,0001°, angles are possible in the range of

(-2,14 ... +2,14) * 105 / 360 = 2 * 594 revs.


Coordinate systems

After the machine reference search, the control finds itself at the machine zero point or in the machine coordinate system. Then programmed coordinates (index p) from the NC-program (for instance X100) coincide with the absolute coordinates (index a):

xa = xp

ya = yp

Offsets occur with the definition of workpiece coordination systems. The positions in workpiece coordination system are different to those coordinate systems that are defined by the physical machine axes. Here you must differentiate between programmed, constant, translatory offsets in a single axis and dynamic offsets that result from kinematic (e.g. cylinder ⇔ Cartesian) or geometric transformations (e.g. tool radius compensation, mirroring), which in general affect several axes.

For example the zero point can be shifted by a zero offset (NPV-G54G59) from machine zero point M to a freely selectable workpiece zero point W or a workpiece coordinate system. The absolute coordinates are obtained out of the addition of NPV and programmed coordinates:

xa = xNPV + xp

ya = yNPV + yp

Irrespective of these NPVs specified through the zero offset data block, further offset types can be explicitly programmed in the program using e.g. G92 X... Y... Z...

This coordinate preset (BPV) is additional to the previous NPV. Thus, the absolute coordinates can be determined as follows (Fig. 3.1):

xa = xNPV + xBPV + xp

ya = yNPV + yBPV + yp

xa, ya | Absolute coordinates
xp, yp | Programmed coordinates
xNPV, yNPV | Zero offset
xBPV, yBPV | Coordinate preset
M: | Machine zero point
W: | Workpiece zero point
B: | Ref. point for coordinates
P: | Position

Fig. 3.1: Representation of possible shifts

On the coordinate display of the MDI active offsets are visible by permanent differences between the coordinates of the physical machine axes (ACS) and the workpiece coordinates (PCS). But some offsets result from manipulation of machine and workpiece coordinates similarly (e.g. tool radius compensation, mirroring), so that there is no coordinate difference in the end.

The following tables give an overview over the additional offset types. In the following chapters you will find more information.

To be considered:

Activation and de-activation is the time when the offset is visible on the MDI because of coordinates differences respectively coordinate changes. But categorically an offset only gets physically active with the first movement that follows any activation respectively de-activation. E.g., a de-activation at program end leads to a compensation movement in the first movement of the following program only.

Programmable offsets (linear, constant)

No. | Description | Definition | ACS  PCS difference if active | Activation | De-activation | Temporary suppression
1 | Coordinate preset | NC-program | Yes | NC-block: G92 X.. Y.. G90/91 must be considered | -NC-block: G92 X0 Y0. -NC-program start | #SUPPRESS OFFSETS, #MCS ON
2 | Zero offset | Parameter list, NC-program | Yes | NC- block: G54...G59 | -NC- block: G53 -NC-program start | #SUPPRESS OFFSETS, #MCS ON
3 | Clamp position offset | Parameter list | Yes | NC-program start, cannot by changed by NC-program | NC-program start, cannot by changed by NC-program | #SUPPRESS OFFSETS, #MCS ON
4 | Tool offset | Parameter list, NC-program, External | Yes | NC-block: D.. | -NC- block: D0 -NC-program start | #SUPPRESS OFFSETS, #MCS ON
5 | Position preset | NC-program | Yes | NC- block: #PSET... | -NC- block: #PRESET... -NC-program start | #SUPPRESS OFFSETS, #MCS ON
6 | CS-offset | NC-program | Yes | NC- block: #CS ON [vx,vy,vz, ::: | -NC- block: #CS OFF -NC-program end | #MCS ON
7 | ACS- offset | NC-program | Yes | NC- block #ACS ON[vx,vy,vz, ::: | -NC- block: #ACS OFF -NC-program end | #MCS ON

Offsets, caused by geometric transformation (linear, dynamic)

No. | Description | Definition | ACS  PCS difference if active | Activation | De-activation | Temporary suppression
8 | CS | NC-program | Yes | NC-block: #CS ON[..,..,..] | -NC-block: #CS OFF -NC-program end | #MCS ON
9 | ACS | NC-program | Yes | NC-block: #ACS ON[..,..,..] | -NC-block: #ACS OFF -NC-program end | #MCS ON
10 | Contour rotation | NC-program | No | NC-block: #ROTATION ON[ANGLE..] | NC-block: #ROTATION OFF | Not possible
11 | Mirroring | NC-program | No | NC-movement block after G21/G22/G23 | NC-movement block after G20 | Not possible
12 | Tool radius compensation | NC-program | No | NC-block: G41/G42 | NC-block: G40 | Not possible
13 | cinematic transformation | NC-program | No | -NC-block: #RTCP ON -Program start automatic | NC-block: #RTCP OFF | #MCS ON

Offsets caused by special functions

No. | Description | Definition | ACS  PCS difference if active | Activation | De-activation | Temporary suppression
14 | Offset because of manual mode with parallel interpolation | Hand wheel, NC-program | Yes | NC-block: G201 | NC-block: G202 | Not possible
15 | Offset because of measuring | NC-program | Yes | NC-block: G101 | NC-block: G102 | #SUPPRESS OFFSETS, #MCS ON
16 | Offset after homing | NC-program | No | NC-block: G74 X.. Y.. Z..  | Not possible | Not possible

The NC-command #SUPPRESS OFFSETS is non-modal, i.e. it only affects the current NC-block.

The NC-command #MCS ON de-activates any offsets until command #MCS OFF is programmed.

Within every (A)CS the offsets of type 1, 2 and 5 are stored locally.

Fig. 3. 2 : Overview of the additional offsets and co-ordinate systems


The G-functions

The so-called "G"-functions describe the type of the traverse movement, interpolation type, measuring method, the time-related influence and activating of certain operation states. The syntax is:

G <expr>

For the G-functions, there are a variety of differentiating characteristics:

Effectiveness: There are G-functions that have validity after their programming in their meaning only for the respective block (non-modal) and those which are active after the very initial programming in their meaning until they are explicitly deselected (modal).

Exceptions: Certain G-functions mutually exclude themselves. For instance, G01 (linear interpolation) and G02 (circular interpolation) cannot be simultaneously selected. Therefore the functions summarized in these groups must not be programmed commonly in one NC-block:

A modal function is automatically deselected, if, in a following block, another function of the same group is selected.

Programming example

:

N50 G01 X100 Y200 (Linear interpolation active)

N60 G41 X200 Y200 (Linear interpolation active)

N50 X300 Y250 (Linear interpolation active)

N50 X100 Y50 (Linear interpolation active)

N50 G02 X100 Y50 I100 (Circular interpolation active)

:

Basic position: During switching, after RESET, or at program end, the control finds itself in the basic position. In this basic position, already a few G-functions are active without explicit selection.

More:

button Path preparatory functions

button Feed adaptation (G08/G09/G900/G901)

button Path /Time related feed interpolation (G193/G293)

button Selection of planes (G17/G18/G19)

button Mirroring (G21/G22/G23/G20)

button Mirroring with axis information (G351)

button Units (G70/G71)

button Implicite subprogram calls (G80-G89/G800-G819)

button Absolute or incremental dimensioning (G90/G91)

button Exact stop (G60, G360, G359)

button Polynom contouring (G61, G261, G260)

button Corner deceleration

button Tool radius compensation (G40/G41/G42)

button Selection/deselection methods of tool radius compensation (G138/G139/G237/G238/G239/G05)

button Selection of the transition of tool radius compensation (G25/G26)

button Feedrate adaptation for tool radius compensation (G10/G11)

button Selection/deselection of contour masking by tool radius compensation (G141/G140)

button Zero offsets NPV (G53/G54/...G59)

button Center point specification for circle definition (G161/G162)

button Radius programming (R, G163)

button Center point offset controlling (G164/G165)

button Feedforward control (G135/G136/G137)

button Weighting of rapid traverse velocity (G129)

button Parameterization of acceleration profile

button Machining time or feedrate (G93/G94/G95/G194)

button Inserting of chamfers and rounding (G301/G302)

button Manual mode

button Requesting for offsets, command and actual values

button Gear change (G112)

button Influencing of look-ahead functionality (G115/G116/G117)

button Override (G166)


Path preparatory functions

More:

button Rapid traverse G00

button Linear interpolation G01

button Circular interpolation (G02/G03)

button Helical interpolation

button Dwell (G04), (#TIME)

button Programmable homing (G74)

button Coordinate preset (G92)

button Setting of negative software limit switch (G98)

button Setting of positive software limit switch (G99)

button Measuring functions


Rapid traverse G00

G00 Linear interpolation in rapid traverse (modal)

If G00 is selected, the rapid traverse speed of the axes specified in the machine parameters is used. Here, the resulting speed of the axes is given by the condition that at least one axis is moved in rapid traverse. Any number of straight movements could be programmed in the Cartesian coordinate system (X, Y, Z). All programmed tracking axes are moved with linear velocity in such a manner that the start and the end of their movement take place simultaneously to that of the main axes.

Absolute dimensional input:

Nnnnn G00 G90 X120 Y80 U90 (traverse from P1 to P2)

Incremental dimensional input:

Nnnnn G00 G91 X80 Y60 U60 (traverse from P1 to P2)

Fig. 4.1: Positioning in rapid traverse

Special case: Alignment of a circular axis using G00 G90

If a rotatory axis is programmed through G00 with active G90 (G90: Absolute programming) the programmed target position is calculated in modulo. That means, that the rotatory axis moves a half-rotation in maximum.


Linear interpolation G01

G01 Linear interpolation with programmed feedrate (modal)

With G01 being selected, the programmed path is traversed with a feedrate, given by the F-word (unit configurable, for instance mm/min), on a straight line to the target position. Any desired number of straight lines can be programmed in the Cartesian coordinate system (X, Y, Z). All programmed tracking axes are moved with linear speed in such a manner that the start and the end of their movement take place simultaneously to that of the main axes.

Absolute dimensional input:

Nnn G01 G90 X60 Y60 U40 F1000 (traverse from P1 to P2 feedrate)
(1000mm/min)

Nnn X120 Y80 U90 (traverse from P2 to P3 feedrate 1000mm/min)

Incremental dimensional input:

Nnn G01 G91 X20 Y40 U10 F1000 (traverse from P1 to P2 feedrate)
(1000mm/min)

Nnn X60 Y20 U50 (traverse from P2 to P3 feedrate 1000mm/min)

Fig. 4.2: Linear interpolation (G01)


Circular interpolation (G02/G03)

G02 Circular interpolation clockwise circle (CW) (modal)

G03 Circular interpolation counter-clockwise circle (CCW) (modal)

When G02 (clockwise circle, CW) or G03 (counter-clockwise circle, CCW) is selected, the programmed path is traversed with a feedrate given by the F-word, on a circular movement to the target position. Circular movements can be run in the three main planes of the spatial coordinate system (X-Y, Z-X, Y-Z). The selection of the main plane is done using the functions G17, G18, G19 (see also Chapter4.4: Selection of planes).

All programmed tracking axes are moved with linear velocity in such a manner that the start and the end of their movement take place simultaneously to that of the main axes.

Fig. 4.3: Elucidation of circle functions G02 and G03

For defining the circle, the starting point of the circle "Ka" (determined through the previous block), the end point of the circle "Ke" and the center point of the circle "Km" are taken. The specification of the center point of the circle is done through the interpolation parameter I, J, K relative to the starting point of the circle under a valid G162. Absolute under a valid G161.

G162: (basic settings)

I - relative position of Km in the X-direction

J - relative position of Km in the Y-direction

K - relative position of Km in the Z-direction

G161:

I - absolute position of Km in the X-direction

J - absolute position of Km in the Y-direction

K - absolute position of Km in the Z-direction

In case of a wrong definition of the circle center point, an error message is output, if center point correction is not switched on (G165). Under an active G165, a center-point is determined in a way that a circle can be traversed. This also means that if the interpolation parameters are not programmed, the circle-center-point-correction originates from I, J, K = 0. Moreover, the circle center point coordinates are "non-modal.

If under active G02/G03 the interpolation parameters are programmed without the circle ending point, then a full circle is traversed.

The maximum permissible circle radius is 109 mm.

However the end point of the circular arc may not exceed the maximum traverse range +- 2,14*105 mm of the axes.

Syntax example for G17 plane:

G02 | G03 [X<expr>Y<expr>] I<expr>J<expr> | R<expr>

G02 | G03 Circular interpolation CW / CCW

X<expr> Y<expr> End point in XY plane

I<expr> J<expr> Position of circle center point of the interpolation in XY plane (I in X, J in Y), according to G161/G162

R<expr> Radius of the circle (alternative to I,J)

Programming example

N10 G01 X10 Y10

N20 G02 X30 Y30 I10 J10 (Semicircle, circle end point X30 Y30)

N30 I10 J10 (Full circle)

N40 X50 Y50 (Error message, since no center point or)
(radius was specified)

Syntax according to the selected interpolation plane:

Plane | Interpolation type | End point in plane | Center point /Radius
G17 | G02/G03 | X..Y.. | I..J../R
G18 | G02/G03 | Z..X.. | K..I../R
G19 | G02/G03 | Y..Z.. | J..K../R

Absolute dimensional input:

Nnn G90 F1000 (Absolute dimension, feedrate)

Nnn G17 (Selection of X-Y-plane)

Nnn G03 G161 X60 Y50 I60 J30 U90 (Circle: Ka -> Ke and)

(linear interpolation: P1 -> P2)

Incremental dimensional input:

Nnn G91 F1000 (Incr. dimension, feedrate)

Nnn G17 (Selection X-Y-plane)

Nnn G03 G162 X20 Y20 I20 U50 (Circle : Ka -> Ke and)

(linear interpolation: P1 -> P2)

Fig. 4.4: Example for circle interpolation

Alternatively, circles can also be programmed through radius specification. This is possible by G163=" " or also using the address character R=" value of radius". Also, the definition through R1=" value of radius" is possible with identical results (see also chapters 4.19 - 4.21)

812_start


Helical interpolation

The helical interpolation is a superimposition of a circular interpolation (plane of the 1. and 2. main axes) and a linear movement in the 3. main axis. The resulting screw-shaped movement (helix) will be executed with a constant pitch. The pitch will be programmed by the third parameter of the circular interpolation dependent on the selected plane.

Syntax example for plane G17:

G02 | G03X<expr>Y<expr>Z<expr>I<expr>J<expr> | R<expr>K<expr>

G02 | G03 Circular interpolation CW / CCW

X<expr> Y<expr> Target point in plane XY

Z<expr> Target point on the helical axis perpendicular to plane XY

I<expr> J <expr> Position of the circle center point of the interpolation in plane XY
(I in X, J in Y), corresponding to G161/G162.

R<expr> Radius of the circle to be interpolated (alternative to I,J)

K<expr> Helix pitch in Z (value generally unsigned)

Syntax corresponding to the selected interpolation plane:

Plane | Type of interpolation | Target point in plane | Target point on helical axis | Center /radius | Pitch
G17 | G02/G03 | X..Y.. | Z.. | I..J../R | K
G18 | G02/G03 | Z..X.. | Y.. | K..I../R | J
G19 | G02/G03 | Y..Z.. | X.. | J..K../R | I

It is not necessary to define the pitch in a way, that the helix exactly reaches the programmed target point. In such cases the NC-Kernel calculates under consideration of the fixed positions of start- and target point a "corrected" pitch, which is approximated as close as possible to the programmed pitch.

For this based on the programmed pitch the target point of the helix will be calculated at first. If this calculated target point differs from the programmed target point, a correction will be necessary. The criteria for the correction is the distance between the programmed target point and the calculated target point saw in direction of rotation.

If the distance is smaller or equal π(180°), the target point of the helix will be moved on the programmed target point contrary to the direction of rotation. So this means the pitch will be increased.

If the distance is more than π(180°), the target point of the helix will be moved on the programmed target point in the direction of rotation. So this means the pitch will be decreased.

Correction of the helix pitch dependent on the direction of rotation

Example 1:

Principal correction of a helix clockwise (G02).

Case 1:

The target point calculated with the programmed pitch Pprog is within the area of 180° degree behind the programmed target point (saw in direction of rotation). For correction the pitch Pkorr must be increased.

Case 2:

The target point calculated with the programmed pitch Pprog is within the area of 180° degree before the programmed target point (saw in direction of rotation). For correction the pitch Pkorr must be decreased.

Example 2:

Helical interpolation clockwise in plane XY with following helix:

Starting point a: X-10 Y0 Z0

Target point b: X0 Y-10 Z-20

Helix center I, J: zero point

Helix pitch K: variable

:

N10 G17 G90 X-10 Y0 Z0 F500

N20 G02 X0 Y-10 Z-20 I0 J0 K..

:

Minimum rotation: ¾ à pitch K=26,66

Pitch K ≥ 26,66:

The helix from a to b will generally be executed in ¾ rotation, because the correction is limited to the maximum possible pitch K = 26,66.

Pitch K < 26,666:

Programmed pitch K (in mm) | Helix rotation from a to b | Corrected pitch K (in mm)
17,5 | ¾ | 26,66
16 | 1¾ | 11,4
15 | 1¾ | 11,4
12,5 | 1¾ | 11,4
10 | 1¾ | 11,4
7,5 | 2¾ | 7,27
5 | 3¾ | 5,33
2,5 | 7¾ | 2,58
2 | 9¾ | 2,05
1 | 19¾ | 1,01

812_end

More:

button Simple helical interpolation


Simple helical interpolation

At the simplified helical programming no pitch, but only a target point is defined. Dependent on the target point the result is a helical movement with maximally one complete rotation.

Syntax example for plane G17:

G02 | G03X<expr>Y<expr>Z<expr>I<expr>J<expr> | R<expr>

G02 | G03 Circular interpolation CW / CCW

X<expr> Y<expr> Target point in plane XY

Z<expr> Target point on the helical axis perpendicular to plane XY

I<expr> J <expr> Position of the circle center point of the interpolation in plane XY
(I in X, J in Y), corresponding to G161/G162.

R<expr> Radius of the circle to be interpolated (alternative to I,J)

Syntax corresponding to the selected interpolation plane:

Plane | Type of interpolation | Target point in plane | Target point on helical axis | Center /radius
G17 | G02/G03 | X..Y.. | Z.. | I..J../R
G18 | G02/G03 | Z..X.. | Y.. | K..I../R
G19 | G02/G03 | Y..Z.. | X.. | J..K../R

Example:

Helical interpolation counterclockwise in plane XY with following "helix":

Starting point a: X-10 Y0 Z0

Target point b: Z20

Helix center I, J: zero point

:

N10 G17 G90 X-10 Y0 Z0 F500 G161

N20 G03 I0 J0 Z20

:


Dwell (G04), (#TIME)

G04 <1.main_axis><expr> | <expr> (non-modal)

G04 Dwell time

<1.main_axis> <expr> The dwell time is specified with the name of the first main axis in seconds or

<expr>  as direct specification of the dwell time in seconds

Dwell is needed, for instance, during relief-cutting or possibly for machine functions.

The dwell may only be programmed alone in the NC-block (exception: block-no)..

Programming example

N10 G04 X4.13 (wait for 4.13 seconds)

or

N20 G04 2.13 (wait for 2.13 seconds)

Another possibility for specifying dwell is the usage of the extended function #TIME.

#TIME <expr> (non-modal)

#TIME Dwell time

<expr> Value of dwell time ic sec.

Programming example

N10 #TIME 4.13 (wait for 4.13 seconds)


Programmable homing (G74)

G74 Execute homing (non-modal)

G74 allows the NC-program-controlled execution of homing (RPF), where the axes to be referenced and the sequence in which the axes should execute the homing must be stated. The values programmed with axis names determine the sequence of homing.

For axes with the same value, homing is triggered simultaneously.

Further informations about referencing and homing are described in the functional description "Homing" [FCT-M1].

Programming example

Sequential commanding:

N10 G74 X2 Y3 Z1 Sequence of RPF: Z-> X -> Y

Paralell commanding:

N10 G74 X1 Y1 Z1 Sequence of RPF: X,Y,Z at the same time


Coordinate preset (G92)

G92 Coordinate preset (non-modal)

G92 allows a programmable additional zero offset in the given axes by an optionally programmable value. Depending upon the G90/G91-setting, the currently programmed offset is set absolutely or added to the existing one.

"Non-modal" only corresponds to G92; the coordinate preset itself is, of course, valid until the programming of another G92.

Programming example

N10 G90 ( Absolute dimensional specification )

N20 G92 X10 Z30 ( Displaces the programmed and the absolute )

. ( coordinates by 10 in X, 30 in Z )

.

.

Nnn G92 X0 Z0 ( Reset of coordinate preset to 0 )

Change of coordinate preset in the G91-mode:

Programming of:

N10 G92 X10 Y20
N20 G00 X0 G91

must not cause any movement in the X-axis (corresponding to relative movement 0). Thus coordinate presethas effect only for an axis when the next traverse information is programmed in absolute mode (G90).


Setting of negative software limit switch (G98)

G98 Setting of negative software limit switch (non-modal)

G98 sets the negative software limit switch positions in all programmed axes. Depending upon the G90/G91 setting, this can be absolute or cumulative to previous software limit-switch position.

The positions for the negative limit switch are filed in the axis-specific variables

V.A.-SWE.X, V.A.-SWE.Y, V.A.-SWE.Z, etc.

(see also chapter: 13.1 Axis-specific variables).

"Non-modal" only corresponds to G98, the software limit switch itself is, of course, valid program modal.

During reset and machine start up these variables are pre-allocated with values [2]-10.

Programming example

N10 G90

...

N100 G98 X-1000 Y-2000 Sets negative software limit switch in
X to -1000 and in Y to -2000


Setting of positive software limit switch (G99)

G99 Setting of positive software limit switch (non-modal)

G99 sets the positive limit switch positions in all programmed axes. Depending upon the G90/G91 setting, this can be absolute or cumulative to previous software-limit-switch position.

The positions for the positive limit switch are filed in the axis-specific variables

V.A.+SWE.X, V.A.+SWE.Y, V.A.+SWE.Z, etc.

(see also chapter: 13.1 Axis-specific Variables).

"Non-modal" only corresponds to G98, the software limit switch itself is, of course, valid program modal.

During reset and machine start up these variables are pre-allocated with values [2]-10.

Programming example

N10 G90

...

N10 G99 X+1000 Y+2000 Sets positive software limit switch in
X to +1000 and in Y to +2000


Measuring functions

After start-up of the control the default measuring type, specified in the channel parameter list [1]-1 is valid. With #MEAS MODE in the part program always a new measuring type can be selected (Chapter 11.10). The following 7 different measurement types are available:

Measuring types | Significance
1 | Measurement travel with at least one axis, Measurement feed programmable through F-Word.
2 | Measurement travel with exactly one axis. Measurement feed is specified in the axis parameter list [2]-5.
3 | Measurement travel with at least one axis, Measurement feed programmable through F-Word , optionally further traverse up to the destination point.
4 | Measurement travel only with the maximum of 3 main axes, Measurement feed programmable through F-Word.
5 | Interruptible measurement travel with at least one axis, Measurement feed programmable through F-Word.
6 | Interruptible measurement travel with at least one SERCOS-Axis, Measurement feed programmable through F-Word.
7 | Measurement travel with moving on a fixed stop with at least one axis, Measurement feed programmable through F-Word

More:

button Measurement with multiple axes (G100) (Type 1)

button Measurement with a single axis (G100) (Type 2)

button Measurement with movement to target point (G100/G106) (Type 3)

button Measurement with main axis (G100) (Type 4)

button Measurement with interruption and jump (G310) (Type 5,6)

button Measuring travel on a fixed stop (G100) (Type 7)

button Computation of measuring offsets (G101/G102)

button Edge banding (G108)


Measurement with multiple axes (G100) (Type 1)

G100 <axis_name><expr> { <axis_name><expr> } [F<expr> ] (non-modal)

G100 Selection measuring traverse

<axis_name><expr> Target point of measuring axis

F<expr> Measuring feed

Any axes may participate in the traverse movement of the measuring block. All axes programmed in the measuring block must be identified as a measuring axis [2]-1. The measuring method (Type 1) must be specified [1]-1.

During measurement, the occurrence of a measuring signal is registered in the measuring block. Linear interpolation is performed between the target point, that is specified in the NC-command, and the start point (same effect as with G01). In this document, the path velocity in the measuring block is referred to as 'measuring feed'. At least one axis must participate in a measuring traverse. The measuring feed is specified by the F-word. The movement in the measuring block must be greater than zero.

Programming example

%G100_Type_1

N10 G00 X0 Y0

N20 G100 X10 Y20 F200 ;X10/Y20 Target point of measuring traverse

...

Fig. 4.5: Programming the measuring function

The unit stops after the measuring signal has been stored. The remaining path of the measuring block is not output.

Programming example

%Meas_traverse

N10 G00 X0 Y0 Z0

N20 X5

N30 G100 X10 Y10 F500

N40 G01 X7

N50 M30

Fig. 4.6 shows the representation of the resulting path:

Fig. 4.6: Programmed path


Measurement with a single axis (G100) (Type 2)

G100 <axis_name><expr> (non-modal)

G100 Selection measuring traverse

<axis_name><expr> Target point of measuring axis

Exactly one axis may participate in the movements of the measuring block. The axis that is programmed in the measuring block must be identified as measuring axis [2]-1. The measuring method (Type 2) must be specified [1]-1.

During measurement, the occurrence of a measuring signal is registered in the measuring block. Linear interpolation is performed between the target point, that is specified in the NC-command, and the start point (same effect as with G01). In this document, the path velocity in the measuring block is referred to as 'measuring feed'. Exactly one axis must participate in a measuring traverse. The measuring feed is specified [2]-5. The movement in the measuring block must be greater than zero.

Programming example

%G100_Type_2

N10 G00 X0 Y0

N20 G100 X10 ;X10 Target point of measuring traverse

...

Fig. 4.7: Programming the measuring function

The unit stops after the measuring signal has been stored. The remaining path of the measuring block is not output. An error message is output if a measured signal cannot be acquired within the measuring block.

Programming example

%Meas_traverse

N10 G00 X0 Y0 Z0

N20 Y5

N30 G100 X10

N40 G01 X7

N50 M30

Fig. 4.8 shows the representation of the resulting path:

Fig. 4.8: Programmed path


Measurement with movement to target point (G100/G106) (Type 3)

G100 <axis_name><expr> { <axis_name><expr> } [G106] [F<expr> ] (non-modal)

G100 Selection measuring traverse

<axis_name><expr> Target position of measuring axis

G106 Movement to target point

F<expr> Measuring feed

Any axis may participate in the movements of the measuring block. Each axis that is programmed in the measuring block must be identified as measuring axis [2]-1. The measuring method (Type 3) must be specified [1]-1.

During measurement, the occurrence of a measuring signal is registered in the measuring block. Linear interpolation is performed between the target point, that is specified in the NC-command, and the start point (same effect as with G01). In this document, the path velocity in the measuring block is referred to as 'measuring feed'. At least one axis must participate in a measuring traverse. The measuring feed is specified by the F-word. The movement in the measuring block must be greater than zero.

Programming example

%G100_Type_3

N10 G00 X0 Y0

N20 G100 X10 Y20 F200 G106 ;X10/Y20 Target point of measuring traverse

...

Fig. 4.9: Programmed measuring function

After a measuring signal has been detected, the system advances as far as the target point of the measuring block if G106 is programmed. If G106 is not programmed, the system decelerates after the measuring signal and the remaining traverse path is no longer output (same behavior as with measuring Type 1).

Programming example

%Meas_traverse

N10 G00 X0 Y0 Z0

N20 G01 X5 F500

N30 G100 G106 X10 Y10 ;After measuring signal traverse to target point

N40 G01 X7

N50 M30

Fig. 4.10 shows the representation of the resulting path

Fig. 4.10: Programmed path


Measurement with main axis (G100) (Type 4)

G100 <axis_name><expr> { <axis_name><expr> } [F<expr> ] (non-modal)

G100 Selection measuring traverse

<axis_name><expr> Target position of measuring axis

F<expr> Measuring feed

The three primary axes may participate in the movements of the measuring block. Each axis that is programmed in the measuring block must be identified as measuring axis [2]-1. The measuring method (Type 4) must be specified [1]-1.

During measurement, the occurrence of a measuring signal is registered in the measuring block. Linear interpolation is performed between the target point, that is specified in the NC-command, and the start point (same effect as with G01). In this document, the path velocity in the measuring block is referred to as 'measuring feed'. A maximum of three primary axes may participate in a measuring traverse. The measuring feed is specified by the F-word. The movement in the measuring block must be greater than zero.

Programming example

%G100_Type_4

N10 G00 X0 Y0

N20 G100 X10 Y20 F200 ;X10/Y20 Target point of measuring traverse

...

Fig. 4.11: Programming the measuring function

The unit stops after the measuring signal has been stored. The remaining path of the measuring block is not output.

Programming example

%Meas_traverse

N10 G00 X0 Y0 Z0

N20 X5

N30 G100 X10 Y10 F500

N40 G01 X7

N50 M30

Fig. 4.12 shows the representation of the resulting path:

Fig. 4.12: Programmed path


Measurement with interruption and jump (G310) (Type 5,6)

G310 [G00 | G01] <axis_name><expr> {<axis_name><expr>} [$GOTO<Label>] (non-modal)

G310 Interruptible block

G00 | G01 Interruptible mode of interpolation

<axis_name><expr> Target position of measuring axes

$GOTO<Label> Jump label after interrupted measuring traverse

Any axes may participate in the traverse movement of the measuring block. All axes programmed in the measuring block must be identified as a measuring axis [2]-1. The measuring method (Type 5,6) must be specified [1]-1.

This measuring method offers the possibility to abort a movement by a measuring signal. The motion must explicitly be programmed in the same block. When the motion is aborted by the measuring signal, the logic branches to the label that is specified in the G310 block. If the measuring signal does not occur during the motion block, the NC program execution is continued with the next NC block.

Programming example

N10 G00 X0 Y0

N20 G310 G01 F100 X100 Y200 $GOTO[N_LABEL] (If interrupt. jump to N_LABEL)

N30 G01 X200

N40 $GOTO[ENDE]

N50 [N_LABEL] X0 Y0

N60 [ENDE] M30

Once the motion has been interrupted by a probe signal, the coordinates of the programmed target point are replaced with the actual positions of all measuring axes that exist in the channel. Next, the logic jumps to the specified block

If a signal is not received, the system moves to the programmed target point. Subsequently, there will be no jump; and the next block will be executed.

The next block is always executed if a label has not been programmed

The current axis positions after an interruption of the motion can be read in the NC program via the V.A.MESS[..] variable..

An interruption during active TRC (G41/G42) is not allowed and causes an error message.


Measuring travel on a fixed stop (G100) (Type 7)

During measuring with movement on a fixed stop in all involved drives a torque limitation has to be activated and an eventually existing drive based position lag monitoring has to be deselected.

The measuring is finished, if in one of the involved axes the fixed stop has been detected.

A programming example and the adjustments, necessary for the measuring with movement on a fixed stop are shown in greater detail in the functional description "Measurement (C4)" ([FCT-C4]).


Computation of measuring offsets (G101/G102)

The measuring offset is the offset between the recorded measured values and the target position (see Fig. 4.13). It is calculated as following:

Measurement offset = measurement position  target position

Fig. 4.13: Measuring offset

G101 <axis_name><expr> { <axis_name><expr> } (non-modal)

G101 Inclusion of measuring offsets in shifts

<axis_name><expr> Axis specific factor for the inclusion of measuring offsets

It is also possible to specify several axes with measurement type 2 if a separate measurement traverse has been executed beforehand for each of these axes.

For the programmed coordinates, the measuring offset, that is determined from the measured values, is included as an additional shift between programmed and absolute coordinates. An error message is output if measured values have not been acquired beforehand. The number that follows the axis designation represents the factor for the inclusion.

The shift by the measuring offset is valid until it is de-selected by G102.

Programming example

Includes the measuring offset for X with factor 1 and for Y with factor 7 in the shift between programmed and absolute coordinates.

N10 G101 X1 Y7

G102 { <axis_name><dummy_expr> } (non-modal)

G102 Extracting measuring offsets from shifts

<axis_name><dummy_expr> Axis, for which the measuring offsets must be extracted.

The measured values that have been acquired with G100 and included as further shifts with G101 are extracted according to the following rules:

If one or more axes are programmed, the measureing shifts of these axes are extracted. If no axis is given, the measureing shifts of all axes are extracted. An error message will be output if measured values have not been included beforehand.

Compared to G101, the value behind the axis specifier is meaningless but requested due to syntactical reasons. Always the shift, which is specified by G101 will be extracted.

Programming example

N10 G102 X1 (Extract measuring shift from X-axis )

N20 G102 (Extract measuring shift from all axes )


Edge banding (G108)

The wood machining and furniture industry needs the edge banding function for the exact glueing of veneer strips. When a veneer strip is glued on, the position of the beginning of the edge on different workpieces may differ by several millimetres. Thus, the veneer strip must be cut at a position that is different from the NC block boundary. This is a two-dimensional problem on the XY plane and includes linear and circular movements.

The beginning of the veneer edge is measured by a leading probe (Fig. 4.14). The measured values are used for determining the exact position at which the veneer edge must be cut.

The following behaviour must be achieved:

When the measuring probe is crossed, the interpolator outputs a defined residual path. The system then waits until all axes are inside the control window. Next, an M function of synchronization type MNE_SNS [1]-3 is transferred to the PLC interface that causes the veneer strip to be cut. After acknowledgement, interpolation is continued up to the programmed target point. Only one MNE_SNS-function may be active. This means, multiple programming in one NC-block is not allowed. But the MNE_SNS-function may be programmed together with M-functions of other synchronization types.

Fig. 4.14: Glueing on a veneer strip and edge banding

G108 Edge banding (modal)

Edge banding is activated by the modal function G108. Depending on the settings in the channel parameter list [1]-28 following two methods are possible:

If only one CNC axis is moved, G108 also is allowed without main axis motion. In this special case the measurement can be executed in one of the dragged axis.

More:

button Edge banding in one movement block (Method 1)

button Edge banding for several movement blocks (Method 2)

button Programming of residual path


Edge banding in one movement block (Method 1)

The selection of the measurement via G108 has a modal effect until an M function of the MNE_SNS type is programmed [1]-3. Measurement is started at this M function. The measuring signal must occur during the motion block that has been programmed together with this M function.

After the measuring signal has been detected, the system continues moving by the specified residual path [1]-2. G108 is deactivated implicitly.

Programming example

N05 X0 Y0

N10 G108 (Activate edge banding)

N20 G01 X90 Y90 F20

N30 M97 G01 X150 Y150 F8 (M97 is of MNE_SNS type, start measuring)

(Continue by residual path after measuring)
(signal)

M30

If during measuring no measuring signal was detected, at block end an error message is created.


Edge banding for several movement blocks (Method 2)

Often a contour is described by a lot of short NC-blocks (e.g. created by CAD-system). For such kind of contours during edge banding it is difficult to localize exactly the cut of the veneer strip at a NC-block boundary.

G108 also activates edge banding and has a modal effect. A special parametering in the channel parameters list [1]-28 offers the possibility to execute the cut of the veneer several movement blocks after the M-function. The M-function itself is executed at once, but the measuring signal is given later on. After the measuring signal has been detected, the system continues moving by the specified residual path [1]-2 via several NC-blocks. G107 indicates explicitly the end of measuring. Until that point in time the measuring signal must be detected.

G107 De-selection of inter block global edge banding (modal)

Programming example

N05 X0 Y0

N10 G108 (Activate edge banding)

N20 G01 X90 Y90 F20

N30 M97 G01 X100 Y100 F8 (M97 is of MNE_SNS type, start measuring)

N40 X110 Y110

N50 X120 Y120

N60 X130 Y130

N70 X140 Y140

N80 X150 Y150 (<- last block of measuring!)

N90 G107 (End of measuring for edge banding)

N80 G00 X200 Y200

M30

The measuring process is also possible in the same movement block. But in this case method 1 offers a programming in an easier way.

If during measuring no measuring signal was detected, at G107 an error message is created.


Programming of residual path

V.G.RW Residual path at edge banding (Read and write access)

The axis-group-specific "V.G.RW" variable can be used for redefining the residual path in edge banding. The residual path is the path that remains to go after the measuring signal has arrived. In the initial state, the corresponding working data item of the residual path is taken from the channel parameters list [1]-2.

Programming example

N010 G91 G00 X0 Y0 Z10 (Linear interpolation

N020 V.G.RW = 5D (Definition of a new resid. path)

N030 G108 (Activate edge banding)

N040 G01 X10 Y10 F300 (Linear interpolation)

N050 M97 G01 X30 Y10 F200 (M97 is of the MNE_SNS type,)

(Measurement with lin. interpol., continue)

(by residual path after measuring signal)

The M function for edge banding must be defined as an MNE_SNS type [1] -3.


Feed adaptation (G08/G09/G900/G901)

The feed adaptation is only active combined with linear slope.

G08 Acceleration at the block beginning (modal, default)

G09 Deceleration at the block end (non-modal, effect depends

on G901/G900)

G901 Deceleration after block end, can be
canceled block by block with G09 (modal)

G900 Deceleration at block end is modal active
independent of G09 (modal)

If two NC-blocks following one after the other are programmed with different feedrates, a "soft" adaptation occurs at the block limit. According to G08 an acceleration takes place exclusively at the block beginning. With G09, it is specified that a deceleration of the feedrate of the next block should occur already at the end of the current block.

G09 is the default mode at program start. With G901 the default mode can be set on deceleration after block end. The inverse G function G900 is for to switch back and is equivalent to the default mode of the channel.

During transition from G00 to G01, G02 or G03, basically, G09 is active i.e. deceleration at block-end down to the velocity of the following block.

Fig. 4.15: Acceleration at block-transition in the default state (corresp. to G08)

Fig. 4.16: Deceleration at block transition with G901 and G900

Fig. 4. 17 : Combination of G09 with G901 and G900


Path /Time related feed interpolation (G193/G293)

The path related feed interpolation is only active combined with linear slope or slope type 3 (HSC slope).

The time related feed interpolation is only active combined with linear slope.

G193 Path related feed interpolation (non-modal)

G293 Time related feed interpolation (nicht modal)

With G193/G293 the feedrate between the initial and the programmed end velocity is linearly interpolated.

Programming example

N10 G01 X500 F1000

N20 G193 X900 F400

N30 X1000 F400

At block-transition N10 / N20 the path related feed interpolation is actuated and deceleration to the end velocity is done linearly through the path programmed in N20.

Fig. 4.18: Path related feed interpolation with G193

Override changes are superimposed under consideration of the permissible axis dynamics.

The programming of G193 with G293, G08 or G09 in the same NC-block is not permissible.

Programming example

N10 G01 X500 F1000

N20 G293 X900 F400

N30 X1000 F400

At block-transition N10 / N20 the time related feed interpolation is actuated and deceleration to the end velocity is done linearly through the time.

Fig. 4.19: Time related feed interpolation with G293

The programming of G293 with G193, G08 or G09 in the same NC-block is not permissible.


Selection of planes (G17/G18/G19)

G17 X-Y - Plane (modal, default)

G18 Z-X - Plane (modal)

G19 Y-Z - Plane (modal)

By programming of G17, G18 or G19 the plane is determined in which the tool radius compensation and circle interpolation (see also chapter4.1.3 Circular interpolation (G02/G03)) is expected to be active.

Fig. 4.20: Illustration of the plane selection

Tool radius compensation:

Attention has to be paid, that the tool radius compensation is always active at the first two main axes.

Circular interpolation:

After the changing of the plane with G17, G18 or G19, the allocation in accordance with DIN is valid again: X, Y, Z would be assigned to I,J,K. The syntax according to the selected interpolation plane shows the table below:

Plane | Interpolation type | End point in plane | Center point /Radius
G17 | G02/G03 | X..Y.. | I..J../R
G18 | G02/G03 | Z..X.. | K..I../R
G19 | G02/G03 | Y..Z.. | J..K../R


Mirroring (G21/G22/G23/G20)

For mirroring, the definition "mental coordinates" is introduced. Before or in case of de-selected mirroring functions, programmed and mental coordinates are identical. If a mirroring is active, the mental coordinates are the values inputted by the programmer. The programmed coordinates are mirrored, i.e. are in fact traversed.

The following mirroring functions are available (e.g. X-Y plane):

G21 Mirroring of programmed path on the Y-axis (modal)

xm = - xp

ym = yp

G22 Mirroring of programmed path on the X-axis (modal)

xm = xp

ym = - yp

G23 Superimposing of G21 and G22 (modal)

xm = - xp

ym = - yp

G20 Deselection of mirroring (modal)

xm, ym : Mental coordinates

xp, yp : Programmed coordinates

xa, ya : Absolute coordinates

Fig. 4.21: Mental and programmed coordinates associated with G21

Contours to be mirrored are to be specified in a sub routine. This sub routine is called after the mirroring function. The mirroring is modal.

If the mirroring is programmed during selected tool radius compensation, the side of the compensation does alter. That means, under active G41, the equidistant to programmed path after mirroring will be calculated to the right of the contour (G42: TRC right of the contour). This happens even if the traverse direction itself has possibly changed.

Programming example

%L DREIECK (Subroutine: )

N10 G90 X10 Y20 (Determination of the (mental)coordinates)

N20 G91 X10 Y-10 (to be mirrored )

N30 X-10 Y-10

N40 Y20

N50 M29

%SPIEGELUNG (Main program: )

N10 G92 G90 X60 Y40 (Coordinate preset )

N20 G01 F500 (Linear interpolation with feed 500)

N30 G21 (Mirroring on the Y-axis )

N40 LL DREIECK (Deselection of mirroring )

N60 G92 X0 Y0 (Withdrawal of coordinate preset)

N70 M30

Fig. 4.22: Example for mirroring

Note when mirroring circles:

Generally only programmed coordinates will be mirrored (so in case of a full circle just the center-point coordinates). After the selection of mirroring the mirrored ending point will directly be traversed. The starting point of the traversing movement will not be mirrored.

Consequence: In the traversing block only the ending point but not the complete traversing movement will be mirrored ( Fig. 4.23 ).

Effect: If the traversing block is a full circle and the starting/ending points are not on 0/0, the mirroring of the center-point coordinates results to a new circle radius and a changed contour ( Fig. 4.24 )!

Fig. 4.23: Mirroring of the ending point in the traversing block.

Fig. 4.24: Changing the contour when mirroring a full circle.

3-D considerations:

If the mirroring functions are chosen in a plane other than the XY-plane (G18, G19) then, it should be noted, that under circular interpolation the direction of rotation possibly changes, depending upon the selected plane: Further, the mirroring has no influence on the Z-coordinate, i.e. mental and programmed values in Z-direction are always identical.

Fig. 4.25: Effects of mirroring functions upon direction of the circular rotation at different planes


Mirroring with axis information (G351)

The G-functions G20 to G23 that are freely available in conformity with DIN 66025 have been used for mirroring [2]. The following extended syntax offers the possibility, to programm explicitly the axes for mirroring.

G351 <axis_name> [ [+] | - ] 1 { <axis_name> [ [+] | - ] 1 } (non-modal)

G351 Axis-specific selection of mirroring. The G-function G351 is non modal, but mirroring is modal for an axis programmed with this function.

<axis_name> A coordinate consists of an address letter followed by a mathematical expression on the basis of which the coordinate value is calculated.

Coordinate value -1: Selects mirroring

Coordinate value 1 or +1: Cancels mirroring

Programming example

G351 X-1 Y1 Z+1 (Selects mirroring of the X axis and cancels mirroring)
(of the Y and Z axes)

q The axes to be mirrored can be programmed anywhere in the NC-block.

q At least one axis coordinate must be programmed together with G351.

q The function G351 must be programmed on its own in the NC-block. The block number N is an exception to this rule

q Repeated selection or cancellation of mirroring of an axis is permissible. However, an error message is output in the event of repeated programming in the same NC block.

q If mirroring is selected in synchronous operation for the leading axis (master axis), mirroring is not automatically also selected for the trailed axis (slave axis). However, the slave axis is always trailed according to the travel movements of the master axis. An additional travel movement as the result of mirroring of the master axis therefore always influences the slave axis.

q Mirroring is canceled for all axes at program start and reset. When axes are exchanged, mirroring of the changed axis is canceled.

q Mirroring of the first or second main axis influences the direction of travel during circular interpolation and tool radius compensation.

q When mirroring is programmed with active tool radius compensation, the selected side of (G41/G42) is swapped automatically by the Decoder. This is only allowed for linear blocks. This behaviour is firmly given by the control manufacturer.

Fig. 4.26: Mirroring of the selected side during active tool radius compensation

q If a reference point offset is programmed for a mirrored axis, the coordinates for the reference point offset are also mirrored. When mirroring of an axis is selected or canceled, the reference point offset is also mirrored.

Fig. 4.27: Mirroring of reference point offset

q The coordinates of circle center point I, J, K are also mirrored (Chapter 4.5)

q For the insertion of chamfers and roundings (G301/G302) the I-string is used to enter the value of the chamfer or rounding. Therefore mirroring has not to be considered here.

q G21 to G23 only select mirroring for the first two main axes regardless of the axis designation.

q G20 only cancels mirroring of the first two main axes.

The following example shows how to use the G351 function. Let us assume that the axes X, Y and Z are the first, second and third main axes here.

Programming example

N10 G351 X-1 (Selects mirroring of the X axis (G21))

N20 G351 Y-1 (Selects mirroring of the Y axis (G22))

N30 G351 X-1 Y-1 (Selects mirroring of the X and Y axes (G23))

N40 G351 X1 Y+1 (Cancels mirroring of the X and Y axes (G20))

N50 X1 G351 Y-1 Z1 (Selects mirroring of the Y axis and cancels)

(mirroring of the X and Z axes)


Units (G70/G71)

G70 Inch data input (modal)

G71 Metric data input (modal, default)

The statement G70 or G71 act upon all path and coordinate-values.

Exception: Reading/writing of tool parameters (V.G.WZxx.Pxx.) and kinematic parameters (V.G.WZxx.KIN_PARAMxx) always acts directly without consideration of the current unit.


Implicite subprogram calls (G80-G89/G800-G819)

TwinCAT CNC: Overview

Implicite subprogram calls (G80G89/G800-G819)

G80  G89 [ [<val1>,<val2>, - ,<val10>] ] Sub program call (non-modal)

or in addition

G800  G819 [ [<val1>,<val2>, - ,<val10>] ] Sub program call (non-modal)

G8x / G8xx At the programming of G80G89 and G800-G819 an assigned global subprogram is implicitly executed. The default names of these subprogramms can either be configurated in the channel parameters [1]-45/ [1]-46 or defined during NC program execution by the command #FILENAME.

If at the programming of G80G89 and G800-G819 no assigned program name is available, the error message P-ERR-20131 "Unknown G function" is generated.

The global subprogram is called only once, this means G80G89 and G800-G819 has no modal effect.

<val1> , - , <val10> For the supply of a sub program (cycles) with additional data in an optionally following bracketing up to 10 parameters (mathematical expressions in REAL format) can be programmed in a fixed sequence. The parameters are separated by commas. Gaps in sequence have to be indicated by serially-ordered commas ", ," .

Analogous to the normal cycle programming in the sub program the parameters can be read via the @Px access. There is a fixed assignment between the transfer parameter and the @Px read access. (e.g. @P1 reads parameter value 1, @P2 reads parameter value 2 and so on). In this kind of so-called sub programms also the additional extended cycle syntax with the @ - character can be used. Weather a parameter is programmed (valid), can be checked in sub program (cycle) by the variable V.G.@P[i].VALID.

A G80G89 and G800-G819 is executed as the last action at block end. This means, axes motions programmed in the same NC block always are executed before the call of the global subprogram.

Programming example

For G80 the global sub progr. - g80_cycle.nc  shall be called:

..

N10 #FILENAME[ G80="g80_cycle.nc" ]

Nx ..

N30 G80 Call of g80_cycle.nc as global subprogram

:

M1000 M30

For G815 the global sub progr. - g815_cycle.nc  shall be called:

..

N10 #FILENAME[ G815="g815_cycle.nc" ]

Nx ..

N30 G815 Call of g815_cycle.nc as global subprogram

:

G85 calls the global sub progr. - cycle_tst.nc  with parameters:

N10 #FILENAME[ G85="cycle_tst.nc" ]

Nx ..

N30 G85 [10,2, ,15,-3, ,5] Call of cycle_tst.nc as global subprogram

:


Absolute or incremental dimensioning (G90/G91)

G90 Absolute dimensioning (modal, default)

G91 Incremental dimensioning (modal)

In case of absolute dimensional input (G90), all the coordinate specifications are based on the coordinate basic origin, i.e. the coordinates in a traversing block specify the target position in the coordinate system.

In the case of incremental programming, the coordinate values are based on the target position of the preceding traverse block, i.e. the coordinates in a traversing block specify the path to be traversed.

More:

button Exklusive programming

button Combined programming


Exklusive programming

In the default adjustment only absolute or incremental dimensioning may be selected in NC block. Redundant programming or programming of G90 and G91 in the same NC block is not allowed. That's why the position of G90/G91 inside the NC block has no meaning.

Programming example

:

N10 X10 Y10 (Absolute dimensioning G90 is selected, Default)

N20 G91 X20 Y20 (Deselection of absolute- and selection of relative)

(programming)

N30 X30 G90 Y30 (Deselection of relative- and selection of absolute)

(programmig)

:

N100 G90 Z30 G90 (Error message: Redundant programming of G90/G91)

N110 G91 X10 G90 Z30 (Error message: Redundant programming of G90/G91)


Combined programming

With the channel parameter [1]-42 the exclusive programming of dimensioning for coordinates of path axes can be disabled. Then it is possible to use absolute and incremental dimensioning in the same NC block. Also the repeated use of G90 and G91 in the same NC block is allowed. In this case the position of G90/G91 inside the NC block has a meaning. The dimensioning programmed last is valid for all following axis positions and for all further NC blocks until the next G90/G91.

Programming example

:

N10 X10 Y10 (Absolute dimensioning G90 is selected, Default)

N20 G91 X20 G90 Y20 (Relative for X axis, absolute fr Y axis)

N30 X30 G91 Y30 Z20 (Absolute for X axis, relativ für Y/Z axes)

N30 G90 X30 G91 Y30 G90 Z20 (Absolute for X/Z axes, relative for Y axis)

:

N100 G90 G91 Z30 (Relative for Z axis)

N110 G91 X10 G90 Z30 (Relative for X axis, absolute for Z axis)

G90/G91 has no influence on the parameters I, J, K of circular or helical interpolation. Its dimensioning system is defined exclusively by G161/G162.


Exact stop (G60, G360, G359)

G60 Exact stop (non-modal)

... or for exact stop over several blocks:

G360 Selection of exact stop (modal)

G359 Deselection of exact stop (modal)

G60/G360 allows the precise approach to a target position within the precision-limits. The feedrate is decreased to zero till the end of the block, and the following-error is eliminated.

The precision stop can be used if edges are to be exactly machined or if the target position must be accurately reached at reversal of the direction. The traverse is continued to the next position, if a specified control-window is reached [2]-12.


Polynom contouring (G61, G261, G260)

G61 Polynom contouring (at block end) (non-modal)

...or for polynom contouring over several blocks:

G261 Selection of polynom contouring (at block end) (modal)

G260 Deselection of polynom contouring (modal)

"Polynom contouring" is the curvature and direction-continuous connection of two traverse blocks. For this purpose, the programmed traverse blocks are shortened. Between the blocks, a contour curve is added. This process permits contouring between the transitions straight line - straight line, straight line - circle and circle  circle (Fig. 4.28). It is not restricted to a particular plane, but rather allows the contouring between curves located anywhere in 3D-space.

Fig. 4.28: Examples of polynom contouring

Following types of contouring are available:

q Automatic contouring with maximum corner deviation

q Automatic contouring with velocity

q Corner distance contouring

q Corner deviation contouring

q Interim point contouring

Depending on the contouring type different parameters can be given, which characterize a contour curve. The parameters remain valid as long as the contour process has been completely executed. If the contour parameters between the pre-block and the post-block are altered then the change affects only the next contouring process.

More:

button Terminological definitions

button General Properties

button Programming

button Examples

button Overview of the processes

button Remarks


Terminological definitions

In this programming manual, the following terminologies are used:

Polynom contouring: Curvature and direction-continuous connection of two traverse blocks.

Contour curve: Curve out of two polynominals of 4th order per axis.

Block lengths: The block lengths of the curve corresponding to the traverse block.

Corner distance: Distance of the start/end of the contour curve to the programmed target point/start point of a traverse block (see the following figure). The corner distance is always limited to half the block length. In a circular block, the corner distance is the arc length from the starting point of the contour curve up to the programmed end point of the arc.

Fig. 4.29: Definition of corner distance

Pre-block: Traverse block before the contour curve

Post-block: Traverse block after the contour curve

Pre-distance: Corner distance of pre-block

Post-distance: Corner distance of post-block

Interim-point: Point at which the two partial curves of the contour curve border each other.

Corner deviation: The distance between the programmed corner point and the interim point of the contour curve (see the following fig.).

Fig. 4.30: Definition of corner deviation

Programming example

Compare of programming G61  G261/G260:

%poly_G61 %poly_G261_1 %poly_G261_2

N10 X0 Y0 G01 F1000 N10 X0 Y0 G01 F1000 N10 X0 Y0 G01 F1000

N20 X20 Y100 N20 X20 Y100 N20 X20 Y100

N30 G61 X40 Y100 N30 G261 X40 Y100 N25 G261

N40 G61 X60 Y20 N40 X60 Y20 N30 X40 Y100

N50 G61 X80 Y20 N50 X80 Y20 N40 X60 Y20

N60 G61 X100 Y100 N60 X100 Y100 N50 X80 Y20

N70 X120 Y100 N70 G260 X120 Y100 N60 X100 Y100

N80 X140 Y20 N80 X140 Y20 N70 X120 Y100

N90 X160 Y20 N90 X160 Y20 N75 G260

N100 M30 N100 M30 N80 X140 Y20

N90 X160 Y20

N100 M30


General Properties

The process of the geometrical polynom contouring bases on the path contour of the main axes in all three dimensions. The corner distance results from the predefined settings like corner deviation or percentage path velocity. This means, the starting point respectively the target point of the polynom on the original path is known.

From the calculated corner distance of the main axes also the corner distance of the slave axes can be determined. In the same manner like for main axes also for slave axes between the corner distances of the pre- and the post-block under consideration of the maximum acceleration of the axes a curvature and direction-continuous polynom is inserted.

The possibly specified limit for the corner deviation just considers the main axes. Therefore a separate limit for the deviation of the slave axes can be specified. Any theoretical exceeding of this deviation by a slave axis causes a reduction of the contouring curve (deceleration of the corner distance).

The polynom contouring automatically is suppressed if:

q the movement of the all axes is tangential or directly is mirrored.

q the movement of just the main axes is tangential and no maximum deviation of the tracking axis is specified (value = 0).

q after G61 the program end without any post block is reached. Additionally an warning message is raised.

More:

button Maximum corner distance, remaining minimum block length

button Relevant block length

button Execution of additional blocks

button Jerk within the polynom

button Characteristic of velocity in the contouring section


Maximum corner distance, remaining minimum block length

To avoid any degeneration of the polynom curves additionally following limitations are valid:

q The corner distance can not be greater than 50% of the original block length. Otherwise the corner distance of the pre- and post-block is limited respectively. If the corner distance at block start and block end is 50% of the original block length, this block is skipped completely.
During parametering of contouring the minimum remaining block length can be set between 0% and 100%. This corresponds to a variable maximum corner distance from 50% to 0%. At every program start the default minimal remaining block length is 0% (complete contouring of the block). If the minimum remaining block length is given e.g. with 10%, the corner distances of this block can maximally be (100% - 10%) / 2 = 45% of the original block length.

q In circular blocks the maximum corner distance is limited to an circular angle of 90° degree.


Relevant block length

The minimum curve length is limited because of the mathematical resolution of the control (given by the number of significant digits of a REAL64-value and the procedure). At the moment this length is 15,85 micrometer. Path segments less than this minimum curve length causes an error message and the abortion of contouring.

Additionally the contour can include very short compensation blocks, created by a programming system (CAD/CAM) or by a tool radius correction. This blocks after correction should ensure a continuous form of the path.

To avoid an abortion of contouring at this short blocks, it is possible to define a minimum block length, from which the polynom contouring is relevant for the next block. Shorter blocks are ignored during active contouring and the contouring considers the following block.

It can be defined a limit for the movement distance of the main axes as well as a limit for the movement distance for the tracking axes. The block is skipped completely only if both, the movement distance of the main axes and the movement distance of the tracking axes is under the defined limit. The polynomial contouring combines the previous and the following block curvature and direction-continuous. The basic blocks must not border on each other (contour must not be continuous).

If a block is skipped, at the moment the maximum corner deviation of the main axes and the tracking axes is only approximately considered. This means, it is supposed, that the skipped blocks concerning the deviation of the contouring can be ignored.

Programming example

#CONTOUR MODE [DEV, PATH_DEV 5, RELEVANT_PATH 2]

N03 G01 X0 Y0 Z0 C0 F4

N907090 G04 X0.1

N04 X5 G261

N05 Y1

N09 X10 Y3 G260

N907091 Y0

Fig. 4. 31 : Example for the skipping of a short block N05 during contouring

Special case 1: Sequence of multiple short blocks behind the block transition

If multiple sequential blocks (N20, N30, N40) are shorter than the minimum movement distance, these blocks are skipped as long as the distance of the target position to the last relevant end position (N10) is shorter than the defined minimum movement distance. If the target position of the skipped block is outside the enclosing sphere, this block (N40) is used for the calculation of the contour curve, even if it is shorter than the defined minimum length. This method enables a small deviation from the original contour even if multiple sequential blocks are skipped.

Fig. 4. 32 : Some single blocks (N20, N30 und N40) are to short, but the target position is outside the minimum block length.

Special case 2: Sequence of multiple short blocks behind the block transition, last block is extremely short

As a special case the block N40 itself can be shorter than the minimum system specific length (about 15 mikrom) required for the contouring. In this case the last end position and the new target position is connected by a linear block. This new linear block N20´ then is used for the calculation of the contour curve.

Fig. 4.33: Some single short blocks (N20, N30 und N40) are to short, but the sum of all blocks exceeds the minimum block length.

Special case 3: Short blocks before the block transition

If at the beginning of contouring (before block transition) the blocks are already shorter than the minimum length given by the system, these blocks are skipped. The blocks are skipped as long as the distance between the last valid position and the current target position exceeds the minimum block length. If this is the case, the last end position and the current target position is connected by a linear block N10. This linear block then is used as start block for contouring.

Fig. 4.34: Multiple blocks (N10, N20 und N30) are to short, but the sum of all blocks exceeds the minimum block length given by the system

Special case 4: Deselection of contouring or change of parameterisation.

If contouring is deselected during skipping of blocks or the basic conditions for contouring are changed, the current contouring may only be continued until the deselection or parameter change. After that the contouring possibly can be continued with the new parameters.

Fig. 4. 35 : Some single blocks (N20, N30 und N40) are too short, but the contouring is deselected from block N20.


Execution of additional blocks

If additional to the traverse blocks at the block end (N10  N20) a command without any contour information is programmed (e.g. M-function with MVS_SNS-synchronization), this command can be executed before, during or after the contour curve.

Example:

N10 X100 G61 M25

N20 Y100

Fig. 4.36: Synchronization without contour relevant actions during contouring

Fig. 4.37: Synchronization without contour relevant actions after contouring

For the execution of this commands there are the following 3 possibilities:

1. Directly after pre-block (N10) and before the first contour polynom,

2. Between the first and the second contour polynom,

3. Behind the second contour polynom and before the post-block (N20).


Jerk within the polynom

The curvature of the polynom results in a jerk for the axes across to the trajectory. This jerk is checked with the maximum dynamic parameters of the axes [2]-16. If the jerk is too strong, the path velocity is reduced. But for some user specific cases this reduction of velocity because of the maximum jerk is not desired. For this some specific control commands in the NC command #CONTOUR MODE are available. These control commands overwrite the pre-definitions of the channel parameter list [1]-41 and are valid modal until program end.

In the following example the block transition from N6 to N7 is contoured by polynoms considering the jerk. The transition from N7 to N8 is also contoured, but without consideration of the jerk on the path contour.

Programming example

%poly_jerk.nc

( Default setting in channel list : check_jerk_on_poly_path

#SET SLOPE PROFIL[1]

#CONTOUR MODE [ DEV, PATH_DEV 4, RELEVANT_PATH 51]

N0003 G1 X0 Y100 Z0 F4

N0004 G261

N0005 G1 G91 X100

N0006 Y-50

N0007 #CONTOUR MODE [CHECK_JERK=1]

N0008 X100

N0009 #CONTOUR MODE [CHECK_JERK=0]

N0010 Y-50

N0009 G260

N0055 M30


Characteristic of velocity in the contouring section

Depending on axis parameterization and application it can be necessary to influence the characteristic of velocity in the countouring section. In the default definition the contouring section is moved with maximum permissible path velocity. This could lead to an inacceptable excitation of vibrations of the machine, if the axes have strongly different dynamics, because in the contouring section the path velocity has to be adapted.

The characteristic in the contouring sections can be influenced by some specific control commands in the NC command #CONTOUR MODE.

In the following example the block transition from N6 to N7 is contoured by polynomials, which are moved in the contouring section with maximum velocity. This means, the velocity adaptation is done with different axes dynamics. The transition from N9 to N10 is also contoured, but without any velocity adaptation, what leads to a constant path velocity in the contouring section.

Programming example

%poly_const_speed

N0003#SET SLOPE PROFIL[1]

N0004 G1 X0 Y0 Z0 F8000

N0005 #CONTOUR MODE [CONST_VEL=0]

N0006 X100 G61

N0007 Y100

N0008 #CONTOUR MODE [CONST_VEL=1]

N0009 X0 G61

N0010 Y0

N0020 M30


Programming

Before the real polynom contouring (G61 / G261) the various options are set by the NC command #CONTOUR MODE:

Depending on the contouring type for the parameterization some specific keywords are available. The command consist of the following basic syntax elements:

#CONTOUR MODE[

<contouring_type> PATH_DEV TRACK_DEV VEL PRE_DIST POST_DIST

<1.st_main_ax_name> <2.nd_main_ax_name> <3.rd_main_ax_name>

RELEVANT_PATH RELEVANT_TRACK REMAIN_PART <action>

CHECK_JERK MAX_ANGLE SYM_DIST ACC_MAX ACC_MIN

RAMP_TIME ]

<contouring_type> : | AUTO_DEV | Autom. contouring with maximum corner deviation (Type 1)
 | AUTO_VEL | Autom. contouring with velocity reduction (Type 2)
 | DIST | Corner distance contouring (Type 3)
 | DEV | Corner deviation contouring (Type 4). à Default contouring type after program start.
 | POS | Interim point contouring (Type 5)
 | DIST_SOFT | Contouring with jerk limiting by the contour (Type 6)

<action> : | PRE_ACTION | Execution of actions (M/H) before the contour curve
 | INTER_ACTION | Execution of actions (M/H) during the contour curve
 | POST_ACTION | Execution of actions (M/H) after the contour curve

Programming example

%TestG61

#CONTOUR MODE [AUTO_DEV PATH_DEV=1.0 RELEVANT_PATH=0 RELEVANT_TRACK=0]

N1 G90 G01 X0 Y0 Z0 A0 C0 F60

N10 G1 G61 X99.999 Y0.001

N20 G1 X100 (-> error message: 120216, Block to short)

(for contouring, contouring stopped)

#CONTOUR MODE [AUTO_DEV PATH_DEV=1.0 RELEVANT_PATH=0.1 RELEVANT_TRACK=0]

N2 G90 G01 X0 Y0 Z0 A0 C0 F60

N30 G1 G61 X99.999 Y0.001 (-> no error message: 120216)

N40 G1 X100 (-> Block is skipped, Contouring N30 -> N3)

#CONTOUR MODE [AUTO_DEV PATH_DEV=1.0 RELEVANT_PATH=0 RELEVANT_TRACK=0]

N3 G90 G01 X0 Y0 Z0 A0 C0 F60

N50 G1 G61 X100

N60 G1 X200 Z00 C-32.667 (-> tang. transition of main axes)

(contouring is suppressed)

#CONTOUR MODE [AUTO_DEV PATH_DEV=1.0 RELEVANT_PATH=0 RELEVANT_TRACK=0.1]

N4 G90 G01 X0 Y0 Z0 A0 C0 F60

N70 G1 G61 X100

N80 G1 X200 Z00 C-32.667 (-> tang. transition of main axes)

(contouring is not suppressed because)

(maximum deviation of slave axes)

N10000 G1 G61 X300 Z0 (-> error message: 120206, program end)

(during active contouring)

N0210 M30

More:

button Automatic contouring with maximum corner deviation (Type 1)

button Automatic contouring with given velocity (Type 2)

button Corner distance contouring (Type 3)

button Corner deviation contouring (Type 4)

button Interim point contouring (Type 5)

button Dynamically optimized contouring (Type 6)


Automatic contouring with maximum corner deviation (Type 1)

Corner distance is automatically determined and is the same for pre-block and post-block. For determining an estimated value for the required corner distance, the maximum spatial acceleration of the axis data and the desired (programmed) traversing velocity are included.

Corner distance is dimensioned according to the following boundary conditions :

q The contour path should be able to be traversed as far as possible without any reduction in the maximum velocity.

q The specified maximum corner deviation should not be exceeded.

The main difference to the contouring with corner deviation (type 4) lies in the consideration of the axes dynamics. If moving with the programmed velocity does not need the maximum polynom length the polynom is shortened.

This proceeding is qualified for:

q Depending on the programmed velocity the corner distance can be changed. I.e. the polynom contour may be different with different programmed speed.

q No cinematic/cartesian transformation is active, because of the effort the estimation does not include any transformation.

The parametering is done using the following statement

#CONTOUR MODE [ AUTO_DEV [PATH_DEV<expr>] [RELEVANT_PATH<expr>]

        [RELEVANT_TRACK<expr>]
[TRACK_DEV<expr>]
[REMAIN_PART<expr>]

[<action>] [CHECK_JERK <expr> ] [ MAX_ANGLE <expr> ] [ CONST_VEL <expr> ] ]

AUTO_DEV Automatic contouring with maximum corner deviation

PATH_DEV<expr> Maximum deviation from programmed contour in mm

Default value: 1 mm

RELEVANT_PATH<expr> Minimum path length of relevant post-blocks in mm

Default value: 0 mm

RELEVANT_TRACK<expr> Minimum path length of tracking axis for relevant post blocks in mm.

Default value: 0 mm

TRACK_DEV<expr> Maximum deviation of the coupled axes in mm

Default value: 1 mm

REMAIN_PART<expr> Remaining part in percent [0; 100] of the original block

Default value: 0 %

<action> Time of execution for additional actions:

Valid key words | Significance
PRE_ACTION | Execution before the contour curve.
INTER_ACTION | Execution during the contour curve (default).
POST_ACTION | Execution after the contour curve.

CHECK_JERK<expr> Monitoring of jerk, caused by the curvature of the polynom (see [1]-41).

Value | Significance
0 | Without jerk monitoring (default).
1 | Jerk monitoring based on the geometric ramp time [2]-16. Possibly the path velocity is reduced.
2 | Jerk monitoring based on the ramp times[2]- 21..24 of the non-linear velocity profile.

MAX_ANGLE<expr> Maximum contour angle for transitions between two linear blocks in degrees, up to it contouring is active. The contour angle is not considered, if one of the transition blocks is a circular block.

Default value: 0° (this means, all path elements are contoured)

CONST_VEL<expr> Constant path velocity in the contouring area.

Programming example

Fig. 4.38: Automatic contouring (Type 1)


Automatic contouring with given velocity (Type 2)

In this type of contouring, the contour curve is dimensioned in a manner, that the curve can be traversed with the specified procentage value vb_proz of the programmed velocity of the pre-block. If for example, vb_proz = 50%, the contour curve is traversed with half the velocity programmed in the pre-block.

Because of the curvature of the contour and the given maximum acceleration of the axis nevertheless it is possible, that the desired velocity is not reached.

The parametering is done with the following statement:

#CONTOUR MODE [ AUTO_VEL [VEL<expr>] [RELEVANT_PATH<expr>]

                       [RELEVANT_TRACK<expr>]
[TRACK_DEV<expr>]
[REMAIN_PART<expr>]

[<action>] [CHECK_JERK <expr> ] [ MAX_ANGLE <expr> ] [ CONST_VEL <expr> ] ]

AUTO_VEL Automatic contouring with given velocity

VEL<expr> Percentage velocity [0; 100]

Default value: 100 %

RELEVANT_PATH<expr> Minimum path length of relevant post-blocks in mm

Default value: 0 mm

RELEVANT_TRACK<expr> Minimum path length of tracking axis for relevant post blocks in mm

Default value: 0 mm

TRACK_DEV<expr> Maximum deviation of the coupled axes in mm

Default value: 0 mm

REMAIN_PART<expr> Remaining part in percent [0; 100] of the original block

Default value: 0 %

<action> Time of execution for additional actions:

Valid key words | Significance
PRE_ACTION | Execution before the contour curve.
INTER_ACTION | Execution during the contour curve (default).
POST_ACTION | Execution after the contour curve.

CHECK_JERK<expr> Monitoring of jerk, caused by the curvature of the polynom (see [1]-41).

Value | Significance
0 | Without jerk monitoring (default).
1 | Jerk monitoring based on the geometric ramp time [2]-16. Possibly the path velocity is reduced.
2 | Jerk monitoring based on the ramp times[2]- 21..24 of the non-linear velocity profile.

MAX_ANGLE<expr> Maximum contour angle for transitions between two linear blocks in degrees, up to it contouring is active. The contour angle is not considered, if one of the transition blocks is a circular block.

Default value: 0° (this means, all path elements are contoured)

CONST_VEL<expr> Constant path velocity in the contouring area.

Programming example

Fig. 4.39: Automatic contouring (Type 2)


Corner distance contouring (Type 3)

If the position, where the original contour can be left is known, the user can specify the corner distances of the pre- and post-blocks, by which the bordering traverse blocks are to be shortened, explicitly.

They are limited, if they exceed 45% of the path length of the pre- respectively post-block:

q If the corner distances a and b are defined identical, during limitation on 45% of a path length also both corner distances are limited symmetrical.

q If the corner distances a and b are defined different, during limitation only the larger distance is minimized. For asymmetrical path lengths this can lead to a degenerated contour, but maybe this is sometimes desired (Expert mode).

The parametering is done with the following statement:

        #CONTOUR MODE [
        DIST

        [PRE_DIST<expr>]
[POST_DIST<expr>]
[RELEVANT_PATH<expr>]

[RELEVANT_TRACK<expr>]
[TRACK_DEV<expr>]
[REMAIN_PART<expr>]

[<action>] [CHECK_JERK <expr> ] [ MAX_ANGLE <expr> ] [ CONST_VEL <expr> ] ]

DIST Corner distance contouring

PRE_DIST<expr> Distance to the corner in mm. Deviation point from the original contour

Default value: 1 mm

POST_DIST<expr>Distance behind the corner in mm. Return point on the original contour

Default value: 1 mm

RELEVANT_PATH<expr> Minimum path length of relevant post-blocks in mm

Default value: 0 mm

RELEVANT_TRACK<expr> Minimum path length of tracking axis for relevant post blocks in mm

Default value: 0 mm

TRACK_DEV<expr> Maximum deviation of the coupled axes in mm

Default value: 0 mm

REMAIN_PART<expr> Remaining part in percent [0; 100] of the original block

Default value: 0 %

<action> Time of execution for additional actions:

Valid key words | Significance
PRE_ACTION | Execution before the contour curve.
INTER_ACTION | Execution during the contour curve (default).
POST_ACTION | Execution after the contour curve.

CHECK_JERK<expr> Monitoring of the jerk, caused by the curvature of the polynom ([1]-41).

Value | Significance
0 | Without jerk monitoring (default).
1 | Jerk monitoring based on the geometric ramp time [2]-16. Possibly the path velocity is reduced.
2 | Jerk monitoring based on the ramp times[2]- 21..24 of the non-linear velocity profile.

MAX_ANGLE<expr> Maximum contour angle for transitions between two linear blocks in degrees, up to it contouring is active. The contour angle is not considered, if one of the transition blocks is a circular block.

Default value: 0° (this means, all path elements are contoured)

CONST_VEL<expr> Constant path velocity in the contouring area.

Programming example

Fig. 4.40: Corner distance contouring (Type 3)


Corner deviation contouring (Type 4)

The default settings of contouring type 4 also are the default settings of polynomial contouring after program start!

The corner distances, by which the bordering traverse blocks are shortened, are auto-matical determined upon geometrical considerations in such a manner that a corner deviation specified by the user is not exceeded. The corner distances are limited to half the block length at a time, but the both distances are limited symmetrical. In contrast to the type 1 the programmed velocity has no influence of the polynom contour.

The parametering occurs with the following statement:

#CONTOUR MODE [ DEV [PATH_DEV<expr>] [RELEVANT_PATH<expr>]

[RELEVANT_TRACK<expr>]
[TRACK_DEV<expr>]
[REMAIN_PART<expr>]

[<action>] [CHECK_JERK <expr> ] [ MAX_ANGLE <expr> ] [ CONST_VEL <expr> ] ]

DEV Corner deviation contouring

PATH_DEV<expr> Maximum deviation from programmed contour in mm

Default value: 1 mm

RELEVANT_PATH<expr> Minimum path length of relevant post-blocks in mm

Default value: 0 mm

RELEVANT_TRACK<expr> Minimum path length of tracking axis for relevant post blocks in mm

Default value: 0 mm

TRACK_DEV<expr> Maximum deviation of the coupled axes in mm

Default value: 0 mm

REMAIN_PART<expr> Remaining part in percent [0; 100] of the original block

Default value: 0 %

<action> Time of execution for additional actions:

Valid key words | Significance
PRE_ACTION | Execution before the contour curve.
INTER_ACTION | Execution during the contour curve (default).
POST_ACTION | Execution after the contour curve.

CHECK_JERK<expr> Monitoring of jerk, caused by the curvature of the polynom (see [1]-41).

Value | Significance
0 | Without jerk monitoring (default).
1 | Jerk monitoring based on the geometric ramp time [2]-16. Possibly the path velocity is reduced.
2 | Jerk monitoring based on the ramp times[2]- 21..24 of the non-linear velocity profile.

MAX_ANGLE<expr> Maximum contour angle for transitions between two linear blocks in degrees, up to it contouring is active. The contour angle is not considered, if one of the transition blocks is a circular block.

Default value: 0° (this means, all path elements are contoured)

CONST_VEL<expr> Constant path velocity in the contouring area.

Programming example

Fig. 4.41: Corner deviation contouring (Type 4)


Interim point contouring (Type 5)

Here the user specifies not only the corner distances but also an interim point PZ at which the two polynomial curves border each other (Expert mode). With this process it is possible to retain the programmed contour and fully utilize the dynamics by specifying the corner distance with zero. This means the corner distances here really must not be symmetrical.

The parametering is done with the following statement:

#CONTOUR MODE [ POS [PRE_DIST<expr>] [POST_DIST<expr>]

[<1.Hauptachsname><expr>] [<2.Hauptachsname><expr>]

[<3.Hauptachsname><expr>]
[<action>]
[CHECK_JERK<expr>]

[ CONST_VEL <expr> ] ]

POS Interim point contouring

PRE_DIST<expr> Distance to the corner in mm. Deviation point from the original contour.

Default value: 1 mm

POST_DIST<expr>Distance behind the corner in mm. Return point on the original contour.

Default value: 1 mm

<1.st_main_ax_name><expr> Position of the interim point in mm for the first main axis

<2.nd_main_ax_name><expr> Position of the interim point in mm for the second main axis

<3.rd_main_ax_name><expr> Position of the interim point in mm for the third main axis

<action> Time of execution for additional actions:

Valid key words | Significance
PRE_ACTION | Execution before the contour curve.
INTER_ACTION | Execution during the contour curve (default).
POST_ACTION | Execution after the contour curve.

CHECK_JERK<expr> Monitoring of jerk, caused by curvature of the polynom (see [1]-41).

Value | Significance
0 | Without jerk monitoring (default).
1 | Jerk monitoring based on the geometric ramp time [2]-16. Possibly the path velocity is reduced.
2 | Jerk monitoring based on the ramp times[2]- 21..24 of the non-linear velocity profile.

CONST_VEL<expr> Constant path velocity in the contouring area.

Programming example

Fig. 4.42: Interim point contouring (Type 5)


Dynamically optimized contouring (Type 6)

So far the polynomial contouring types 1-5 define a direction- and curvature-continuous connection of two traverse blocks. With reference to the axes the contour curve possibly leads to a fluctuation of acceleration.

During the axis related consideration of the dynamic data (acceleration, jerk) the contouring curve is determined with a steady acceleration (minimum jerk) of the involved axes. By using the maximum acceleration of the axes additionally the duration of the contouring is reduced.

The parametering is done with the following statement:

#CONTOUR MODE [ DIST_SOFT [PATH_DIST<expr>] [TRACK_DIST<expr>]

[ACC_MAX<expr>]
[ACC_MIN<expr>]
[RAMP_TIME<expr>]

[DIST_WEIGTH<expr>] ]

DIST_SOFT Dynamic optimized contouring

PATH_DIST<expr> Corner distance of pre and post block (symmetric) in mm or degree, from which the deviation from original contour is allowed. The definition is related to the travel distance of the feed axes.

Default value: 1 mm or 1 °

Monitoring off: -1 mm or -1 °

TRACK_DIST<expr> Corner distance of pre and post block (symmetric) in mm or degree, from which the deviation of the non-feed axes (dragged axes) from original contour is allowed.

Default value: Value is mapped automatically from PATH_DIST, as long as this value has not been explicitly defined (since program start).

Monitoring off: -1 mm or -1 °

ACC_MAX<expr> Amount in percent of maximum acceleration (machine data), which could be used by contour.

Default value: 100 %

ACC_MIN<expr> Amount in percent [0; 100] of maximum acceleration (machine data), which shall be used by contour. If this acceleration is to less to keep to the given corner distance (see SYM_SIST), the used acceleration is increased up to the maximum value (ACC_MAX).

Default value: 50 %

RAMP_TIME<expr> Percentage weighting of the ramp time [ 0; 10000].

Default value: 100 %

DIST_WEIGHT<expr> Percentage weighting of the corner distances in proportion to the previous / following block [ 0; 100].

Default value: 0 %

Restrictions:

q The dynamical optimized contouring is possible for linear block transitions. If any circular block is included in the transition, the calculation is switched to the standard corner distance calculation (without dynamic optimation, according to Type 3).

q For the calculation only one ramp time of each axis is used (maximum value of the individual ramp times).

q No cinematic transformations are considered. If any transformation is active the calculation also switches automatical to the standard mode (according to Type 3).

In many cases the weighting of the corner distances by the parameter DIST_WEIGHT depending on the previous / following block results in an optimized utilization of the available block length.

During the axis specific contouring the corner distances of the previous and the following block basically are identical (symetrical). If in addition the maximum corner distances are limited on the half block travel distance, for longer travel distances with shorter previous/ following travel distances the result is a smaller contouring zone and also a smaller contouring velocity.

Fig. 4. 43 : Maximum corner distance of block N20 indipendent from block length of N10 and N20 (DIST_WEIGHT = 0 %)

If the length of the previous and the following block are considered for the calculation of the maximum corner distances, the contouring zone can be increased.

Fig. 4. 44 : Maximum corner distance of block N20 subdivided in the ratio of the block length of N10 and N30 (DIST_WEIGHT = 100 %)

Programming example

Comparison of contouring of a one-quarter (90°) corner with the methods:

q Explicit inserting of a radius (G302):

P1 = 150 (Eckenabstand

P4 = 2000 (Anfahrposition

N10 X-P4 YP4

N20 X0 Y0

N25 G302 IP1

N30 XP4 YP4

N40 M30

q Conventional contouring with definition of corner distance (DIST):

#SET SLOPE PROFIL[1]

P1 = 150 (Eckenabstand

P4 = 2000 (Anfahrposition

#CONTOUR MODE [DIST PRE_DIST=P1 POST_DIST=P1]

N10 X-P4 YP4

N20 X0 Y0 G61

N30 XP4 YP4

N40 M30

q Dynamically optimized contouring (DIST_SOFT):

#SET SLOPE PROFIL[1]

P1 = 150 (Eckenabstand

P4 = 2000 (Anfahrposition

#CONTOUR MODE [DIST_SOFT PATH_DIST=P1 ACC_MAX=100 ACC_MIN=50 RAMP_TIME=100]

N10 X-P4 YP4

N20 X0 Y0 G61

N30 XP4 YP4

N40 M30

Comparison of all three modes in position:


Examples

Programming example

N907090 X0 Y0

G91 G01 F6000

N01 #CONTOUR MODE [ DEV PATH_DEV=10 POST_ACTION]

N10 X100 G61 M25 (MVS_SNS)

N20 Y100 F3000

N30 X100 G61 F6000

N40 G04 X2

N50 Y100

N00 X0 Y0

N60 X100 G61

N70 Y100 M26 (MVS_SVS)

N907091 G04 X1

N23 M30

Output before polynomial contour curve:

N01 #CONTOUR MODE [ DEV PATH_DEV=10.0 PRE_ACTION ]

Output within polynomial contour curve:

N01 #CONTOUR MODE [ DEV PATH_DEV=10.0 INTER_ACTION ]

Output after polynomial contour curve:

N01 #CONTOUR MODE [ DEV PATH_DEV=10.0 POST_ACTION ]

If the acknowledgement of M25 is delayed, the motion is stopped behind the contour curve and it is waited for the PLC acknowledgement.

Programming example

Changing of limit angle during contouring:

#CONTOUR MODE [DEV PATH_DEV=0.50 RELEVANT_PATH=0.1 TRACK_DEV=2 RELEVANT_TRACK=0.2]

F10000

G261

N5 #CONTOUR MODE [MAX_ANGLE=3]

N10 G01 X0 Y0 Z0 G61

N15 #CONTOUR MODE [MAX_ANGLE=4]

N20 G01 X100 Y0 Z0

N25 #CONTOUR MODE [MAX_ANGLE=5]

N30 G01 X100 Y100 Z0

N35 #CONTOUR MODE [MAX_ANGLE=6]

N40 G01 X0 Y0 Z0 G61

G260

Result:

The contouring of block N<i> is always executed with the limit angle of the previous block N<i-5>.

Programming example

Variation of the contour angle with constant limit angle:

#CONTOUR MODE [DEV PATH_DEV=0.50 RELEVANT_PATH=0.1 TRACK_DEV=2 RELEVANT_TRACK=0.2]

#CONTOUR MODE [RELEVANT_TRACK=0.3]

P100 = 50

F10000

#CONTOUR MODE [MAX_ANGLE=73]

N10 G01 X-P100 Y0 Z0 C0 A0

$FOR P123 = 0, 90, 7.5

N2 G01 X0 Y0 Z0 C0 A0 G61

P1 = COS[P123]*P100

P2 = SIN[P123]*P100

NP123 XP1 YP2

N100 G01 X-P100 Y0 Z0 C0 A0

$ENDFOR

$FOR P123 = 270, 370, 7.5

N120 G01 X0 Y0 Z0 C0 A0 G61

P1 = COS[P123]*P100

P2 = SIN[P123]*P100

NP123 XP1 YP2

N400 G01 X-P100 Y0 Z0 C0 A0

$ENDFOR

M30


Overview of the processes

The following table once again gives an overview of the available processes and the method to determine the contouring parameter.

Contouring parameter | Automatic contouring 1 | Automatic contouring 2 | Distance contouring | Corner deviation contouring | Interim point contouring | Dynamic contouring
Pre-distance/ Post-distance | auto | auto | by the user | auto | by the user | by the user
Corner deviation | by the user | cannot be parametered | cannot be parametered | by the user | cannot be parametered | cannot be parametered
Interim point | auto | auto | auto | auto | by the user | auto

The following diagram helps to find the suiting contouring type for a given used case. In each case the polynom contouring is a compromise between deviation from original contour and reduction of velocity (curvature-continuous).


Remarks

q If axes are released or fetched after programming of G61 or G261/G260 (polynom contouring at block end), the contouring procedure may not be executed.

Programming example

N10 G01 X100 Y0 Z0 F1000

N20 G01 X50 Y50 G61

N30 #PUT AX [Z] ( --> Contouring procedure will not be executed)

N40 G01 X100

N50 M30

q With interim point contouring the shape of the curve depends on the choice of the interim point. You may also get the following curve shape:


Corner deceleration

In the milling process, the removal volume Vz and the correlated necessary spindle power in the area of the inside corners is increased as a function of the block transition geometry because the tool already removes material of the subsequent contour (Fig. 4.45).

If machining is always performed at the spindle's performance limit, the feed rate in the corner area must be reduced such that the spindle performance also proves sufficient in the inside corners. In order to stay inside the spindles performance limits, it must be possible to define a point on the path from the NC program, from which onwards the speed shall be reduced. For this corner deceleration, there are three NC commands available: one for setting the parameter values, one for activation and one for de-activation.

Fig. 4.45: Variation of the removal volume Vz vs. the time, at an inside corner of 90° and a constant feed rate

More:

button Setting the corner deceleration parameter values

button Selection and deselection of corner deceleration (G12/G13)


Setting the corner deceleration parameter values

#SET CORNER PARAM [ <expr_1>, <expr_2>, <expr_3> ] (modal)

<expr_1> Distance between corners in mm

<expr_2> Corner feed rate unit (<expr_3>)

0: According to F word

1: Percent [%]

<expr_3> Corner feed rate

Specifying a distance between corners permits the point in the space to be computed from which onwards the path feed rate shall be reduced as a linear function of the distance. Here, the following definition applies:

The distance between corners that is to be programmed is related to the corrected path, not to the originally programmed target points.

The #SET command must be on a separate NC line. This means that further NC commands are not permitted in the same block.

The corner deceleration is only effective in combination with the linear slope [1] -26 .

Fig. 4. 46 : Illustration of feed at a circular inside contour


Selection and deselection of corner deceleration (G12/G13)

G12 Deselection of corner deceleration (modal, default)

G13 Selection of corner deceleration (modal)

An error message is output if G13 is programmed without prior definition of the corner deceleration parameter.

An error message is output if G12 and G13 are programmed at the same time in an NC block.

These G functions are modal. The initial state after system start-up is deceleration at corners inactive (G12).

An error message will not be output for selected corner deceleration (G13) and end of program (M30). The initial position G12 will be selected before the program is started.

An error message is output in the case of a distance between corner of 0.

Programming example

N010 G01 G90 X10 Y10 F1000

N015 #SET CORNER PARAM[10, 1, 50] (Corner distance 10mm, Corner feed 50%)

N015 #SET CORNER PARAM[10, 1, 50] (Setting parameter values)

N020 G13 (Activation)

N030 X50 (Corner deceleration active)

N040 Y50 (Corner deceleration active)

N050 G12 (De-selection)

N060 X30 Y30

N050 M30

Please note that corner deceleration is not activated before block N030. The block transition N010/N030 is not affected by the corner deceleration.

Likewise, corner deceleration is still active in block N040 because it has not been de-selected.

Corner deceleration must be de-selected before or in the NC block in which corner deceleration shall not be active.


Tool radius compensation (G40/G41/G42)

G40 Deselection of tool radius compensation (TRC) (modal, default)

G41 Selection of TRC left of the contour (modal)

G42 Selection of TRC right of the contour (modal)

The tool radius compensation (TRC) is active in the plane selected with G17, G18 or G19.


Selection/deselection methods of tool radius compensation (G138/G139/G237/G238/G239/G05)

There are five possibilities for the selection/ deselection of TRC:

G138 Direct selection/deselection of TRC (modal)

G139 Indirect selection/deselection of TRC (modal, default)

G237 Perpendicular selection/deselection of TRC (modal)

G238 Inner corner selection of TRC (modal)

G239 Direct selection/deselection of TRC without a block (modal)

G05 Tangential selection/deselection of TRC (non-modal)


Selection of the transition of tool radius compensation (G25/G26)

G25 Linear transition (modal, default)

G26 Circular transitions (modal)

Outside corners must be bypassed if tool radius compensation is selected. For this purpose, tool radius compensation inserts so-called transition-blocks. With G25 and G26, it is possible to select between insertion of linear blocks and insertion of circular blocks.


Feedrate adaptation for tool radius compensation (G10/G11)

G10 Feedrate constant (modal, default)

G11 Feedrate adapted (modal)

With active G11, transition-blocks inserted by the tool radius compensation are traversed with higher speed. Moreover, concerning circular blocks, the programmed feedrate is active at the tool contact point (see Fig. 4.47).

Fig. 4.47: Adaptation of feedrate at compensated circular interpolation.


Selection/deselection of contour masking by tool radius compensation (G141/G140)

G140 Deselection of contour masking (modal, default)

G141 Selection of contour masking (modal)

If before finishing a rough-machining with a tool larger in diameter and active tool radius compensation is executed, the danger of contour violation is given, if single contour elements have smaller dimensions than that of the tool geometry. To enable moving along coherent contour objects, using G140/G141 during active TRC makes it possible to mask contour elements, if contour violations are recognized, and to treat the following contour not be damaged.

Active contour masking on program end does not lead to an error message. On program start automatically the default function G140 is active.

The contour masking remains selected if tool radius compensation is deactivated by G40 and is activated again if also tool radius compensation is reselected.


Zero offsets NPV (G53/G54/...G59)

In this document, 'NPV' stands for zero offset.

G53 Deselection of zero offset * (modal, default)*

G54 Selection of 1st zero offset (modal)

G55 Selection of 2nd zero offset (modal)

G56 Selection of 3rd zero offset (modal)

G57 Selection of 4th zero offset (modal)

G58 Selection of 5th zero offset (modal)

G59 Selection of 6th zero offset (modal)

* The significance of the G53-data record can be controled [3]-1. Depending on the specification G53 means de-selection of the NPV or the use of the G53-data record as an additional NPV.

The automatically active default NPV in the initial state can also be specified [3]-2.

With G54 ... G59 the corresponding zero offsets of the zero offsets table is available. The zero offsets are already valid in the block in which G53, G54, ... is programmed. However, no traverse movements are done without specifying any coordinates!

In the default state (G53) no zero offsets are active.

Please note for the selection of zero offsets in the G91 mode:

The programming of...

N10 G54 X0 G91

... must not cause any movement of the X-axis (equal to relative movement 0).

Thus, zero offsets only acts for an axis when the next traverse information is programmed in absolute coordinates (G90)!

812_start

More:

button Enhanced Zero Offset Variables

button Adding / Subtracting Offsets

button Access to the current zero offset

button Default zero offset

button Creating zero offset groups

button Extended zero offsets (G159)

button Axes-related enabling/disabling of zero offset (G160)


Enhanced Zero Offset Variables

Variable | Significance | Read | Write
V.G.NP[j].ALL | Addressing of all axes of a zero offset | yes | yes
V.G.NP_AKT.V[i] | Current (currently active) zero offset of an axis | yes | yes
V.G.NP_AKT.ALL | Addressing of the current (currently active) zero offsets of all axes | yes | yes
V.G.NP_DEFAULT | Zero offset that is effective in the initial state. | yes | yes

Write access via the V.G.NP[j] and V.G.NP_DEFAULT variables remains effective until the next interpretation of the list (explicit request or start-up). Write access via V.G.NP_AKT, in contrast, has only an effect on the zero offsets that are currently stored in the decoder. If a zero offset that has previously been written to via V.G.NP_AKT is selected again, its original value from the list becomes effective again. The current data record must be saved in the list by assigning via V.G.NP[j].ALL if the write access to V.G.NP_AKT shall be held beyond de-selection.

Programming example

Saving of the currently active zero offset values:

V.G.NP[12].ALL=V.G.NP_AKT.ALL


Adding / Subtracting Offsets

The V.G.NP[j].ALL variable makes it possible that complete zero offset data records can newly be assigned by an additive allocation of existing zero offsets. The offsets of all axes are included in the individual calculations. The notations ` += `, ` -= `, and `=` are permitted in zero offset allocation.

Programming example 1

G54 (NPV1) has the combination of G55 (NPV2) and G57 (NPV4) allocated:

N10 V.G.NP[1].ALL = V.G.NP[2].ALL + V.G.NP[4].ALL

Programming example 2

The same operation; G54 is additionally included:

N10 V.G.NP[1].ALL = V.G.NP[1].ALL + V.G.NP[2].ALL + V.G.NP[4].ALL

or

N10 V.G.NP[1].ALL += V.G.NP[2].ALL + V.G.NP[4].ALL

Interconnecting V.G.NP[j].ALL variables with axis-related V.G.NP[j].V[i] variables or constants within an assignment is not possible!

Programming example

G54 (NPV1) is defined by the combination of G55 (NPV2), the X offset of G57 (NPV4), and a correction value:

INCORRECT:

N10 V.G.NP[1].ALL = V.G.NP[2].ALL + V.G.NP[4].V.X + 100

CORRECT:

The assignment must be made in two steps

N10 V.G.NP[1].ALL = V.G.NP[2].ALL

N20 V.G.NP[1].V.X = V.G.NP[4].V.X + 100


Access to the current zero offset

The currently active zero offset in the decoder is accessed via the V.G.NP_AKT.V[i] variable. The operator need not know the zero offset (i.e. the index) that has currently been selected.

Programming example

The current zero offset of the X axis shall be 200.

N10 V.G.NP_AKT.V.X = 200

The current zero offset in all axes shall be expanded by the offset values from G55 (NPV2).

N10 V.G.NP_AKT.ALL = V.G.NP_AKT.ALL + V.G.NP[2].ALL

or

N10 V.G.NP_AKT.ALL += V.G.NP[2].ALL

The modification of the current zero offset does not have an effect across programs. An additional assignment, however, enables the user to employ the current zero offset in other programs.

Programming example

The current zero offset shall be saved under G54 (NPV1) for future utilization in other programs.

N10 V.G.NP[1].ALL = V.G.NP_AKT.ALL


Default zero offset

The active NPV after program start can be specified [3]-2.

In the NC program, the operator can use the V.G.NP_DEFAULT variable to access the default index. The modification is valid program global.

Programming example

From this program line onwards, G55 (NPV2) shall be the new default zero offset. This means that G55 is automatically active upon the next start of the program.

:

N100 V.G.NP_DEFAULT = 2

:


Creating zero offset groups

A zero offset group defines the rules of producing a zero offset. This means that it describes the components of a specific zero offset data record. A zero offset group is defined in the NC program or by default in the channel parameters list [1]-4, in conjunction with a symbolic string. The utilization of symbolic strings is explained in chapter 15. It always takes three steps to activate a zero offset group:

Programming example

1st step:

Definition of a zero offset group in the NC program under the VERSCH_1 symbol string, for example:

N10 " VERSCH_1 " = " V.G.NP[1].ALL = V.G.NP[2].ALL + V.G.NP[4].ALL "

or in channel parameters list [1] -4:

makro_def[0].symbol VERSCH_1

makro_def[0].nc_code V.G.NP[1].ALL = V.G.NP[2].ALL + V.G.NP[4].ALL

2nd step:

Producing the zero offset (new assignment of the NPV1 data record):

N20 " VERSCH_1 "

3rd step:

Selection of the zero offset (here: NPV1, i.e. G54):

N30 G54


Extended zero offsets (G159)

G159 = <index> (modal)

G159 Extended zero offset

<index> List index of the zero data record

Access to additional NPV-data records[3]. Also the access to the G53G58 data records is possible. The maximum number of the extended zero offset groups can be specified [6]-6.12.

Programming example

G159 = 0 corresponds to G53

G159 = 1 corresponds to G54

G159 = 2 corresponds to G55

G159 = 3 corresponds to G56

G159 = 4 corresponds to G57

G159 = 5 corresponds to G58

G159 = 6 corresponds to G59

G159 = 7 access to data record with list index 7

:

G159 = 10 access to data record with list index 10

:


Axes-related enabling/disabling of zero offset (G160)

G160 = <index> <axis_name><flag> (modal)

G160 Axis-related activation of zero offsets

<index> List index of zero offsets data record

<axis_name><flag> Axis with validity flag for its zero offset

Flag | Significance
0 | Zero offset of the axis is included in the calculation.
1 | Zero offset of the axis is not included in the calculation.

For each zero offset data record <index> previously by setting of the parameters [3]-3 it can be defined, for which axes <axis_name> the offset is or is not to be included in the calculation. This means, individual axis offsets can be disabled or enabled.

This axis specific validity of a zero offset can be changed via G160 in the NC program.

Programming example

Before the selection of G55 (zero offsets data record with index 2) the offsets of the X and Z axis are disabled and of the Y axis enabled.

:

N10 G160 = 2 X1 Y0 Z1

N20 G55

:

So in the next motion block only the enabled axis offsets of G55 are included in the movement (Y axis).


Center point specification for circle definition (G161/G162)

G161 Circle center point absolute (modal)

G162 Circle center point relative (modal, default)

With active G162, the center point is defined via I, J and K relative to the circle starting point. With G161 being active, I, J and K are specified absolute in the coordinate system of the programmer.


Radius programming (R, G163)

The radius programming is expected, if no circle center point (with I, J and/or K) is given. The value following the character R is interpreted as radius. It is used in NC-blocks with circular programming automatically. Thereby the radius statement is modal and, in case of multiple circular traverse movements with the same radius, specifying of the radius needs not to be repeated.

The maximum permissible circle radius is 109 mm.

However the end point of the circular arc may not exceed the maximum traverse range +- 2,14*105 mm of the axes.

With positive radius value a shortest possible circle and with negative radius value the largest possible circle is determined (see figure below).

In case of indexed radius programming, (pre requisite for this is that the R-word is not used for the parameter programming; chapter 9 - Parameters and parameter calculation), as index, only 1 is possible.

If the indexed radius programming is used on the assignment side, then the index should not be programmed as a mathematical expression.

Programming example

1.) N10 P2 = 1 3.) N10 R1 = 5 P2 = 1

permissible: N20 RP2 = 5 not permissible: N20 P3 = RP2

2.) N10 R1 = 5

permissible: N20 P2 = R1

Programming example

All these examples, produce semi-circles with radius 50.

1. N10 G90 G01 X0 Y0 F500

N20 G02 X100 R50

N30 G03 X200 R50

2. N10 G90 G01 X0 Y0 F500

N20 G02 R=50 (In this block still no motion)

N30 X100 (Motion block)

3. N10 G90 G01 X0 Y0 F500

N20 R1=50

N30 G02 X100

N40 G03 X200

4. N10 G90 G01 X0 Y0 F500

N20 G02 X100 R1=50

N30 G03 X200

The following programming results in an error message, since R1 is interpreted as radius with value 1.

N10 G90 G01 X0 Y0 F500

N20 R1=50

N30 G02 X100 R1

Alternative to circle definition with R = "radius" or R1 = "radius" a circle radius specification can also be done using the following G-code:

G163= <radius> (modal)

G163 Circle radius specification

<radius> Circle radius value

The circle definition using the radius is valid in case of selected circular interpolation until new definition or until deselection through an I- and/or J- and/or K-specification.

Programming example

(N10: Movement to origin)

(N20: Semi circle cw with end point X100 under preset)

(of circle radius by G163 (radius defintion is modal))

(N30: Semi circle ccw with end point X200 and a modal radius,)

(which has been defined in N20)

%Radiusprogramming_G163

N10 G90 G01 X0 Y0 F1000

N20 G02 G163=50 X100

N30 G03 X200

N40 M30

If the starting and end point of the circle, programmed with "R", "R1" or "G163", are identical then an error message is output. Thus, to traversed a full circle, it must be programmed with I/J/K.


Center point offset controlling (G164/G165)

G164 Center point correction OFF (modal)

G165 Center point correction ON (modal, default)

With active G165, a circle programmed through I-statement, J-statement and K-statement is corrected in that way, that under specified circular direction (G02/G03), specified starting position (end position of the previous block) and specified end position (Coordinates in circular block) an arc of a circle can be interpolated. Thereby the center point programmed with I, J and K is possibly shifted! The more precise the center point is indicated, the less the center point offset will be.

For the deviation from programmed to shifted center point two limit values [1]-5/-6 are monitored. If these are exceeded an error message is output:

mittelpkt_diff: Permissible offset in 10-4 mm

mittelpkt_faktor: Percentage offset in 0,1 %

It is verified whether the center point offset ∆m is larger than the absolute value "mittelpkt_diff"

m > mittelpkt_diff ?

and whether the center point offset ∆m is greater than the product of "mittelpkt_faktor/1000" and the corrected radius "radius".

m > mittelpkt_faktor/1000 * radius ?

The upper limit for ∆m is thus linearly dependent on the calculated radius. The relationship between center point offset ∆m and the calculated radius "radius" shown in Fig. 4.48 is obtained.

Example:

"mittelpkt_faktor" = 5 signifies that the distance between the programmed center point coordinates and the shifted center point coordinates should be maximum 0.5 % of the corrected radius of the circle.

Fig. 4.48: Relationship between center point offset m and the calculated radius radius.

The programmed center point coordinates must thus lie in a circumcircle around the shifted center point of the circle. The radius of the circumcircle corresponds to the permissible center point offset ∆m, that can be set through the two parameters mittelpkt_diff" and "mittelpkt_faktor" (Fig. 4.49).

Fig. 4.49: Region of permissible programmed center points

Method for correcting a programmed circle center point:

A circle that is specified in a NC-program through starting-point S, endpoint E and center-point M is geometrically redundant. This problem is solved, if the circle center point coordinates and the circle radius are corrected with the following algorithm.

The following two dimensional vectors are required:

- Absolute end vector (vende)

- Relative (to start vector) center point vector (rstart)

- Absolute start vector (vstart)

The chosen method, according to Fig. 4.50, is based on the fact that from the center point to the start or end point, the arithmetical average of absolute values is obtained from both vectors, which respectively point from the center point to the start or end point. The new center point thus emerges from the two vectors of this average length.

Geometrically this means that the programmed center point is shifted on to an elliptical path to the point of intersection of the smaller elliptical semi-axis with the ellipse. To avoid time-consuming case differentiation's (theoretically two center points are possible), the following algorithm was implemented:

By forming chordal vector of the circle

v sehne = vende - vstart

and the local vector for the programmed circle center-point

v mittel = vstart + rstart

the relative vector from circle center point to circle end point is obtained:

r ende = vende - vmittel

Thus, it is now possible to determine the radius:

radius = 0.5 * (|rstart| + |rende|)

By projecting (scalar product) the start radius vector on to the chordal vector, the point upon which the perpendicular vector to the center-point of the chord is obtained:

v fusz = (vsehne * rstart) / |vsehne|2

With these data the perpendicular vector to the center point can be determined:

v lot = rstart - vfusz

Now, this vector should be standardized to the length of the projection of the new radius vector using programmed chordal vector:

v lot_neu = vlot * sqrt [radius2 - (|0.5 * vsehne|)2] / |vlot|

The new relative radius vector would thus be:

r start_neu = 0.5 * vsehne + vlot_neu

If two circles are to be traversed one after the other, and the radius was programmed only for the first circle and, a center point correction has to be carried out, then the calculation of the second circle is based not on the corrected but on the programmed radius of the first circle.

Fig. 4.50: Correction of programmed radius of the circle

More:

button Special function: circle radius compensation in combination with G164


Special function: circle radius compensation in combination with G164

In certain situations, circle centre point compensation (G165) can lead to an unfavourable shift in the programmed circle centre point and thus the circle's position. Such unfavourable situations can occur when the circle starting and destination points are close together and the circle almost corresponds to a programmed full circle. Such a circle with specification of the destination point with and without circle centre point compensation (G165/G164) is programmed in the following example. To simulate the resolution error in the post-processor, when circle centre point compensation is active the circle's destination point is shifted by 0.1μm in each case in the x and y directions in comparison with the starting point. The circle with G165 is rotated about the starting point and the position of the corrected circle centre point MK shifts very considerably in comparison with the programmed centre point M.

N10 G00 G90 X0 Y0 Z0

N20 G01 X-50 Y0 F20000

N30 G01 X0

N40 G165 G02 X0.0001 Y0.0001 J200

N50 G01 Y50

M30

N10 G00 X0 Y0 Z0

N20 G01 X-50 Y0 F20000

N30 G01 X0

N40 G164 G02 X0.0 Y0.0 J200

N50 G01 Y50

N60 M30

Fig. 4. 51 : Circle centre point shift in the case of G165

In such cases a better result can generally be achieved with inactive circle centre point compensation and setting of the "max_radius_diff_circle" > 0 and "max_proz_radius_-diff_circle" channel parameters. The programmed circle centre point is not changed by the function and the circle radius difference is transferred in a linear fashion from the starting radius to the destination radius via the circle's angle.

If the circle radius deviations lie in the order of magnitude of the resolution accuracy, the circle distortions and dynamic effects are generally negligible.

For a full circle, here also the circle starting and destination points must be identical!


Feedforward control (G135/G136/G137)

G135 Selection of feedforward control (modal)

G136 Specification of weighting (modal)

G137 Deselection of feedforward control (modal)

By using a velocity- and acceleration-feedforward control, the path distortions can be reduced.

The axis group specific activation is programmed with G135. Axis-specific, percentage weighting of the calculated feedforward control variables is done with G136. It is limited to 100% for all the axes.

G137 deactivates, axis group-specifically, the feedforward control. After a global selection with G135, for those axes who dont have a feedforward control, G136 has to be programmed with a weighting of 0%. It is also possible to enter the selection and weighting of the feedforward control into a single block.

During every program start the feedforward control is explicitly switched off in the interpolator and the weighting factors are set to 100%.

If the feedforward control is switched on or off during the NC-program, the weighting factors remain on the values set through G136, or if no G136 is programmed on 100%.

Programming example

G135 (Selection of feedforward control: weighting for all axes 100%)

G136 X80 Y95 Z0 (Weighting; here Z-axis receives no feedforward control)


Weighting of rapid traverse velocity (G129)

G129 = <expr> (modal)

G129 Axis group-specific weighting of rapid traverse

<expr> Weighting in percent for all axes

With the functions G129 it is possible to alter the rapid traverse velocity G00.

An influencing of this rapid traverse velocity is achieved by percentally changing the appropriate velocity-characteristic value.

In programming with G129, all non-programmed or not yet programmed axes are set to 100%. Each further selection of this function, irrespective of the previous programs, signifies 100%. That means, the geometrical data processing always weights the default values [2]-25 with the percentage value.

If 50% is programmed twice successively, then this means that the setting is done at 50% and not at 25%.

The feed weighting works only for rapid traverse NC blocks (G00). It does not work for single axis slopes e.g like homing, manual mode or independent axes.

The weighted rapid traverse value is limited on the maximum value [2]-17.

Programming example

N10 G129 = 70 (Axis group-specific rapid traverse weighting)

(Rapid traverse velocity of all axes to 70%))

N20 G00 X100 Y150 (Linear interp., rapid traverse movement with 70%)

Special feature:

N50 G129 = 70 X10 Y20 (In the same block with G129 also axis)
(positions can be programmed)


Parameterization of acceleration profile

More:

button Acceleration weighting (G130/G131)

button Weighting the ramp times (G132/G133/G134)


Acceleration weighting (G130/G131)

G130 <axis_name><expr> { <axis_name><expr> } (modal)

G131 = <expr> (modal)

G130 Axis-specific weighting of acceleration

<axis_name><expr> Weighting in percent for specific axes

G131 Axis group-specific weighting of acceleration

<expr> Weighting in percent for all axes

With the functions G130/G131 it is possible to alter the acceleration ramps.

An influencing of this acceleration is achieved by percentally changing the appropriate acceleration-characteristic values. For jerk limited profile these values are the axes parameters [2]-28 and [2]-29.

In programming with G130/G131, all non-programmed or not yet programmed axes are set to 100%. Each further selection of this function, irrespective of the previous programs, signifies 100%. That means, the geometrical data processing always weights the default values [2]-8/-13 with the percentage value.

If 50% is programmed twice successively, then this means that the setting is done at 50% and not at 25%. A weighting over 100% up to the maxium axis acceleration [2]-30 is possible.

The weighting of acceleration works only during feed interpolation (G01, G02, G03). It does not work for single axis slopes e.g like homing, manual mode or independent axes.

Programming example

N10 G130 X70 (Axis-specific acceleration weighting:)

(Acceleration of X-axis is restricted to 70%)

N20 G01 F1000 X100 (Linear interpolation)

N30 G130 Y60 (Acceleration of Y-axis is restricted to 60%)

(Acceleration of X-axis remains set to 70%)

N40 Y100 (Linear interpolation)

N50 G131 = 100 (Axis group-specific acceleration weighting:)

( A cceleration of all axes to 100%)

Special feature:

N50 G131 = 100 X10 Y20 (In the same block with G131 also axis)

(positions can be programmed)


Weighting the ramp times (G132/G133/G134)

G132 <axis_name><expr> { <axis_name><expr> } (modal)

G133 = <expr> (modal)

G134 = <expr> (modal)

G132 Axis-specific weighting of ramp time

<axis_name><expr> Weighting in percent for specific axes

G133 Axis group-specific weighting of ramp time

<expr> Weighting in percent for all axes

G134 Axis group-specific weighting of geometrical ramp time

<expr> Weighting in percent for all axes

With the functions G132/G133 it is possible to change the ramp time of the axes acceleration for non-linear slope [2]-8 (at linear slope the acceleration ramp is step-shaped (see Fig. 11.5)).

With the function G134 it is possible to change the geometrical ramp time for the non-linear slope [2]-16.

Influencing of this ramp times is achieved by percental altering the appropriate default ramp times.

During the programming of G132/G133/G134 non-programmed or not yet programmed axes are set to 100%. Every further selection of these functions incorporates 100%, irrespective of the previous programming, i.e. the geometrical data processing always weights the default values with the percentage value. Thus, 50% programmed twice means setting to 50% and not to 25% is done.

The weighting of ramp time works only during feed interpolation (G01, G02, G03). It does not work for single axis slopes e.g like homing, manual mode or independent axes.

Programming example

N10 G132 X200 (Axis-specific ramp time weighting:)

(Ramping time of X-axis is increased by 200 %)

N20 G01 F1000 X100 (Linear interpolation)

N30 G132 Y50 (Ramping time of Y-axis is decreased by 50%)

(Ramping time of X-axis remains at 200%)

N40 Y100 (Linear interpolation)

N50 G133 = 100 (Axis group-specific acceleration time weighting:)

(Ramping time of all axes to 100%)

N60 G134 = 50 (Axis group-specific acceleration time weighting:)

(Geometrical ramping time of all axes to 50%)

Special feature:

N50 G133 = 100 X10 Y20 (In the same block with G133 also axis positions)

(can be programmed)

N60 G134 = 50 X10 Y20 (In the same block with G134 also axis positions)

(can be programmed)

Fig. 4.52: Example for weighting of ramp time with G132/G133

Fig. 4.53: Example for weighting of ramp time with G134 at circular interpolation


Machining time or feedrate (G93/G94/G95/G194)

812_start

G93 Machining time in sec. (modal)

G94 Feed in mm/min (modal, default)

G95 Feed in mm/revolution (modal)

G194 Feed calculation based on the weighted

maximum axes feeds (modal)

Using the G-functions G93, G94, G95 and G194 the action of the F-word can be optionally changed:

General dimensions for G94: F-word for rotary axes (deg./min)

F-word for linear axes (mm/min)

G194 in combination with the F word defines a weighting factor in [%] for the maximum permissible feed velocities. This maximum permissible feed velocity on the trajectory then results from the axes specific values [2]-17. At least one axis then moves with its weighted maximum velocity. Only weighting factors less than 100% are allowed.

Programming example

N10 G90 F1000 X100 (Feed 1000 mm/min (G94 Default))

N20 G194 F90 (Weighting 90% of max. axis feed velocity)

Nxx X200 (Feed e.g. 9000 mm/min with vb_max=10000 mm/min)

N80 G94 X50 (Feed 1000 mm/min valid from N10)

Nxx X.. Y.. Z.. (Interpolation)

N120 G93 F20 (Machining time 20 s)

Nxx X.. Y.. Z.. (Interpolation)

N160 G94 F1500 X150 (Feed 1500 mm/min)

Nxx X.. Y.. Z.. (Interpolation)

N200 M30

If there are linear and rotary axes in the path trajectory, that are jointly interpolated, then for both axis types the F-word is of the same dimension when G93 is selected.

If the machining time is exceeded because of parameter values and block geometry, then an error message is output.

The function G95 is described in the chapter 14.2.4.3.

812_end


Inserting of chamfers and rounding (G301/G302)

G301 Inserting of chamfers (Both the functions are active

once between
G302 Inserting of roundings two traverse blocks )

Inserting of rounding" is the insertion of an arc of a circle with a given radius, passing over tangentially to the two neighboring contour elements. Under "chamfer", the insertion of a straight line, with the same angle of inclination to the neighboring contour elements, is understood.

The function G302 is provided for inserting of a rounding and the function G301 for inserting a chamfer. These functions are non-modal active and generate an insertion of precisely one contour element (circular arc or straight line). G302 or G301-blocks can be only written between blocks with active G-functions of the group "a", that means, G00, G01, G02/G03 without G05. The I-Word programmed in the same NC-block defines the radius or the chamfer width of the insertion elements. The I-word remains stored and active, that means, during the following G302/G301 with the same radius or same chamfer width, I-word need not be programmed any more. During the initial programming of G301/G302, an I-word unequal to zero must be programmed in the NC-block, otherwise, an error message is output (error, which leads to aborting of the decoding).

Effectiveness of the feedrate at G301/G302:

q If G00 follows, then a circular arc is also run with maximum possible velocity.

q If G01/G02/G03 follows, then programmed feedrate will be valid.

q In block with G301/G302 a feedrate can also be specified.

q Under active G11 and G41/G42, the feedrate is also matched.

Programming example

Chamfer: 90 deg. corner with 2 straight lines (for a chamfer 20x45 deg I=20 is specified)

N100 G00 G91 X100 Y0 F200

N110 G01 Y100

N120 G301 I20

N130 X-60

N140 G00 G90 X0 Y0

Rounding: Rectangular pocket with corner radius 20 mm, length 200 mm, width 100 mm

N100 G00 G42 X0 Y0 F200

N110 G01 G11 X200

N120 G302 I20 F150

N130 Y100 F200

N140 G302 F150

N150 X0 F200

N160 G302 F150

N170 Y0 F200

N180 G302 F150

N190 G10 X40 F200

The chamfer or the rounding is always added in the plane in which the second movement block has been programmed.

Example A: Example B:

N100 G18 X20 N100 G18 X20

N110 G19 N110 G301 I5

N120 G301 I5 N120 G19

N130 Y20 Z20 N130 Y20 Z20

Example A and B both yield the same result, contouring in the Y-Z-plane.

More:

button Inserting of chamfers

button Inserting a rounding


Inserting of chamfers

Under G301 the I-word defines the distance between the corner point of the programmed contour and the respective intersecting point of the inserted straight line with the contour elements. If one or both the contour elements are circular arcs, this distance is considered as chord length.

If a given size of the insertion radius or the chamfer results in a direction reversal of one or both contour elements, then an error message is output.

Fig. 4.54: Inserting of a chamfer between two straight lines

Fig. 4.55: Inserting of a chamfer between two circular arcs

Fig. 4.56: Error due to direction reversal


Inserting a rounding

Under G302 the I-word defines the radius of the inserted circular arc. Its center point is the intersecting point of both the equidistants with an interval I to programmed path. The positions of the equidistants will be fixed by the demand, that the programmed contour during the rounding should be keep as far as possible.

In tangential block transitions, as a rule, no contouring radius can be inserted.

Fig. 4.57: Insertion of a circular arc between two straight lines

Fig. 4.58: Insertion of a circular arc between two circles (Angle α ≥ 180°)

Fig. 4.59: Insertion of a circular arc between two circles (Angle α < 180°)


Manual mode

The manual mode (HB) enables an external controlling of individual axes with physical elements of manual operation (handwheel, inching keys, joy stick). During running interpolation, i.e. during the execution of the NC-program, the operator is able to add additional set values to the path. The following manual operation modes are possible.

q Handwheel function : Any desired path with any desired velocity.

q Continuous jog mode: Any desired path with parameterable velocity.

q Incremental jog mode: Pre-specified path with parameterable velocity

q Interruptible jog mode: Like incremental jog mode, however, traverse
interruption possible.

These manual operation modes can be activated from the control panel. The corresponding parameters such as for example resolution, speed, jogging distance etc. are programmed by appropriate NC commands ("#SET"-commands, "G"-commands ). The manual mode enables a centralized management of manual operation axes, manual operation elements and parameters.

The current manual operation mode and the axis controled by a physical manual operation element can be changed anytime. A physical manual operation element can control several axes in several NC-channels at the same time. One axis can only be controled by one single manual operation element and can only run in one manual operation mode at the same time.

Fig. 4.60: The manual operation and its facilities

More:

button Selection/deselection with parallel interpolation (G201/G202)

button Selection without parallel interpolation (G200)

button Program end (M02, M30)

button Parametering of operating modes

button Presetting of offset limits

button Example for the parameter setting of one axis in manual mode


Selection/deselection with parallel interpolation (G201/G202)

The internal interface between interpolator and manual opearation mode is activated for the programmed axes. Spindles cannot be programmed.

With G201 and #ACHSE[...] the manual operation for some specific axes is selected. After that for this axes the manual operation with parallel interpolation is active until deselection with G202.

G201 #ACHSE [ <axis_name> {, <axis_name> } ] (modal)

With G202 and an optional #ACHSE[...] the manual operation for all or some specific axes is deselected.

G202 Deselection of manual operation for all axes (modal, default)

 or for some specific axes

G202 #ACHSE [ <axis_name> {, <axis_name> } ]

Programming example

.....

G00 X100 Y100

G201 #ACHSE[X] (Status transition of X-Axis into manual mode)

P1 = 0

$WHILE P1 == 0

(Manual operation with X-axis)

(Program can be continued by setting P1 to 1 through operating console)

$ENDWHILE

G202 (Status transition of all axes into normal mode)

G01 Y200 F500

.....

.....


Selection without parallel interpolation (G200)

The internal interface between interpolator and manual operation mode is activated for the programmed axes. Spindles cannot be programmed.

Manual operation without parallel interpolation can be selected with G200.

G200 Manual operation for all axes (non-modal)

 or for some specific axes

G200 #ACHSE [ <axis_name> {, <axis_name> } ] (non-modal)

With programmed G200 the processing of the current NC-program is interrupted in the interpolator. The manual operation modes can be activated, changed and deactivated. After traversing of axes under manual operation, the continuation of the NC-program can be requested by the control statement Continue motion to the interpolator.

In this operating mode, the offset limits are automatically set to software limit switch positions, so that the entire software limit switch range can be traversed in the manual mode. After deselection of manual operation mode, the previous relative offset limits become valid once again.

A parallel interpolation of the axes during manual operation is not possible with G200. After the statement Continue motion, all the axes and operating modes are de-activated, therefore no manual operation is possible.

The decoder requests all offset- and command positions from the interpolator and sends the current command positions to all the participants in the NC channel.

If G200 is programmed without "#ACHSE[...]", then this command affects all present axes.

Programming example

.....

.....

G00 X 100 Y 100

G200 #ACHSE[X] (Manual operation without parallel interpolation)
(for X-axis)

G01 X200 Y200 F600

G01 Y 200 F500

G200 (Manual operation without parallel interpolation for all axes)

G01 Y500 Z500

.....

.....


Program end (M02, M30)

At NC-program end no traversing of the axes must be possible in manual operation. Hence the command M30 or M02 are handled as if additionally G202 had been programmed.


Parametering of operating modes

More:

button Operating mode Handwheel

button Operating mode Continuous jog

button Operating mode Incremental jog / interruptible jog


Operating mode Handwheel

#SET HR [ <resolution> { ,<resolution> } ] <axis_name> (modal)

<resolution> Resolution stages

Max. Number* | Dimension
3 | mm/handwheel-rev. or deg/handwheel-rev.

*Max. number is firmly given (HR_AUFL_MAX)

<axis_name> Manual mode axis


Operating mode Continuous jog

#SET TIP [ <feed_step> { ,<feed_step> } ] <axis_name> (modal)

<feed_step> Velocity stages

Max. Number* | Dimension
3 | mm/min bzw. deg/min

*Max. number is firmly given (TIPP_GESCHW_MAX)

<axis_name> Manual mode axis


Operating mode Incremental jog / interruptible jog

#SET JOG [ [ <step_size>, <feed> ] { , [<step_size>,<feed>] } ] <axis_name> (modal)

<step_size>, <feed> Pairs of (Incremental widths / velocity)

Max. Number* | Dimension
3 | mm bzw. deg / mm/min. bzw. deg/min

* Max. number is firmly given (JOG_WEG_GESCHW_MAX)

<axis_name> Manual mode axis

Handwheel resolutions, continuous jog and incremental jog velocities can also be programmed as mathematical expressions. These #SET-commands can only be programmed under active G202 for the respective axis.

The "#SET"-commands must remain alone in the NC block.

Programming example

.....

G202 #ACHSE[X,Y]

#SET HR [0.1, 0.2, 0.5] X

#SET TIP [1.0, 1.5, 2.0] X

#SET JOG [ [ 0.1, 1.0 ] [ 0.2, 1.5 ] [ 0.5, 2.0 ] ] X

G201 #ACHSE [X, Y]

....


Presetting of offset limits

#SET OFFSET [ <neg_offset>, <pos_offset> ] <axis_name>

<neg_offset> Negative offset value. Must be programmed <0

<pos_offset> Positive offset value. Must be programmed >0

<axis_name> Axis, for which the offset limit shall be valid.

With this command the positive and the negative limits for the permissible manual operation offset can be set for the respective axis. Axes that are operated as rotatory modulo axis or spindles (M3, M4, M5, M19, S...) are not considered in this command. These offset limits are valid for all manual operating modes. The negative offset value must be smaller or equal to zero, the positive offset value greater or equal to zero. The offset values can be overwritten at any time without having previously programmed G202. The offset values can also be preset via parameter data record [2]-6/-7 of the axis. Further verifications, for example, checking for exceedings of permissable ranges are not realized.


Example for the parameter setting of one axis in manual mode

Programming example

.....

G202 #ACHSE[X,Y]

#SET HR [0.1, 0.2, 0.5] X

#SET TIP [1.0, 1.5, 2.0] X

#SET JOG [ [ 0.1, 1.0 ] [ 0.2, 1.5 ] [ 0.5, 2.0 ] ] X

#SET OFFSET [ -5, 5 ] X

G201 #ACHSE [X]

....

With the command

#SET HR [0.1, 0.2, 0.5] X

the handwheel resolution stages of the X-axis are specified. The resolution stages are : 0.1, 0.2 and 0.5 mm/Handwheel rotation.

With the command

#SET TIP [1.0, 1.5, 2.0, 5.0] X

the traverse velocities for the continuous jog mode of the X-axis is specified. The velocity stages for continuous jog operation are: 1.2, 1.5 and 5.0 mm/min.

With the command

#SET JOG [ [ 0.1, 1.0 ] [ 0.2, 1.5 ] [ 0.5, 2.0 ] ] X

the incremental jog and interruptible jog mode for the X-axis are parametered. The incremental widths and the velocities are programmed in pairs one after the other.

Stage 1: Incremental width 0.1 mm, velocity 1.0 mm/min

Stage 2: Incremental width 0.2 mm, velocity 1.5 mm/min

Stage 3: Incremental width 0.5 mm, velocity 2.0 mm/min

With the command

#SET OFFSET [ -5, 5 ] X

the negative manual operation offset limit is set to - 5 mm, the positive offset limit to +5 mm.

With the following commands for the X-axis the status transition ´IDLE´ -> ´READY´ or vice versa is done. The status transition ´READY´ -> ´IDLE´ is done for all the axes, if G202 is programmed alone.

G201 #ACHSE[X]

G202 #ACHSE[X]


Requesting for offsets, command and actual values

The NC commands described in the following trigger jobs to include offsets, command and actual values of the interpolator into the operating data of the NC program interpreter. This data can be accessed by variables in the NC-program.

Offsets, command and actual values of path axes can be requested only. Axes that are operated as rotatory modulo axis or spindles (M3, M4, M5, M19, S...) are not considered in the following commands.

Synchronization between NC program interpreter and interpolator is the same in the case of all NC-commands described. The job is complete only after all data has been accepted in the working data of the NC program interpreter, and the coding of the NC-program is continued.

More:

button Requesting for current offsets and filling them into V.A.SOFFS[ ]

button Requesting for current command positions and filling them into V.A.ABS[ ]

button Requesting for current actual positions and filling them into V.A.ABS[ ]

button Requesting for current command positions of specific axes and filling them into self-defined variables or into parameters


Requesting for current offsets and filling them into V.A.SOFFS[ ]

#GET IPO OFFSET

The decoder requests for the actual manual mode offsets of all axes assigned to the interpolator. After they are provided, they are stored in the decoder variables "V.A.SOFFS[ ]" and can be addressed in the NC program. The positions of the NC-channel are not implicitly initialized. The offsets in the interpolator are not deleted by this job. The variables "V.A.ABS. ..." are not updated by this job (see chapter 13.1).

This command must be exclusive in the NC block.

Programming example

X100

G201

..... Moving in manual mode

G202

#GET IPO OFFSET

G01 X[100 + V.A.SOFFS.X] F500 (Initialization of positions in NC channel)

(after deselection of manual mode)


Requesting for current command positions and filling them into V.A.ABS[ ]

#CHANNEL INIT [CMDPOS]

From version V2.10.1504 the command #CHANNEL INIT [CMDPOS] replaces the command #SET DEC LR SOLL. For compatibility reasons the command is furthermore available, but it should not be used in new NC programs.

The NC program interpreter requests the current command positions of all path axes from the interpolator, filles the data into the NC program interpreter operating data and initializes the NC-channel with these positions. By programming the variable (V.A.ABS. ...) the current command positions within the operating data can be accessed. By this command possibly stored manual mode offsets in the interpolator are deleted. The values entered in the variable "V.A.SOFFS. ..." are not updated by this job (see chapter 13.1).

This command must be exclusive in the NC block.

Programming example

%channel_init_cmd

X100

G201

..... Moving in manual mode

G202

#CHANNEL INIT [CMDPOS]

#MSG ["X command pos:%F",V.A.ABS.X]

.....


Requesting for current actual positions and filling them into V.A.ABS[ ]

#CHANNEL INIT [ ACTPOS { AX<axis_name> |AXNR<expr> } ]

AX <axis_name> Name of the axis, for which the actual value is to be requested.

AXNR<expr> Logical number of the axis, for which the actual value is to be requested, positive integer.

The NC program interpreter requests the current actual positions of all or some specific path axes from the interpolator, filles the data into the NC program interpreter operating data and initializes the NC-channel with these positions. By programming the variable (V.A.ABS. ...) the current command positions within the operating data can be accessed. By this command possibly stored manual mode offsets in the interpolator are deleted. The values entered in the variable "V.A.SOFFS. ..." are not updated by this job (see chapter 13.1).

If no axes are programmed, for all path axes in NC channel the actual positions are requested.

For programmed axes the actual positions are requested and for the non programmed axes the command positions are requested.

The acceptance of the actual position as command position can cause an axis motion. Especially within a NC program loop this can generate a drift of the drive.

This command must be exclusive in the NC block.

Programming example

%channel_init_act

G01 F1000 X100 Y200

#CHANNEL INIT [ACTPOS AX=X AX=Y ] (Request of actual value by)

(axis name..)

#CHANNEL INIT [ACTPOS AXNR=1 AXNR=2 ] (..or logical axis number..)

#CHANNEL INIT [ACTPOS] (..or for all path axes)

#MSG ["Actpos X:%F, Y:%F ",V.A.ABS.X, V.A.ABS.Y]

M30


Requesting for current command positions of specific axes and filling them into self-defined variables or into parameters

#SET IPO SOLLPOS [ V.S. <s tring> | V.P.<string> | V.L.<String> | P<expr>=<axis_name>

{ ,V.S.<string> | V.P.<string> | V.L.<String> | P<expr>=<axis_name> } ]

The current command positions of specific axes are requested by the decoder from the interpolator and filled into the specified self-defined variables (V.S./V.P./V.L.) or parameters (P..). The positions of the NC-channel are not implicitly initialized. In the interpolator the manual mode offsets of the selected axes are not deleted by this command. The variable "V.A.ABS. ..." and "V.A.SOFFS. ..." that can be addressed from the NC-program are not updated by this job.

This command must be exclusive in the NC block.

Programming example

.....

G202

#SET IPO SOLLPOS [P1 = X, P2 = Y, V.P.POS1 = Z, V.P.POS2 = C]

G01 XP1 YP2

G01 ZV.P.POS1 CV.P.POS2

.....


Gear change (G112)

G112 Gear change (non-modal)

With the Function G112 it is possible to change the gear stages for individual path axes. G112 is also available for spindle axes, but here some special characteristics, described in chapter 14.2.7 have to take into consideration.

Regarding axes, which do not possess a real gear, this functionality can be used for actuating various axis parameters. Thus, for instance, for heavy machining, the controller intensification and the following-error monitoring can be matched to one another by a separate parameter set and can be called in the NC-program with the "gear number".

G112 may not be programmed with a path preparation function in the same NC-block.

Programming example

Nnn G112 X4 Y8 (Gear stage for X-axis: 4, Gear stage for Y-axis: 8)


Influencing of look-ahead functionality (G115/G116/G117)

G115 General influencing of look-ahead functionality (modal)

G116 Influencing of calculation of block-transition rate-velocity (modal)

G117 Resetting of look-ahead functionality (modal, default)

Overview of the functionality of Look-ahead-function

Within the Look-ahead-function different single functions are implemented, limiting the traversed speeds to maximum values, thus the permissible axis speeds and axis accelerations can always be maintained.

The following single functions influence the speed profile:

(1) Calculation of the maximum path speeds on the basis of the maximum axis speeds, specified in channel parameters list [1] -26.

The speed on the programmed path should thus be limited that each of the axes participating in the movement does not exceed their maximum axis speed.

(2) Calculation of the maximum path speeds on curved paths on the basis of a maximum chord error.

For this purpose, on each curve at the point of the most pronounced curvature, the curve radius can be determined. On this circle a circular section can also be defined, which beginning and end point correspond to the generated point. Under the condition that the real mechanical system would move on the respective chord, the relevant height of the circular section can be included as the error criterion.

(3) Calculation of maximum path speed on curved paths on the basis of the maximum axis acceleration specified in channel parameters list [1] -26.

The maximum path speed calculated on the basis of the secant error can still be too high, particularly in shorter tracing time and smaller circular movements, so that the resultant centripetal accelerations would exceed the permissible axis accelerations.

(4) Calculation of the path transition speed on the basis of the block-transition geometry, taking into account the axes taking part in the movement and their limit values specified in channel parameters list [1] -26.

During a block transition, generally, the respective proportion of the individual axes alternate in the total movement. This change of the axis condition occurs however only in the first tracing cycle on the new path (linear movement). If it is pre-supposed that the transition should take place without the generated acceleration (for instance by the slope-function), an estimation of the resultant axis accelerations can be undertaken. Thus, the calculation of a maximum path speed at block transition is possible, in which, the maximum axis accelerations will not be exceeded at transition.

General case:

Normal operation with look-ahead

After program start all functionality of the look-ahead is switched on (G117). Thus, it is ensured that parameters given in the axis data block, such as for example maximum axis acceleration, are always observed.

Special case:

Disconnection of single functions of the Look-ahead-function through G115

Programming example

Nnn G115 = 0 (Switching off the single functions (2),(3) and(4))
(of Look-ahead-funct.)

In the following table the possible combinations of the single functions are explained.

The correspondingly selected or deselected functions always refer to all the axes.

Survey of permissible identification numbers (ID) accompanying G115:

Einzelfunktion ID | (1) | (2) | (3) | (4)
0 | * |  |  |
2 | * |  |  | *
4 | * | * |  |
6 | * | * |  | *
8 | * |  | * |
10 | * |  | * | *
12 | * | * | * |
14 | * | * | * | *

*

Single function active

Single function not active

Programming example

Nnn G115 = 2 (Switching off individual functions (2) and (3))

Nnn G115 = 12 (Switching off individual function (4))

Nnn G115 = 14 (Switching on of all individual functions after)
(program start, see also G117)

Special case:

Influencing of look-ahead functionality by G116, G117

By G116 the calculation of the block transition speed is switched off for individual programmable axes. No reduction in the block transition speed (path speed) takes place because of "corners" in the path.

In this case the dynamic axis data (axis accelerations) will be exceeded normally.

Programming example

N10 G116 X1 Y2 (No decrease in block transition rate of)
(different axis speeds of the axes X or Y)

N20 G01 G91 X100 Y-100 F1000

N30 X-100

In this example block transition N20/N30 is traversed without set speed infringement. The command values are changed a the block transition in form of jumps according to the part of the path of the axis.

The coordinate value is required only for syntax reasons and is irrelevant otherwise

By G117, all the single functions of Look-ahead-function become active (default setting after program start) again.

Programming example

Nnn G117 (Switching on all single functions (1),(2),(3),(4))
(of Look-ahead-function)


Override (G166)

G166 Override set to 100 % (non modal)

With the function G166, the external influence of override for path axis is switched off and the effect of the programmed override values for the path or one axis is suppressed.


User specific M/H-functions

M/H-functions are determined mostly by the programming of the "Programmable Logic Controller" (PLC). This control contains an interface ("Window to PLC") information on the programmed M/H-Functions in the current NC-block. In addition, synchronization conditions are supplemented, which control the synchronization between NC and PLC.

M <expr>

or

H <expr>

M/H-Functions can be programmed with general mathematical expressions. This particularly allows values with parameters, for instance MP10. Before access to the M/H-function, the calculated numerical value is rounded off and converted into an Integer. The smallest permissible value is 0 (zero). Negative values generate an error message.

The maximum number of M/H-functions for one NC-channel [6]-8.1/-8.2 and the maximum number of M/H-functions for one NC-block [6]-8.3 is firmly given.

The EXIST-function (see chapter 2.6.1.3) checks, if a M/H-function generally is available.

Programming example

By the EXIST-request in a first step before the call of an user specific M-function it is checked, if it is defined in NC-channel parameter list [1]-3.

...

N10 G90 Y0

N20 $IF EXIST[M80] == TRUE

N30 X0 Y0 Z0 M80 (M80 is available)

N40 $ELSE

:

N60 $ENDIF

...

M30

In NC program the following M-functions have a fixed predefined meaning and are not free available. Only their synchronization mode [1]-3 can be set by the user.

M00 Programmed stop

M01 Optional stop

M02 Program end, Stopping of the machine

M17 Subroutine end

M29 Subroutine end

M30 Program end, Stopping of the machine

More:

button Programmed stop (M00)

button Optional stop (M01)

button Program end (M02/M30)

button Subroutine end (M17/M29)


Programmed stop (M00)

M00 causes an interrupt of a running NC-program, to executed, for instance, a measurement or a disposal of chips. The machining continues, if the "CONTINUE MOTION" button is pressed. If M00 is present in a block with traverse instructions, then the interruption occurs after execution of this traverse instruction.


Optional stop (M01)

M01 acts like M00, however the effectiveness of M01 must be implemented in the operating control.


Program end (M02/M30)

M02 and M30 are identical and in the main and sub-programs they effect a resetting to the start of the main program and the conveying of NC to the basic position.

Additionally, by configuration it is possible to send a signal to the PLC. The PLC uses this signal, for instance, to synchronize a workpiece change.


Subroutine end (M17/M29)

M17 and M29 orderly terminates subroutines.

By configuration it is possible to additionally pass a signal to the PLC.


Axis-specific M/H-functions

In general user-specific M/H-functions programmed in conventional DIN syntax are handled and executed channel-specifically.

If the user wishes to force axis-specific handling for specific M/H-functions, he has the option of defining them additionally in channel parameters list [1]-7/-8 so that they act axis-specifically:

m_default_outp_ax_name[ <m_expr> ] <axis_name>

or

h_default_outp_ax_name[ <h_expr> ] <axis_name>

<m_expr> User specific M-Function with axis specific effect.

<h_expr> User specific H-Function with axis specific effect.

<axis_name> Axis name of the axis on which the M/H-function is to act. Path axes and spindle axes are permitted in this case.

Programming example

Extract from channel parameters list [1]:

:

# Definition of the axis spezific M-Functions

# ============================================

m_default_outp_ax_name[20] S2

m_default_outp_ax_name[21] S3

m_default_outp_ax_name[22] Z

:

# Definition of the axis spezific H-Functions

# ============================================

h_default_outp_ax_name[10] X

h_default_outp_ax_name[11] Y

h_default_outp_ax_name[12] Z

:

:

Nn S1000 M3 M20 M21 M22 H10 (S and M3 effect on the main spindle axis,
M20 effects on the S2-spindle axis
M21 effects on the S3-spindle axis and
M22 effects on the Z-axis
H10 effects on the X-axis)

:

If an axis-specific M/H-function is programmed in a spindle-specific bracket expression, the default setting is ignored and the M/H-function acts on the corresponding spindle axis.

Moreover, for path axes, the NC-program includes the option of also forcing axis-specific output of M/H-functions by use of bracketed expressions:

<axis_name>[ M<expr> H<expr> { M<expr> H<expr> } ] { <axis_name>[ ... ] }

<axis_name> Axis name of the axis on which the M/H-function is to act. Only path axes are permitted in this case.

M<expr> User-specific M-function with axis-specific action.

H<expr> User-specific H-function with axis-specific action.

Programming example

:

N10 S1000 M3 X100 X[M20 H12] Y[H10] (S, M3 act on the main spindle axis)
(M20, H12 act on the X-axis)
(H10 acts on the Y-axis)
:

The user thus have the option of executing his specific M/H-functions very flexibly by programming or configuring axis-specifically or channel-specifically.

Programming example


M/H functions with optional additional information

In NC program for M/H functions an optional additional value can be programmed, which is made available to the PLC on the technology interface in combination with the M/H function.

With the exception of the spindle functions M03, M04, M05 and M19 and the gear change functions M40-M45 to all user specific M/H functions and to the internal M functions M00, M01, M02, M17, M29 and M30 an additional value can be programmed. At this the M/H functions can be used both in channel specific and in axis specific programming syntax without any restrictions

M <expr> [ =<additive_expr> ]

or

H<expr> [ =<additive_expr> ]

M<expr> User-specific M function

H<expr> User-specific H function

< additive_expr> Optional additional value. It can be programmed directly or with general mathematical expressions as a negative or positive integer.

Programming examples

%m_h_add_fct

(M functions with additional value)

N10 M52=-345

N20 M12=123 (with channel parameter m_default_outp_ax_name[12] Z)

N30 M10=321 (with channel parameter m_default_outp_ax_name[10] S)

N35 P1 = 567 P2 = 345

N40 X[M54=P1]

N50 S[REV 1000 M03 M63=-789]

N60 M12=123 M10=321 M52=-345 X[M54=567] S[REV 1000 M03 M63=-789]

N70 M63=-789 M52=-P2 M54=567

N80 X[M52=-345 M54=567] Y[M63=-789] S[M05 M63=789 M54=-567] M54 M63

(H functions with additional value)

N110 H5=-345

N120 H6=123 (with channel parameter h_default_outp_ax_name[6] Z)

N130 H9=321 (with channel parameter h_default_outp_ax_name[9] S)

N135 P3 = 567 P4 = -345

N140 X[H7=P3]

N150 S[REV 1500 M04 H8=-789]

N160 H6=123 H9=321 H5=-345 X[H7=567] S[REV 1500 M04 H8=-789]

N170 H8=-789 H5=P4 H7=567

N180 X[H8=-789 H4 H5=-345] Y[H7=567] S[M05 H5=345 H7=567] H3 H8

(Mixed M/H functions with additional value)

N200 X[M52=-345 H4 H8=-789 M54=567 H5=345] H3=333 M54=444 H7=567 M63

(M/H functions with additional value in axis speczific function(INDP))

N05 X[INDP G90 G01 FEED=2000 POS=555 M54=151 H8=-181]

N999 M30=111


Tool selection (T-word)

T <expr> Selection of tool place (modal)

The tool command determines the tool for the machining section. The tool number is forwarded to the programmable logic control (PLC) which loads the called tool in a tool magazine for a tool change. It should be noted that the T-word itself has no influence on the control-internal calculation of the tool geometry (tool data). For this purpose the D-word is used, which will be activated automatically with the T-word, under corresponding specification [1]-9.

The T-word initiates no tool change. Normally, this happens with the machine function M06.

The tool data [5], [6]-9.7 are saved within the tool data table of the CNC [6]-9.1. In addition, there is also the alternative option of communicating with an (external) tool data management system, which has either been provided by the user or which is distributed, and requesting tool data, via an additional interface. The access to internal or external tool data can be specified [1]-10.

In the interest of avoiding waiting periods between the time of loading and transfer of the tool data, the tool to be loaded from outside is normally requested one or more traverse-blocks before the actual inclusion of the tool data [1]-11. If several, possibly different, T-numbers are programmed before the D-number corresponding to the first T-Number, then all T-numbers before the last-programmed one are ignored. That means, the data supplied by the external tool management are neglected if the D-number of the tool does not match with the last programmed T-number.


Velocities (F-, E-)

F <expr> Feedrate at block begin (modal)

E <expr> Feedrate at block end (non-modal)

The functionality "Feedrate at block end" is not yet implemented.

In the interpolation types G01, G02, G03, G100, G105, the programmed axes are traversed with the path speed declared in the F-word. (preset-value in mm/min, m/min, inch/min, mm/s, inch/s, etc. in case of translatory axes or °/min for rotary axis, depending upon the configuration). The F-word is modal.

Values can be assigned to the F-word either directly or for each parameter, whereby also decimal numbers are permitted (REAL64-format).

With the user-command "G93" it is also possible to specify a machining-time instead of a feedrate by the F-Word. A description of this can be found in para. "G-Functions".

Programming example

N10 F1000 G01 X200 G90 (Feedrate 1000 mm/min)

N20 X300

N30 X350 F800 (Lowering of feed velocity)

(from 1000 to 800 mm/min)

Fig. 6.1: Feed programming using F-words


The N-function

The NC-block number can be programmed with the address letter "N. If configured, this number is registered both in the display data as well as in the error messages (alternatively, also the offset value in the file can be used for this purpose).

N <expr>

The block number can be programmed with general mathematical expressions. This permits, particularly, the value assignment by parameters, for instance, by the run-parameter in program-loops. The calculated numerical value is internally automatically rounded and converted into an integer.

Programming example

N10 G01 X200 F500

N20 $FOR P1=1, 10, 1

N[P1*100] XP1

.

.

N30 $ENDFOR

For program flow, the block number is without significance. Hence it need not be used in ascending form.


Subroutine techniques

Similar movement sequences and function-flows that are repetitive in nature, can be implemented as sub routines. There are two types of sub-routines:

q local sub-routines,

q global sub-routines or cycles

Several sub-routines (local or global) nested one into another can be called. Thus, the number of sub-programs used as well as the nesting depth is firmly given [6]-6.24.

The transfer of variables from main program to the sub-routines happens indirectly through P-parameters or through specific transfer parameters directly in the cycle call.

More:

button Local sub-routines (Call LL <string>)

button Global sub-routines (Call L <string>)

button Parametric sub-routine call (LL / L V.E. )

button Implicit global sub-routine call at program start

button Cycles as global sub-routines (Call L CYCLE)


Local sub-routines (Call LL <string>)

The call of local sub-routines is done with

LL <string> (Caution: Blank character between "LL" and <string> is mandatory).

<string> Name of the local sub-routine

Local sub-routines (LUP) together with the main program are located in a common data file, wherein all the sub-routines must be stated in front of the actual main program.

It should be noted that the local sub-routines can only be called from the main program in the same data file.

Local sub-routines begin with "%L" and a program designation. Between "L" and the program-designation, there must be a minimum of one parting character.

The end of the sub-routine is marked by the functions M17 or M29. Program-abortion is possible with M02 and M30. Then a warning is put out.

If these program end codes are missing % (first character of the following main program) will end the sub-routine.

Programming example

Structure of a data file, consisting of NC main program and local sub-routines:

%L UP1 (1st local sub-routine)

N1 .....

N2 .....

N9 M17 (M17 can also be left out)

%L UP2 (2nd local sub-routine)

N11 .....

N12 .....

N19 M29 (M29 can also be left out)

%100 (Main program)

N100 .....

N105 .....

N200 LL UP1 (Call of 1st LUP)

.

N250 LL UP2 (Call of 2nd LUP)

.

N300 M30 ( Main program end)

In front of the definition of a program, no NC commands are permitted. This is an exception to the rule that the sequence in the NC block for program execution is of no consequence (see chapter 2.5).


Global sub-routines (Call L <string>)

The call of a global sub-routine is done with

L <string> or L <string>

<string> Name of global sub-routine

Global sub-routines (GUP) are present as independent program units in a separate data file. The call up of a global sub-routine does not take place via the sub-routine name, but via the designation of this data file, which again can consist of local sub-routines and a main program. The specification of a name of global sub-routine (%<Prog_Name>) is only necessary to indicate after the local sub-routines the beginning of the main program (here used as global sub-routine). Thus it can be omitted, in case no local sub-routines are present in the data file.

The calling main program is, likewise, stored as an independent program unit in an another data file. Global sub routines can be called form all the main programs.

Programming example

Call of local and global sub-routines

%L LUP (Local sub-routine)

N11 .....

N12 .....

.

.

N19 M17 (M17 can be left out)

%333 (Main program)

N100 .....

N105 .....

N110 LL LUP (Call up of local sub-routines LUP)

.

N200 L GUP_FILE (Call up of global sub-routines via the name of the)

. (data file, in which this GUP is stored)

N300 M30

In the next example, the name of the global sub-routine can be omitted since the call take place via the name of the data file and in this data file no local sub-routines are present.

Programming example

Structure of data file GUP_FILE with global sub-routine:

(globale subroutine GUP)

N10 .....

.....

N90 M17 (Here an M17 or M29 is mandatory)

Survey of program definition and program call:

Main program

Definition: | %PROG_NAME or % PROG_NAME | Program definition is necessary only when local sub-routines are present
Call: | By operating console by specifying the file name |

Global sub-routines

Definition: | Like main program
Call from NC-program: | LFILE_NAME or L FILE_NAME

Local sub-routines

Definition: | %L PROG_NAME | Blank between "L" and program definition, since otherwise the definition of a main program will be assumed
Call from NC-program: | LL PROG_NAME | Blank between "LL" and program-call, since otherwise the call of a global sub-routine will be assumed

If in a file outside the comments, a character is noticed as the first character that is neither a separating character nor a "%", then this character is evaluated as the first character of an unnamed main program. This also means that in front of "%", no block numbers may be programmed.


Parametric sub-routine call (LL / L V.E. )

Instead of fixed names the call of local and global sub-routines can be done via external variables. This enables a parametric NC-program flow controled from outside. The external variables must be from type string respectively string array

The call of local sub-routines is done with

LL V.E.  (Caution: Blank character between "LL" and V.E.  is mandatory).

V.E.  Via external variable defined name of the local sub-routine

The call of global sub-routines is done with

LV.E.  or L V.E.

V.E.  Via external variable defined name of the file including the global sub-routine.

Otherwise the same programming rules are valid like described in the chapters 8.1 and 8.2.

Programming example 1

Call of sup programs via external variables of type string

%L TASCHE (Local sub-routine)

N10 .....

.

N99 M17

%MAIN (Main program)

N100 .....

N105 .....

N110 LL V.E.LUP (Call of local sub-routine via external variable)
(V.E.LUP, including the string TASCHE)

.

N200 L V.E.GUP (Call of global sub-routine via external variable)
(V.E.GUP, including the string of a file name)

N300 M30

Programming example 2

Call of sup programs via external variables of type string array

%L TASCHE_1 (Local sub-routine 1)

N10 .....

.

N99 M17

%L TASCHE_2 (Local sub-routine 2)

N10 .....

.

N99 M17

%L TASCHE_3 (Local sub-routine 3)

N10 .....

.

N99 M17

%MAIN (Main program)

N100 .....

N105 $FOR P1 = 1,3,1

N110 LL V.E.LUP[P1] ( Call of sub-routines via external variables )
(V.E.LUP[1], V.E.LUP[2],V.E.LUP[3] including)
(the strings TASCHE_1, TASCHE_2, TASCHE_3)

N120 $ENDFOR

.

N205 $FOR P2 = 1,5,1

N210 L V.E.GUP[P2] ( Call of sub-routines via external variables )
(V.E.GUP[1], V.E.GUP[2]..., including the)
(strings of the file names)

N220 $ENDFOR

N300 M30


Implicit global sub-routine call at program start

Often during start of different NC main programms the same recurring initializations of data have to be executed. If this initializations are summarized in a global sub-routine, with channel parameter [1]-44 it is possible, that this sub-routine is implicitly executed as a first action at NC program start [CHAN].

In this sub-routine the complete functional scope of the NC programming can be used. This means, it is the same like a sub-routine call with the L word in the main program.

Above all this feature is usefull for initialization, definition and presetting of offsets, G functions, parameter value, variables and so on. Concrete steps of operation should not be programmed here.


Cycles as global sub-routines (Call L CYCLE)

Cycles are available in the NC kernel in the form of sub-routines and enable special machining operations such as deep hold drilling or pocket milling. The machining task defined in the cycle is described in a general form. When the cycle is invoked, the data is supplied on assignment of the transfer parameters.

A cycle is programmed independently of the currently valid plane (G17, G18, G19) and independently of the axis names configured in the NC channel. In the cycle, you can access encapsulated group of parameters of your own. These are assigned values when the cycle is invoked.

Special syntax, which is characterised by the "@" character, is available for this purpose. In cycle programming, this character is used in combination with:

@Pxx Transfer parameter in the cycle call and the cycle

@X, @Y, @Z Main axes in the cycle

@I, @J, @K Centre point coordinates in the cycle

@S Main spindle in the cycle

The cycle call must be programmed in a separate NC block without any further NC commands. The syntax consists of a global subroutine call with additional specification of the cycle-dependent transfer parameters.

L CYCLE [NAME=<cycle_name> [MODAL] @P1=<expr> .. @P30=<expr> ]

NAME=<cycle_name> Name of cycle (file name)

MODAL Modal cycle call. After every further NC block in the main program that contains movement commands, the cycle is implicitly executed again.

The modal effect is cancelled by the NC command #DISABLE MODAL CYCLE.

@P1<expr>... List of the transfer parameters.

... @P30<expr> A maximum of 30 @Pxx parameters of the REAL type can be passed on. Write and read access is only allowed within a cycle. The @Pxx parameters can be assigned direct values, any variables, P parameters and mathematical expressions.

Within bracketing, no order is required for specifying the key words and transfer parameters. During programming, users only need to know which @Pxx parameters have to be assigned for the cycle called.

Parameters that are not needed can be omitted. On calling, @Pxx parameters that are not programmed are initialised with 0 (zero). Weather a parameter is programmed (valid), can be checked in cycle by the variable V.G.@P[i].VALID. The transfer parameters remain up to the programmed call of another cycle.

Transfer parameters programmed in the cycle call, but not used in the cycle itself, are ignored.

A cycle is a self-contained NC program unit with a defined machining task. It is advisable, to avoid the nested calls of cycles, because there is the danger of multiple setting of transfer parameters.

Depending on the version, in the default setting display of the cycle's executed lines is on or off during execution of a cycle in the running NC program or in the single block mode. When display is off, only the cycle call is displayed during this time.

In TwinCat systems, all cycle lines are visible in the display by default.

This feature can be changed with channel parameter[1]-52.

Definitions required before cycle call:

· Modal G functions and also circle geometries and the currently active feed rate (F word) active before cycle call are retained beyond the cycle. This feature can be changed with channel parameter [1]-51.

· Modal G functions that are programmed in combination with axis names (e.g. G92, G98, G99, G100, G112, G130, etc.) are not restored if they were programmed in the cycle itself.

· The machining plane (G17, G18, G19) should be defined in the higher-level NC program before cycle call. In drilling cycles, the axis perpendicular to this plane is the axis in which the drilling operation is performed and in milling cycles it is the feed axis for the depth.

· Any tool geometry compensation (e.g. length compensation) must also be selected before the cycle is invoked.

· The values required for the feed rate, the spindle speed and the spindle rotation direction must be defined in the higher-level NC program, unless there are corresponding transfer parameters in the cycle.

· The spindle commands programmed in the cycles always refer to the active main spindle of the NC channel. Make sure that this main spindle has been defined before the cycle call.

· The starting position for a corresponding drilling or milling operation and the tool's orientation must always be moved to before the cycle is invoked in the higher-level NC program.

Cancelling a modal cycle

A modally acting cycle (key word MODAL in the cycle call) is cancelled with the following NC command. The command must be programmed on its own in the NC block.

#DISABLE MODAL CYCLE

Available cycles

For the machining tasks

· Drilling

· Thread tapping

· Helical mill drilling

· Pocket milling

parameter-definable cycles are available. For more information about programming and use see the functional description "Cycles (C21)" ([FCT-C21]).

Programming examples

The various parameter assignment possibilities are presented below with reference to the example of a cycle call for drilling (drill.cyc).

The drill.cyc drilling cycle requires the following transfer parameters:

@P1 -> Position of the return plane (absolute)

@P2 -> Position of the machining plane (absolute)

@P3 -> Safety distance (unsigned)

@P4 -> Final drilling depth (absolute) or

@P5 -> Final drilling depth relative to the machining plane (unsigned)

Cycle call with constant values:

..

Nxx L CYCLE [NAME=drill.cyc @P1=110 @P2=100 @P3=4 @P4=40]

..

or with specification of a relative drilling depth @P5:

..

Nxx L CYCLE [NAME=drill.cyc @P1=110 @P2=100 @P3=4 @P5=60]

..

Cycle call with variables:

The variables must be defined and assigned values before the cycle call.

..

#VAR

V.L.RPL = 110

V.L.WPL = 100

V.L.SDST = 4

V.L.DEP = 50

#ENDVAR

Nxx L CYCLE [NAME=drill.cyc @P1= V.L.RPL @P2=V.L.WPL @P3=V.L.SDST @P4=V.P.DEP]

..

Cycle call with P parameters:

The parameters must be defined and assigned values before the cycle call.

..

Nxx P10 = 110

Nxx P11 = 100

Nxx P15 = 4

Nxx P17 = 50

Nxx L CYCLE [NAME=drill.cyc @P1= P10 @P2=P11 @P3=P15 @P4=P17]

..

Cycle call with mathematical expressions:

..

Nxx P20 = 100

Nxx L CYCLE [NAME=drill.cyc @P1= 10+P20 @P2=2*50 @P3=5-1 @P4=P20/2]

..

Cycle call with constant values, any sequence of parameters in brackets:

..

Nxx L CYCLE [@P4=40 NAME=drill.cyc @P2=100 @P3=4 @P1=110]

..

Cycle call with constant values, cycle is to have a modal effect:

..

Nxx L CYCLE [NAME=drill.cyc @P1=110 @P2=100 @P3=4 @P4=40 MODAL]

..

Example

%drill_main

N05 T1 D1

N10 M06

N15 X0 Y0 Z0 G0 G90 F200 S300 M3 G53 G17

N20 Z110

N30 X40 Y40 (drilling 1)

N40 L CYCLE [NAME=drill.cyc MODAL @P1=110 @P2=100 @P3=2 @P4=55]

N50 X60 Y60 (drilling 2 and implicit cycle call because it is modal)

N60 X100 Y60 (drilling 3 and implicit cycle call because it is modal)

N70 X100 Y20 (drilling 4 and implicit cycle call because it is modal)

#DISABLE MODAL CYCLE

N80 X0 Y0 M5

N100 M30

Notes on creating cycles

As far as possible, cycles must be programmed as generally valid and independently of the axis names currently used in the NC channel and the definition of planes. To this end, in the cycle there is a possibility of using the plane-independent "neutral axis names " @X, @Y and @Z for the first three main axes. Meanings:

@X -> always the first main axis

@Y-> always the second main axis

@Z-> always the third main axis

Example: axes in the cycle

Nxx G91 @X=@P1 @Y=@P2 @Z=@P3 F1000 G01

By analogy, so-called "neutral centre point coordinates" are available when programming circles. Meanings:

@I -> always the centre point coordinate in the first main axis

@J -> always the centre point coordinate in the second main axis

@K -> always the centre point coordinate in the third main axis

Example: circle in the cycle

Nxx G91 G02 @X=@P1 @Y=@P2 @I=@P4 @J=@P5 F1000

To also be independent from the configured spindle name during spindle programming, in the cycle the main spindle can always be addressed with the neutral spindle name @S.

@S -> always the main spindle

Example: spindle in the cycle

Nxx @S=1000 M3 (main spindle cw with 1000 rpm)


Parameters and parameter calculation

In NC-program parameters can be used as place-holder for numerical values. The advantage of parameters is that the value of a parameter may be altered during the program flow. This allows the development of flexible NC-program.

Either the R-word or the P-word is used depending upon configuration for parameter designation [6]-6.44. In the examples described here, P-parameters are used.

Programming example

In a sub-routine, e.g. a drilling cycle, instead of coordinate values (drill depth, drill feed, dwell etc.) parameters are used. The parameters are then allocated with the final values in the respective calling main program :

The call, in the main program will appear as follows :

:

N100 P10=20.5 P11=12.6 P12=1.2

N110 L4712

:

Fig. 9.1: Example for application of parameter calculation

P <expr> Standard parameter

P<expr> The parameter index must always be greater than zero, however it can assume any desired value. The maximum number of parameters to be used can be configured [6]-6.19.

In addition to plain parameters, also parameter arrays (e.g. P100[50]) are allowed. The dimension of the arrays can be configured [6]-6.20.

P <expr> [ <expr> ] { [<expr>] } Parameter arrays

Via the channel parameters list it can be specified [1]-12, if the P-parameters will be program-globally active.

Parameters can be created (and eventually initialized) in a NC-program either within a declarations block which starts with #VAR and is closed with a #ENDVAR, or implicitly with the first write access. But parameter arrays must always be created inside a declarations block. To the better overview the initialization of a parameter array can be written over several NC blocks by using the \-character. The following syntax is used for creating:

#VAR Start of declaration block

:

: Declaration and initialisation part

:

#ENDVAR End of declaration block

Programming example

#VAR

P10[3][6] = [10,11,12,13,14,15, \

20,21,22,23,24,25, \

30,31,32,33,34,35 ]

P20[3][4] = [40,41,42,43, 50,51,52,53, 60,61,62,63]

P100

#ENDVAR

P200 = 10 P201=11

:

Parameters and parameter arrays can also be deleted within the NC-program. For that, the #DELETE command with the following syntax is available:

#DELETE P <expr> {,P<expr>}

Programming example

#DELETE P10, P20, P100, P200, P201

Furthermore, the SIZEOF and the EXIST function (see chapter 2.6.1.3) are used to determine the dimensions size of parameter arrays and for checking the existence of parameters.

More:

button Assignment of parameters

button Parameter calculation

button Programming of coordinates by parameters

button Indirect parameters

button External access to parameters


Assignment of parameters

In the type of assignment, one differentiates between internal and external parameters. Internal parameters are assigned through NC program, e.g. P12=0.12, whereas to the external parameters control-dependent or process-dependent values are assigned in application-dependent program parts of the control system. The values such as those given below can be assigned :

q Current spindle rpm.

q Torque in the drives

q Values of external measuring devices

q Values of heat and power sensors

q Keyboard inputs via operating menu

q etc.

External parameters, thus, allow the execution of process variables in NC-program. They must, however, be set up through the application. An example for the use of external parameters is given in chapter 9.5.


Parameter calculation

Instead of the direct allocation of numerals, also chained arithmetical expressions can be used (see also Chapter 2.6.1: Mathematical expressions). For the input, the known mathematical rules would be valid, such as

- Point-before-Slash - Calculation,

- the parentheses-rule, where, however, the square parentheses "[ ]" are to be used.


Programming of coordinates by parameters

The syntax for programming of coordinates by the axis designation using parameters is:

<axis_name> P<expr>

<axis_name> Designation of the axis

P<expr> Assigned parameter

P<expr> can also be replaced by mathematical expressions.

Programming example

X P1*SIN [P2*30]


Indirect parameters

In arithmetical expressions and allocations indirect parameters are used in the same way as direct ones. Depending upon the mode [6]-6.44 the following cases has to be distinguished:

Case 1: Only the P-word is allowed for parameter

Not only direct (Pnn) but also indirect programming takes place exclusively via the P-word. On using indirect parameters the following is valid:

PPnn points to the parameters Pnn.

During initialization the address of a Pnn is assigned to a PPnn. Also the use of PPP... is possible.

Example:

With P120=10 the value 10 is loaded into the parameter 120. The statement PP120=123.456 however assigns this value to that parameter whose address exists in P120, i.e. P10. Accordingly, PP121=SQRT[2,0] leads to the following result:

Fig. 9.2: Illustration of the effect of indirect P-parameters

Case 2: R-word as direct parameter, P-word as indirect parameter

The direct programming is done using the R-word (Rnn) the indirect one using the P-word. In this mode first the parameter table must be allocated through the R-word before it is possible to access indirectly using the P-word. Since the P-word acts exclusively indirect, here programming must not be done with PP.

According to DIN Pnn points to the parameter whose index is stored in the field "nn" of the parameter table.

Example:

The use of indirect parameters permits the allocation of entire fields of parameters:

Programming example

Allocation of P-parameters P20 and P40 with 50

N110 P1 = 20 P2 = 40

N120 PP1 = 50

N130 PP2 = PP1

Allocation of P-parameters P15 to P25 with 0.0

N110 $FOR P1 = 10,20,1

N120 P[P1 + 5] = 0.0

N130 $ENDFOR

It should be noted that the depth of nesting during indirect addressing of parameters (PPPP ...nn) is dependent upon the configuration.


External access to parameters

To be able to influence the decoding of an NC-Program from a parallel process (for instance, control console, PLC), an external access to the P-parameter can be performed through a special interface.

Programming example

From a PLC, the program flow of an NC program started by the NC-control is to be influenced.

%Operating mode

N000 P101 = 0 (P101 for error message to the PLC)

N001 P102 = 0 (P102 for influencing the program flow)

N002 $WHILE P102 == 0

N003 $ENDWHILE

N010 $SWITCH P102

N020 $CASE 1

N030 (Manual operation)

N040 $BREAK

N050 $CASE 2

N060 (Automatic-mode)

N070 $BREAK

N080 $CASE 3

N090 (Reference point travel)

N100 $BREAK

N110 $DEFAULT

N120 P101 = 100 (Error status , report to PLC )

N130 $ENDSWITCH

N140 M30

One could provide sub-routine calls in the various cases, in order to synchronize the program flow regarding time.

Attention has to be paid that the P-Parameter are to be marked as program-global [1]-12, because otherwise the external P-Parameters end will be deleted at the program-beginning or program- and thus would not be available outside of an NC-Program.


Statements for influencing the NC program flow sequence

The syntax for control block statements is:

$<statement>

<statement> Control block string acc. to the following chapters. Note that between $ and <statement> no blank characters are permissible.

Statements for influencing the program flow (control-block) enable the realization of:

q Conditional jumps, so as to trigger for instance, an optional machining step depending upon a measured value,

q Incremental digital loops, so as to simplify programming of several repetitive machining steps, for instance, during line milling or during boring of hole-circles,

q Loops with run-condition, to allow to repetition of several machining steps till the abort condition is fulfilled. For instance, if the infeed of the tool and a machining operation should be carried out till a definite coordinate-value is reached. Loops could be programmed as endless-loops in case of missing or unfulfilled run-condition.

In the use of control-block-statements, the following rules are valid:

q In one NC-block, only one control-statement may be present!

q Nested control-block-statements are allowed. The nesting depth is firmly given.

q Only the block number and "/" may be programmed in front of the control-block-statement.

q In the invalid branch of a control-block-statement, a syntax-check is made for block-numbers and further (nested) control-block-statements (see example of IF-ELSE-branching).

Programming example

Syntax check in an invalid branch:

N10 $IF 0

N20 XY (Here no syntax check takes place)

N30 $ENDIF

N10 $IF 0

N20 ...

N30 $IF XY (Syntax-check because of nested control-block-)
(statement; Error message because of the unknown term)

N40 ...

N50 $ENDIF

N60 $ENDIF

N10 $IF 0

NXY (Syntax check of block number;)

(Error message because of unknown term)

N30 $ENDIF

Because of inaccuracy in the calculation and internal representation of parameters, comparative operations in control-block-statements, could lead to an erroneous result (see Chapter 2.6.1.3: "Arithmetical expressions"). Therefore in doubtful cases, checking should be made not for precise value but for a tolerance range.

Programming example

Wrong:

N10 $FOR P1 = 0, 10, 1

N20 P2 = P2 + 0.01

N30 $ENDFOR

N40 $IF P2 == 0.1 (Due to inaccuracies of calculation P2)

N50 ... (can be unequal to 0.1, so that the $ELSE-)

N60 $ELSE (branch is executed)

N70 G04 X20

N80 $ENDIF

Correct:

N10 $FOR P1 = 0, 10, 1

N20 P2 = P2 + 0.01

N30 $ENDFOR

N40 $IF [P1 - 0.1] <= .000001 (Verification of a tolerance range non-)

(problematical for NC manufacture;)

N50 G04 X5 ($IF-branch will be executed)

N60 $ELSE

N70 ...

N80 $ENDIF

More:

button Conditional jumps

button Counting loops

button Loops with running condition

button Influencing of loop flow sequences


Conditional jumps

More:

button The IF - ELSE - branching

button The case branch

button The $GOTO-statement


The IF - ELSE - branching

For IF-ELSE-branching, the following control statements are used :

$IF, $ELSE, $ELSIF, $ENDIF.

The branching always begins with

$IF <expr>

and always ends with

$ENDIF

The control statements

$ELSE

and

$ELSEIF

are optional and serve to build up multiple branching.

The condition in $IF-control-block is checked by verifying the mathematical expression for true or  not true (TRUE and FALSE). To be able to use also decimal variables the jump condition is fulfilled (TRUE) if..

.. the absolute value of the mathematical expression is > or = 0.5.

Programming example

N10 ...

N20 $IF P1 Only if |P1| is greater or equal to 0,5, the statements

N30 ... N30 to N50 will be executed.

N40

N50

N60 $ENDIF

But the following is also possible :

N10 ...

N20 $IF P1 >= 0.5 Only if P1 is greater or equal to 0.5 , the state-
ments N30 to N50 will be executed.

N30 ...

N40

N50

N60 $ENDIF

or

N10 ...

N20 $IF P1 > P2 Only if P1 is greater than P2, the statements N30 to N50
will be executed, otherwise the statements N70 to N90

N30 ...

N40 ...

N50 ...

N60 $ELSE

N70 ...

N80 ...

N90 ...

N100 $ENDIF

These use of ELSEIF permits :

N10 ...

N20 $IF P1 == 0 Only if P1 is equal to 0, the statements N30 to N50
will be executed, otherwise the $ELSEIFcondition will
be checked, whether P2 >= 0.5 and accordingly N70 to
N90 or N110 to N130 will be executed.

N30 ...

N40

N50

N60 $ELSEIF P2>=0.5 The $ELSEIF-condition serves for building up
branching nesting into one another.

N70 ...

N80

N90

N100 $ELSE

N110 ...

N120

N130

N140 $ENDIF

1.) According to the programming language C, there exists difference in the syntax between

Assignment : P5 = 3

and

Comparison: $IF P5 == 3

2.) For the version 2.3 and earlier ones : because in mathematical expressions always the sequence

Operator -> Term -> Operator -> Term -> etc

expected, for comparison operations, those expressions with a minus sign must be bracketed ("-" is interpreted as operator).

Programming example

$IF P1 >= -5 wrong, because term->operator->operator->term

$IF P1 >= [-5] right, because term->operator->term->operator->term


The case branch

The case branch allows, as a function of an arithmetical expression, the processing of different NC-program variants.

For the case branch, the control-statements given below are used

$SWITCH, $CASE, $DEFAULT, $ENDSWITCH .

The case branch always begins with

$SWITCH <expr1>

followed by several

$CASE <expr2>

$BREAK

optionally followed by:

$DEFAULT

and always ends with

$ENDSWITCH

Programming example

N100 $SWITCH P1=INT [P1*P2/P3] If the result of the arithmetic expression

is equal 1, the blocks after $CASE 1 will

be executed (N120 bis N140)

N110 $CASE 1

N120 ... N130

N140 $BREAK

N150 $CASE P2 If the result is equal to P2, tzhe blocks

N160 ..N170 will be executed.

N160 ...

N170 $BREAK

N300 $CASE n

N320 ...

N330 $BREAK

N350 $DEFAULT The $DEFAULT block is optional and serves to

process the NC-blocks.

N360 ... N360 to N380, if the result of the $SWITCH-

Block has not matched any of the

N370

N380

N390 $ENDSWITCH

The comparison of the expression <expr1> and <expr2> is carried out in internal REAL-mode. Here, both the expressions are evaluated as equal if the value difference is < 0.001.

The expressions <expr1> and <expr2> can also assume negative values.


The $GOTO-statement

In addition to subroutine technique or using control block instructions ($IF, $FOR...), this functionality offers another possibility of branching to different program sections. Setting labels in the NC program and using the GOTO command enables control to be transferred to any point in the program.

There are two possibilities to use the jump statements:

Expression - Label:

N <expr> : Definition

$GOTO N <expr> | $GOTO N<expr>: Jump call

String - Label:

[ <string> ] Definition

$GOTO [ <string> ] Jump call

Characteristics:

q The call $GOTO can be placed before or after the label definition in the NC program. A label is searched for in the program in the upward and downward directions.

q The label must always be called and defined at the same program level (locally within the program). Program jumps between the main program and the subroutine, as well as jumps between subroutines, are not permitted (see Fig. 10.1).

q Identical labels may be defined in main programs and subroutines.

q It is possible to jump to the same label from several points in the NC program.

q A $IF-statement may be combined with a $GOTO in the same NC line. In this case, no corresponding $ELSE/$ENDIF construct may be programmed.

q It is allowed to program other NC-commands before and after a $GOTO-command in the same NC line. The jump, however, is the last action in the NC line.

q External jumps to any levels of a $IF-$ELSE-$ENDIF-control block and within and between these levels are possible. Then however, this jump-in level is the active level (condition is assumed as true; see Programming example).

q Jumps within $WHILE, $FOR, $DO, $REPEAT are not allowed.

q Complete exit from a control block by a $GOTO from any level is always allowed.

q Labels in comments (#COMMENT BEGIN, #COMMENT END) are not recognized.

q In string labels, no distinction is made between upper and lower case.

q The maximum number of string labels [6]-6.42 and expression labels [6]-6.41 and the string label length [6]-6.43 are firmly given.

Programming example

%goto

N05 P1=1

N06 P2=1

N10 G74 X1 Y2 Z3

N11 X0 Y0 Z0

N15 $IF P1==1 $GOTO N40: -> Jump from outside to N40 into a control
block

N20 X10

N25 Y10

N30 $IF P1==2

N35 X20

N40: $IF P2==1

N45 X30

N50: Y30 $GOTO N65: -> Jump to N65 between control block levels
(IF-ELSE)

N55 $ELSE

N60 Y40

N65: X40

N70 $ENDIF

N80 Z99

N999 M30

Fig. 10.1: Schematic representation of the $GOTO jump command

Programming example

N10 G1 XY

N20: X100 (Label Definition N20:)

$IF V.L.dummy_1 <100 $GOTO N20(Jump to Label N20 (or N20:))

$IF V.L.dummy_1 >200

$GOTO [LABEL_1](Jump to Label [LABEL_1])

Y20

$ENDIF

[LABEL_1] X0 (Label Definition [LABEL_1])

N30 A0

$FOR V.P.my_var = 0, 4, 1

$IF V.L.dummy_2 <200 $GOTO [CONTINUE](Jump to Label [CONTINUE])

$SWITCH V.P.my_var

$CASE 0

V.P.AXE_X=V.P.GROUP[1].position[V.P.my_var]

$BREAK

$CASE 1

V.P.AXE_Y=V.P.GROUP[1].position[V.P.my_var]

$BREAK

$CASE 2

V.P.AXE_Z=V.P.GROUP[1].position[V.P.my_var]

$BREAK

$CASE 3

V.P.AXE_A=V.P.GROUP[1].position[V.P.my_var]

$DEFAULT

$ENDSWITCH

$ENDFOR

[CONTINUE] (Label Definition [CONTINUE])

N1000 ...

...

More:

button Parametric jump call


Parametric jump call

The $GOTO command also offers the possibility to program the labels in parametric way. This enables a NC-program flow controled from outside (e.g. from PLC).

For the style of the block number <expr> at the jump call of expression labels all available mathematical types of descriptions like parameters, local and global variables and external variables are allowed.

$GOTO N <expr> Jump call

The jump call of string labels can also be programmed via external variables from type string respectively string array (see also chapter 13.5). Here the name of the label is stored in the external variable.

$GOTO V.E. ... Jump call

Programming example

N10 ...

:

N50 $GOTO NV.E.JUMP_EXPR (Jump e.g. to N200 via ext. variable)
(V.E.JUMP_EXPR including the value 200)

:

:

N100 $GOTO V.E.JUMP_STR (Jump e.g. to [CONTINUE) via ext. variable)
(V.E.JUMP_STR including the value 200)

:

:

N200: ...

:

N500:...

:

:

:

[CONTINUE]...

:

N...

812_end


Counting loops

The counting loops enable the processing of statements n-times. The number of the loop passage is checked through a counting variable.

The Syntax of the counting loop begins with:

$FOR P <expr> = <expr1>, <expr2>, <expr3>

and always ends with:

$ENDFOR

Here, P<expr> is the counting variable, its starting value is specified through <expr1>, its end value through <expr2> and the counting increment through <expr3>.

Only integer values may be used as counting variables.

If using decimal numbers, it is generally not possible to precisely represent the increment (exception: powers of two) since a rounding error adds up when adding. This may lead to running through one loop too few.

In place of the P-Parameter also variables ("V") with write access or, if configured [6]-6.44, R-Parameters (see Chapter 9 ) could be used.

If the counting increment is negative, the loop is aborted if the end value is underflown, if the counting increment is positive the abortion of the loop takes place if the end value is exceeded. The programming of the counting increment 0 leads to an endless loop and to the output of a warning.

Programming example

N100 $FOR P1= 10, 100, 2 P1 is pre-allocated with 10 at loop beginning.
 The counting loop is traversed till P1 has
 exceeded the value 100, whereas P1 is
incremented by 2 at the end of every loop pass.

N110 X SIN [P1 * 5] Within the counting loop, the NC blocks N110
 to N130 are executed..

N120 Y COS [P1 * 5]

N130 ...

N150 $ENDFOR

Programming example

Negative step width:

N100 $FOR P1= 100, 10, -2 P1 is pre-allocated with 100 at the loop
beginning. The counting loop is traversed till
N110 X SIN [P1 * 5] P1 has fallen below the value 10, whereas P1 is
decremented by 2 at the end of every loop pass.
Within the counting loops the NC blocks N110 to
N130 are executed.

N120 Y COS [P1 * 5]

N130 ...

N150 $ENDFOR

N100 $FOR P1= 100, 10, 1 P1 is pre-allocated with 100 at the loop
beginning. The counting loop is traversed till
P1 has exceeded the value 10, i.e. only once.
N110 X SIN [P1 * 5] Within the counting loops the NC blocks N110 to
N130 are executed.

N120 Y COS [P1 * 5]

N130 ...

N150 $ENDFOR

Endless loop

N100 P2=20

N110 $FOR P1= 100, 10, 0 Endless loop

N120 $IF P2 == 50

N130 $BREAK

N140 $ENDIF

N150 $ENDFOR


Loops with running condition

More:

button Verification of running condition at the beginning of the loop

button Verification of running condition at the end of the loop


Verification of running condition at the beginning of the loop

The syntax of this loop begins with:

$WHILE <expr>

and always ends with:

$ENDWHILE

At the beginning of every loop pass the stated parameters are verified. The loop is broken off if the expression <expr> assumes the value range of FALSE(-0.5<expr>0.5).

Programmierbeispiel

N90 P1 = 100.0

N100 $WHILE P1 > 0.5 P1 > 0.5 is tested for FALSE at the loop
N110 P1 = P1 - 1.5 Y P1 beginning. The loop is traversed till P1 ful-
N120 $ENDWHILE fills the aborting condition

N130 ...


Verification of running condition at the end of the loop

There are two kinds of loops available.

The syntax of the DO loop begins with:

$DO

and ends with:

$ENDDO <expr>

At the end of every loop pass the stated parameters are checked. The loop is broken off if the expression <expr> assumes the value range of FALSE (expr < 0.5).

The syntax of the REPEAT loop begins with:

$REPEAT

and ends with:

$UNTIL <expr>

At the end of every loop pass the stated parameters are checked. The loop is broken off if the expression <expr> assumes the value range of TRUE (expr > 0.5).

In contrast to $WHILE and $FOR loops the $DO and $REPEAT loops are always passed once at least.

Programming example

N10 X0 Y0 Z0

N20 P2=10 P1=0

N30 $DO

N40 P1=P1+1

N50 XP1

N60 $ENDDO P1 <= P2 P1 is tested for FALSE at the end of the loop.

The loop is passed till P1 does not fulfill the

condition any longer.

N99 M30

N10 X0 Y0 Z0

N20 P2=10 P1=0

N30 $REPEAT

N40 P1=P1+1

N50 XP1

N60 $UNTIL P1 > P2 P1 is tested for TRUE at the end of the loop.

The loop is passed till P1 does fulfill the

condition.

N99 M30


Influencing of loop flow sequences

More:

button The $BREAK-statement

button The $CONTINUE-statement


The $BREAK-statement

$BREAK

Not always it is suggestive to leave a loop with the abort criterion. The key word $BREAK, can be used for termination, apart from program execution, in the individual $CASE-notations of the $SWITCH-statement (see chaper 10.1.2), also abruptly end the execution of a loop.

For example, this is useful in case of thickly nested loops, if the execution of the innermost loop should be broken off.

Programming example

N10 $WHILE <expr1> The loop is terminated if

N20 ... expr1 "not valid or

N30 expr2 valid

N40 $IF <expr2>

N50 $BREAK

N60 $ENDIF

N70 ...

N80

N90 $ENDWHILE

N100 ...


The $CONTINUE-statement

$CONTINUE

In contrast to $BREAK, the loop is not broken off with the $CONTINUE-statement, but is branched to the beginning of the loop. The execution of all statements, present after $CONTINUE will thus not take place.

Programming example

N10 $FOR <expr1> N70 and N80 are executed if

N20 ... expr2 is "not valid

N30

N40 $IF <expr2>

N50 $CONTINUE

N60 $ENDIF

N70 ...

N80

N90 $ENDFOR

N100 ...


Special functions

The syntax for special functions is:

# <string> <spezific additional syntax>

#<string> So-called string command. Note that between # and <string> no blank characters are permissible.

<spezific additional syntax> Subsequent command specific syntax elements, which are programmed directly or within assigned brackets.

With exception of the commands #ACHSE, #PSET and #PRESET all other special functions must be programmed single in a NC block.

If not described explicitly, in the specific additional syntax commas"," and equals signs "=" are optional. They only help for readability of the NC part program.

Example:

#STRING [VALUE_A 10 VALUE_B 20] ß à #STRING [VALUE_A=10, VALUE_B=20]

More:

button Axis exchange commands

button Dwell - functionality

button Flushing NC channel

button Synchronization of decoding and interpolation

button Inter-block valid comments

button Waiting for event

button Minimum radius for tangential feedrate adaptation

button Conditional interpretation

button Suppression of axis offsets

button Switching of measurement mode

button Position preset

button Synchronous operation

button Messages from the NC-Program

button Jerk limiting slope

button Akima- spline interpolation

button B- spline interpolation

button Free form surface operation

button Writing and reading SERCOS parameters and commands

button Channel synchronization

button Rotation in a plane (contour rotation)

button Automatic axis tracking (C-axis tracking)

button User-defined error output

button Time measurement

button Definition of feed axes

button Adaption of the path dynamic limits

button Definition of a minimum block transition velocity

button Writing of machine data

button Definition of file names

button Restoring of axes configurations and axes couplings

button Work space/ Protection space monitoring

button Influencing of function forward/backward on path

button Tool change during active synchronous operation

button Locking of program areas for block search

button Programmable path override

button Drive independent switching of drive functions


Axis exchange commands

In this paragraph the NC commands for

q Requesting of axes

q Releasing of axes as well as for

q Determination of an axis configuration

are described.

During every program start the specified [1]-27 axis configuration is restored. The axis exchange commands are active in the current axis group.In an NC-block several requests and/or returns of axes are possible. These operations are done in semi-parallel state.

q The exchange of axes for which the synchronous or manual operation is active is not permissible.

q With active TRC, the first two main axes must not be exchanged.

q Axis exchange commands must be programmed single in a NC block.

q Axis exchange commands can only be used for path and coupled axes, spindle axes are ignored. For releasing and requesting of spindle axes special commands are available.

With effect from version V2.6. the already available axis exchange commands were reworked and extended in their functionality and mechanism. In the chapter standard axis exchange commands the already existing standard syntax of older versions is described. This syntax is downwards compatible and can also be used in future.

In the chapter extended axis exchange commands the new syntax is described. This syntax is downwards compatible to the already existing functional scope, but it offers with the so-called logic switches and additional possibilities for the definition of axis exchange sequences a more flexible programming.

More:

button Standard syntax

button Extended Syntax


Standard syntax

More:

button Requesting of axes

button Releasing of axes

button Definition of an axes configuration


Requesting of axes

With this NC command, axes from the axes management can be requested.

#CALL AX [<mode>] [<axis_name>,<axis_number>,<axis_index> {,<options>} ]

{ [<axis_name>,<axis_number>,<axis_index> {,<options>} ] } (non-modal)

<mode> With/without request for axis positions from the interpolator and a position initialization of the NC channel during the exchange of the axes.

Mode | Replacement of axis in the NC channel
 | Default setting: With request for set values from interpolatorand a position initialization of the NC channel
FAST | Without request for set values from the interpolator.Position initialization of the NC channel.

<axis_name> Permissible are strings with the starting characters A, B, C, Q, U, V, W, X, Y and Z. The multiple assignment of the same designation for different axes (identification through logical axis number) causes an error message and an aborting of the NC-program.

<axis_number> The physical assignment of axes takes place through the logical axis number. Permissible are mathematical expressions.The logical axis number must be known in axes management. In case of a request of an unknown logical axis number or several identical logical axis numbers, an error message and an aborting of the NC-program will occur.

<axis_index> The axis index determines the location of the axis within the current axis group of the NC-channels. It defines the main and synchronous axes (see following table). Permissible are mathematic expressions, whose results are in the value range [0 ... Maximum axes number -1]. The axis index should not yet be allocated with an axis. In case of a request for an axis to an index that is allocated with another axis, an error message and an aborting of the NC-program will occur.

Index | Axes configuration
0 | 1. Main axis in the machining plane.
1 | 2. Main axis in the machining plane.
2 | 3. Main axis, generally, perpendicular to the machining plane.
3 | 1. Synchronous axis
n | (n-2). Synchronous axis.

In order to simplify programming, it is possible to omit the entry of the axis index for coupled axes (only in the case of #CALL AX...). In this case, the next free axis index from index 3 is then assigned automatically to this coupled axis.

For main axes this index always has to be programmed explicitly.

However, it must be noted that the index of a coupled axis is important as regards various functionalities. For example, all transformational axes must be arranged with no gaps on the basis of the main axes in the case of kinematic transformation (RTCP). Thus, in such cases, it is necessary also to explicitly program the axis index for the coupled axes.

<options> Offsets are axis-specifically maintained. The following are involved here:

q Reference point offset,

q Machine table offset,

q Tool offset,

q Zero offset,

q Measurement offset,

q manual operation offset,

q Preset offset.

With the key words of the following table, during requests for axes, the inclusion of offsets can be controlled.

Key word | Exchange of axis
 | No inclusion of offsets (default)
ALL | Inclusion of all offsets *
BPV | Inclusion of reference point offset
PZV | Inclusion of machine table offset
WZV | Inclusion of tool offset *
NPV | Inclusion of zero offset
MOFFS | Inclusion of measurement offset
SOFFS | Inclusion of manual operation offset
PSET | Inclusion of preset offset

* In the case of #CALL AX, adoption of tool offsets only makes sense when the tool has been cancelled. As soon as a tool is already active in the channel or if it is selected with #CALL AX after replacement, the adopted tool offsets are replaced with the offsets of the current tool.

With regard to tool selection, pay attention to the fact that the offsets are always placed in the axis calculations in compliance with the sequence indexed in the tool data.

Programming example

%Zero_Offset

N010 X200

N015 V.G.NP_AKT.V.X = 11

N020 #PUT AX [X]

.....

N130 #CALL AX [X,1,0,NPV]

N140 X100 (Final machine X-axis position is 111)

M30

If an axis which is already present in the axis group of the NC-channel is requested, no request is triggered to axes management.

Example:

Assignment of axis names, logical axis numbers and axis indices at the time of program start:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2

Programming example

%ACHSTAUSCH1

N10 #CALL AX FAST [X1,7,4] (X1-axis without set value -request)

(and output of Init.-function block)

Assignment of axis names, logical axis numbers and axis indices after the axis request:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2
 |  | 3
X1 | 7 | 4

Continuation of the programming example:

:

N100#CALL AX [Y1,8,6] [C,9,3] (request for Y1- and C-axis, axis index

of C-axis is determined automatically)

Assignment of axis names, logical axis numbers and axis indices after the second axis request:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2
C | 9 | 3
X1 | 7 | 4
 |  | 5
Y1 | 8 | 6

Continuation of the programming example:

:

N1000 #CALL AX FAST [Z1,13,5,ALL] (Inclusion of all shifts)

N1010 #CALL AX [C1,11,7,NPV MOFFS] (Inclusion of zero offsets)

(and of measurement offsets)

Assignment of the axis names, logical axis numbers and axis indices after the third axis request:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2
C | 9 | 3
X1 | 7 | 4
Z1 | 13 | 5
Y1 | 8 | 6
C1 | 11 | 7


Releasing of axes

With these NC command axes of the current axis group of the NC-channels can be returned to axes management. The return of not or no longer present axes is permissible and does lead to any error message.

#PUT AX [ <axis_name> {,<axis_name> } ] (non-modal)

<axis_name> Permissible are strings with the starting characters A, B, C, Q, U, V, W, X, Y and Z.

With this NC command all the axes present in the current axis group of the NC-channels are returned to the axes management.

#PUT AX ALL (non-modal)

Example:

Assignment of axis names, logical axis numbers and axis indices at the time of program start:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2

Programming example

%ACHSTAUSCH1

N10 #PUT AX [ X , B ] (Release X-axis; B-axis not present,)

(nevertheless no error message is output.)

Assignment of axis names, logical axis numbers and axis indices after the axis release:

Axis name | Logical axis number | Axis index
 |  | 0
Y | 2 | 1
Z | 3 | 2

Continuation of the programming example:

...

N100 #PUT AX ALL (Releasing of all axes of this group.)

Assignment of axis names, logical axis numbers and axis indices after the second axis release:

Axis name | Logical axis number | Axis index
 |  | 0
 |  | 1
 |  | 2


Definition of an axes configuration

With this NC command, a new axis configuration can be defined which replaces the existing axis configuration. This means, exactly the axes, which are programmed in NC command, form the new axes configuration of the NC channel.

#SET AX [<mode>] [<axis_name>,<axis_number>,<axis_index> {,<options>} ]

{ [<axis_name>,<axis_number>,<axis_index> {,<options>} ] } (non-modal)

<mode > With/without request for axis positions from the interpolator and a position initialization of the NC channel during the exchange of the axes.

Mode | Replacement of axis in the NC channel
 | Default-setting: With request for set values from the interpolator and a position initialization of the NC channel.
FAST | Without request for set values from interpolator. Position initialization of the NC channel.

<axis_name > Permissible are strings with the starting characters A, B, C, Q, U, V, W, X, Y and Z. Multiple assigning of the same designation for different axes (identification through the logical axis number) causes an error message and an aborting of the NC-program.

<axis_number > The physical assignment of axes occurs via the logical axis number. Permissible are mathematical expressions. The logical axis number must be known in the axes management. During the request for an unknown logical axis number or several identical logical axis numbers an error message and an aborting of the NC-program will occur.

<axis_index > The axis index determines the location of the axis inside the axis group of the NC-channel. It defines thus the main and the synchronous axes (see the following table). Permissible are mathematical expression whose results are within the range [0 ... Maximum axes number -1]. The axis index must not yet be allocated with an axis. In case of a request to an index that is already allocated with another axis, an error message and an aborting of the NC-program will occur.

Index | Axes configuration
0 | 1. Main axis in the machining plane.
1 | 2. Main axis in the machining plane.
2 | 3. Main axis generally perpendicular to the machining plane.
3 | 1. Synchronous axis
... | ...
n | (n-2). Synchronous axis.

<options> Offsets are axis-specifically maintained. The following are involved here:

q Reference point offset,

q Machine table offset,

q Tool offset,

q Zero offset,

q Measurement offset,

q manual operation offset,

q Preset offset,

With the key words from the following table the inclusion of offsets can be controlled during the request for axes.

Key word | Exchange of axis
 | No inclusion of offsets (default)
ALL | Inclusion of all offsets *
BPV | Inclusion of reference point offset
PZV | Inclusion of machine table offset
WZV | Inclusion of tool offset *
NPV | Inclusion of zero offset
MOFFS | Inclusion of measurement offset
SOFFS | Inclusion of manual operation offset
PSET | Inclusion of preset offset

* When the tool is selected, pay attention to the following when adopting tool offsets in the case of #SET AX:

· If axes are only swapped (internal axis replacement) by #SET AX and otherwise no additional axes are specified or requested, all offsets (including the tool offsets) are also replaced and continue to remain active. Specifying key words to adopt offsets has no effect.
If a new tool is then selected, the offsets also replaced are replaced by the new tool's offsets.

· As soon as an axis release or an axis request is triggered by #SET AX (external axis replacement), the tool offsets are included again in calculation of the sequence of axes indexed in the tool data. Therefore, any adopted tool offsets are replaced by the current tool's offsets! If the original tool offsets in the corresponding axes are to continue to apply, a new tool must be selected in the case of which the offsets have been adapted to the new axis arrangement.

You are therefore advised to run #SET AX with the tool deselected and to ensure the correct assignment of tool offsets by the appropriate parameterisation in the record of a newly selected tool.

Example:

Index of tool offsets in tool data | [0] | [1] | [2] | [3]
Parametrized tool offsets e.g. for T1 | 50 | 0 | 70 | 20
Axis configuration on program start | X | Y | Z | ---
Included tool offsets after T1 selection | 50 | 0 | 70 | ---
"Internal" #SET AX {Z, X, Y}: | Z | X | Y | ---
Tool offsets are also swapped or | 70 | 50 | 0 | ---
"External" #SET AX {Z, X, Y, B}: | Z | X | Y | B
Tool offsets are newly recalculated corresponding to T1 | 50 | 0 | 70 | 20

Example:

Assignment of axis names, logical axis numbers and axis indices at the time of program start:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2

Programming example

(Setting of axis configuration:

(X-axis remains in its place;)

(Y-axis is released;)

(Z-axis is resorted acc. to Index 4;)

(Y1- and Z1-axis are requested)

%ACHSTAUSCH1

N10 #SET AX [X,1,0][Y1,4,2][Z1,5,3][Z,3,4]

Assignment of axis name , logical axis numbers and axis indices after N10:

Axis name | Logical axis number | Axis index
X | 1 | 0
 |  | 1
Y1 | 4 | 2
Z1 | 5 | 3
Z | 3 | 4


Extended Syntax

The availability of this function depends on the configuration and the concrete scope of version.

The extended syntax enables the programming of the axis exchange sequences with macro definitions (chapter 15) or external variables of the string type (V.E.). This especially is useful for multi channel machines and systems, if between the channels static axes groups should be exchanged. This axes groups can be defined for example in macros for the use in axis exchange commands.

Furthermore the extended syntax enables the internal processing of conflicts without creation of an error message or a warning by setting so-called logic switches. This logic switches are optional and can be programmed additionally in the axis exchange commands. If no logic switches are programmed, the standard evaluation is valid. This means, for plausibility conflicts the evaluation of the axis exchange sequences is aborted with error messages.

The logic evaluation is the same for all axis exchange commands and checks both, the plausibility within the programmed axis exchange sequences and the plausibility to the already available axes in NC channel.

Especially the logic switches are usefull for axis exchange sequences, which were defined via macros or string variables, because here overlappings and redundant programmings can be solved internally.

More:

button Requesting of axes

button Releasing of axes

button Definition of an axes configuration


Requesting of axes

With this NC command, axes from the axes management can be requested.

# AX REQUEST [<mode>] [NAM, NBR, IDX] [<axis_exchange_sequence> {,<options>} ]

{ [<axis_exchange_sequence> {,<options>} ] } (non-modal)

<mode> With/without request for axis positions from the interpolator and a position initialization of the NC channel during the exchange of the axes

Mode | Replacement of axis in the NC channel
 | Default setting: With request for set values from interpolator and a position initialization of the NC channel.
FAST | Without request for set values from the interpolator. Position initialization of the NC channel.

NAM, NBR, IDX Logic switches for the handling of conflicts.

ID | Significance
NAM | Handling of redundant axes names
NBR | Handling of redundant axes numbers
IDX | Handling of redundant axes indices

The logic switches can be programmed individual or in combination!

<axis_exchange_sequence> consisting of:

< axis_name> Permissible are strings with the starting characters A, B, C, Q, U, V, W, X, Y and Z.

With conflicts within the programmed axis exchange sequence:

Redundant axes names à ERROR, Abort of NC program

With conflicts to already existing axes in NC channel:

Axes names identical, Axes numbers different à ERROR, Abort of NC program

With active logic switch NAM the conflict is solved as follows:

The axis gets the default name from its axis parameter list [2] -18. The user has to ensure the clear definition of the default axis name in the list.

< axis_number> The physical assignment of axes takes place through the logical axis number. Permissible are mathematical expressions.The logical axis number must be known in axes management.

With conflicts within the programmed axis exchange sequence:

Redundant axes numbers à ERROR, Abort of NC program

With conflicts to already existing axes in NC channel:

Axis number already exists in NC channel à WARNING

With active logic switch NBR the conflict is solved as follows:

The axis request is ignored, this means it is not executed!

< axis_index> The axis index determines the location of the axis within the current axis group of the NC-channels. It defines the main and synchronous axes (see following table). Permissible are mathematic expressions, whose results are in the value range [0 ... Maximum axes number -1]. The axis index should not yet be allocated with an axis.

Index | Axes configuration
0 | 1. Main axis in the machining plane.
1 | 2. Main axis in the machining plane.
2 | 3. Main axis, generally, perpendicular to the machining plane.
3 | 1. Synchronous axis
n | (n-2). Synchronous axis.

In order to simplify programming, it is possible to omit the entry of the axis index for coupled axes. In this case, the next free axis index from index 3 is then assigned automatically to this coupled axis.

For main axes this index always has to be programmed explicitly.

However, it must be noted that the index of a coupled axis is important as regards various functionalities. For example, all transformational axes must be arranged with no gaps on the basis of the main axes in the case of kinematic transformation (RTCP). Thus, in such cases, it is necessary also to explicitly program the axis index for the coupled axes.

With conflicts within the programmed axis exchange sequence:

Redundant axes indices à ERROR, Abort of NC program

With conflicts to already existing axes in NC channel:

Axis index is already used in NC channel, Axes names different à ERROR, Abort of NC program

With active logic switch IDX the conflict is solved as follows:

For the axis automatically the next free index in the axes configuration of the NC channel is determined.

<options> Offsets are axis-specifically maintained. The following are involved here:

q Reference point offset,

q Machine table offset,

q Tool offset,

q Zero offset,

q Measurement offset,

q manual operation offset,

q Preset offset.

With the key words of the following table, during requests for axes, the inclusion of offsets can be controlled.

Key word | Exchange of axis
 | No inclusion of offsets (default)
ALL | Inclusion of all offsets *
BPV | Inclusion of reference point offset
PZV | Inclusion of machine table offset
WZV | Inclusion of tool offset *
NPV | Inclusion of zero offset
MOFFS | Inclusion of measurement offset
SOFFS | Inclusion of manual operation offset
PSET | Inclusion of preset offset

* In the case of #AX REQUEST, adoption of tool offsets only makes sense when the tool has been cancelled. As soon as a tool is already active in the channel or if it is selected with #AX REQUEST after replacement, the adopted tool offsets are replaced with the offsets of the current tool.

With regard to tool selection, pay attention to the fact that the offsets are always placed in the axis calculations in compliance with the sequence indexed in the tool data.

Example 1:

Use of the standard functionality:

Assignment of axis names, logical axis numbers and axis indices at the time of program start:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2

Programming example

%Axis_exchange1

N10 #AX REQUEST [X1,7,4] (Request for X1-axis)

Assignment of axis names, logical axis numbers and axis indices after the axis request:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2
 |  | 3
X1 | 7 | 4

Continuation of the programming example:

:

N100 #AX REQUEST [Y1,8,6] [C,9, ] (Request for Y1- and C-axis, C-axis)

(is set automatically on index 3)

Assignment of axis names, logical axis numbers and axis indices after the second axis request:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2
C | 9 | 3
X1 | 7 | 4
 |  | 5
Y1 | 8 | 6

Continuation of the programming example:

:

N1000 #AX REQUEST FAST [Z1,13,5,ALL] (Inclusion of all shifts)

N1010 #AX REQUEST [C1,11,7,NPV MOFFS] (Inclusion of zero offsets)

(and of measurement offsets)

Assignment of the axis names, logical axis numbers and axis indices after the third axis request:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2
C | 9 | 3
X1 | 7 | 4
Z1 | 13 | 5
Y1 | 8 | 6
C1 | 11 | 7

Example 2:

Use of the additional syntax (logic switches):

Assignment of axis names, logical axis numbers and axis indices at the time of program start in channel 1:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2

Assignment of axis names, logical axis numbers and axis indices at the time of program start in channel 2:

Axis name | Logical axis number | Axis index
X | 7 | 0
Y | 8 | 1
Z | 9 | 2

Programming example

In channel 1: Request of X- and Y-axes from channel 2 (Logical axis numbers 7 and 8).

%Axis_exchange

N10 #AX REQUEST NAM [X,7,3] [Y,8,4] (Request of X/Y-axes)

Because of the logic switch NAM in channel 1 the additional new axes X and Y are set to their default names from the axis lists (e.g. X2 and Y2).

Assignment of the axis names, logical axis numbers and axis indices after the axis requests:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2
X2 | 7 | 3
Y2 | 8 | 4

Continuation of the programming example:

In channel 1: Request of Z-axis from channel 2 (Logical axis number 9).

:

N100 #AX REQUEST NAM IDX [Z,9,2] (Request of Z-axis)

Because of the logic switches NAM and IDX in channel 1 the additional new Z-axis is set on the next free index (e.g. index 5) with its default name from the axis list (e.g. Z2).

Assignment of the axis names, logical axis numbers and axis indices after the second axis request:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2
X2 | 7 | 3
Y2 | 8 | 4
Z2 | 9 | 5

Example 3:

Use of the additional syntax (logic switches and axis exchange sequences as string):

Assignment of axis names, logical axis numbers and axis indices at the time of program start in channel 1:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2

Assignment of axis names, logical axis numbers and axis indices at the time of program start in channel 2:

Axis name | Logical axis number | Axis index
X_1 | 7 | 0
Y | 8 | 1
Z | 9 | 2
A | 10 | 3
B | 11 | 4

Programming example

In channel 1: Request of X_1/ Y and B-axis from channel 2 (Logical axis numbers 7, 8 and 11). The axis exchange sequence is stored in a macro.

%Axis_exchange

N05 "ACHSEN_KANAL2" = "[X_1,7,0] [Y,8,1] [B,11,2]"

:

N10 #AX REQUEST NAM IDX "ACHSEN_KANAL2" (Request axes)

Because of the logic switches NAM and IDX in channel 1 the additional new axes are included correctly.

Assignment of the axis names, logical axis numbers and axis indices after the axes requests:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2
X_1 | 7 | 3
Y2 | 8 | 4
B | 11 | 5


Releasing of axes

With these NC command axes of the current axis group of the NC-channels can be returned to axes management. The return of not or no longer present axes is permissible and does lead to any error message.

#AX RELEASE [ < axis_name > {,< axis_name > } ] (non-modal)

< axis_name > Axis names of the currently present axes in NC channel.

With the logic switch NBR the evaluation can be changed from axis names to logical axis numbers (e.g. if the axis names at the time of release are unknown).

#AX RELEASE [NBR] [ <expr> {,<expr> } ] (non-modal)

<expr> Logic axis number.

With this NC command all the axes present in the current axis group of the NC-channels are returned to the axes management.

#AX RELEASE ALL (non-modal)

Example:

Assignment of axis names, logical axis numbers and axis indices at the time of program start:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2
A | 4 | 3
B | 5 | 4

Programming example

%Axis_exchange

N10 #AX RELEASE[X, A] (Release X/A-axes)

Assignment of axis names, logical axis numbers and axis indices after the axis release:

Axis name | Logical axis number | Axis index
Y | 2 | 1
Z | 3 | 2
B | 5 | 4

Continuation of the programming example:

...

N100 #AX RELEASE NBR[2] (Release Y-axis)

Assignment of axis names, logical axis numbers and axis indices after the second axis release:

Axis name | Logical axis number | Axis index
Z | 3 | 2
B | 5 | 4

Continuation of the programming example:

...

N100 #AX RELEASE ALL (Release all present axes from this NC channel)

Assignment of axis names, logical axis numbers and axis indices after the third axis release:

Axis name | Logical axis number | Axis index


Definition of an axes configuration

With this NC command, a new axis configuration can be defined which replaces the existing axis configuration. This means, exactly the axes, which are programmed in NC command, form the new axes configuration of the NC channel.

# AX DEF <mode>] [NAM, NBR, IDX] [<axis_exchange_sequence> {,<options>} ]

{ [<axis_exchange_sequence > {,<options>} ] } (non-modal)

<mode> With/without request for axis positions from the interpolator and a position initialization of the NC channel during the exchange of the axes.

Mode | Replacement of axis in the NC channel
 | Default setting: With request for set values from interpolator and and a position initialization of the NC channel.
FAST | Without request for set values from the interpolator. Position initialization of the NC channel.
OPT_FAST | Optional Fast. Has only an effect, if the fast program start also has been instructed. Otherwise the set values are requested.

NAM, NBR, IDX Logic switches for the handling of conflicts.

ID | Significance
NAM | Handling of redundant axes names
NBR | Handling of redundant axes numbers
IDX | Handling of redundant axes indices

The logic switches can be programmed individual or in combination!

<axis_exchange_sequence> consisting of:

<Axisname> For the axis name strings with the following initial letters are allowed: A, B, C, Q, U, V, W, X, Y and Z.

With conflicts within the programmed axis exchange sequence:

Redundant axes names à ERROR, Abort of NC program

With conflicts to already existing axes in NC channel:

Axes names identical, Axes numbers different à ERROR, Abort of NC program

With active logic switch NAM the conflict is solved as follows:

The axis gets the default name from its axis parameter list [2] -18. The user has to ensure the clear definition of the default axis name in the list.

< axis_number> The physical assignment of axes takes place through the logical axis number. Permissible are mathematical expressions.The logical axis number must be known in axes management.

With conflicts within the programmed axis exchange sequence:

Redundant axes numbers à ERROR, Abort of NC program

With conflicts to already existing axes in NC channel:

Axis number already exists in NC channel à WARNING

With active logic switch NBR the conflict is solved as follows:

The axis request is ignored, this means it is not executed!

< axis_index> The axis index determines the location of the axis within the current axis group of the NC-channels. It defines the main and synchronous axes (see following table). Permissible are mathematic expressions, whose results are in the value range [0 ... Maximum axes number -1]. The axis index should not yet be allocated with an axis.

Index | Axes configuration
0 | 1. Main axis in the machining plane.
1 | 2. Main axis in the machining plane.
2 | 3. Main axis, generally, perpendicular to the machining plane.
3 | 1. Synchronous axis
... | ...
n | (n-2). Synchronous axis.

In order to simplify programming, it is possible to omit the entry of the axis index for coupled axes. In this case, the next free axis index from index 3 is then assigned automatically to this coupled axis.

For main axes this index always has to be programmed explicitly.

However, it must be noted that the index of a coupled axis is important as regards various functionalities. For example, all transformational axes must be arranged with no gaps on the basis of the main axes in the case of kinematic transformation (RTCP). Thus, in such cases, it is necessary also to explicitly program the axis index for the coupled axes.

With conflicts within the programmed axis exchange sequence:

Redundant axes indices à ERROR, Abort of NC program

With conflicts to already existing axes in NC channel:

Axis index is already used in NC channel, Axes names different à ERROR, Abort of NC program

With active logic switch IDX the conflict is solved as follows:

For the axis automatically the next free index in the axes configuration of the NC channel is determined.

<options> Offsets are axis-specifically maintained. The following are involved here:

q Reference point offset,

q Machine table offset,

q Tool offset,

q Zero offset,

q Measurement offset,

q manual operation offset,

q Preset offset.

With the key words of the following table, during requests for axes, the inclusion of offsets can be controlled.

Key word | Exchange of axis
 | No inclusion of offsets (default)
ALL | Inclusion of all offsets *
BPV | Inclusion of reference point offset
PZV | Inclusion of machine table offset
WZV | Inclusion of tool offset *
NPV | Inclusion of zero offset
MOFFS | Inclusion of measurement offset
SOFFS | Inclusion of manual operation offset
PSET | Inclusion of preset offset

* When the tool is selected, pay attention to the following when adopting tool offsets in the case of #AX DEF:

· If axes are only swapped (internal axis replacement) by #SET AX and otherwise no additional axes are specified or requested, all offsets (including the tool offsets) are also replaced and continue to remain active. Specifying key words to adopt offsets has no effect.
If a new tool is then selected, the offsets also replaced are replaced by the new tool's offsets.

· As soon as an axis release or an axis request is triggered by #AX DEF (external axis replacement), the tool offsets are included again in calculation of the sequence of axes indexed in the tool data. Therefore, any adopted tool offsets are replaced by the current tool's offsets! If the original tool offsets in the corresponding axes are to continue to apply, a new tool must be selected in the case of which the offsets have been adapted to the new axis arrangement.

You are therefore advised to run #AX DEF with the tool deselected and to ensure the correct assignment of tool offsets by the appropriate parameterisation in the record of a newly selected tool.

Example:

Index of tool offsets in tool data | [0] | [1] | [2] | [3]
Parametrized tool offsets e.g. for T1 | 50 | 0 | 70 | 20
Axis configuration on program start | X | Y | Z | ---
Included tool offsets after T1 selection | 50 | 0 | 70 | ---
"Internal" #AX DEF {Z, X, Y}: | Z | X | Y | ---
Tool offsets are also swapped or | 70 | 50 | 0 | ---
"External" #AX DEF {Z, X, Y, B}: | Z | X | Y | B
Tool offsets are newly recalculated corresponding to T1 | 50 | 0 | 70 | 20

With the programming of DEFAULT the default configuration corresponding to the channel parameter list [1]-27 can be forced. Also the combination with logic switches and additional axes requests is possible.

# AX DEF DEFAULT (non-modal)

or

# AX DEF DEFAULT [NAM, NBR, IDX] { [<axis_exchange_sequence> {,<options>} ] } (non-modal)

Example:

Assignment of axis names, logical axis numbers and axis indices at the time of program start:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2

Programming example

(Setting of axes configuration)

(X-axis remains on ist place; Y-axis is released;)

(Z-axis is resorted acc. to Index 4;(Y1- and Z1-axis are)

(requested;)

%Axis_exchange

N10 #AX DEF [X,1,0][Y1,4,2][Z1,5,3][Z,3,4]

:

Assignment of axis names, logical axis numbers and axis indices after N10:

Axis name | Logical axis number | Axis index
X | 1 | 0
 |  | 1
Y1 | 4 | 2
Z1 | 5 | 3
Z | 3 | 4

Restoring of default axes configuration:

%Axis_exchange

N10 #AX DEF DEFAULT

:

Assignment of axis names, logical axis numbers and axis indices after N10:

Axis name | Logical axis number | Axis index
X | 1 | 0
Y | 2 | 1
Z | 3 | 2


Dwell - functionality

#TIME <expr> (non-modal)

See chapter 4.1.5 - Dwell (G04), (#TIME).


Flushing NC channel

The commands for flushing the NC-channel can not be used during contour modifying functions like e.g. active tool radius compensation, polynomial contouring or HSC-mode.

#FLUSH (non-modal)

By the command #FLUSH all NC-blocks, stored in the NC-channel at the moment, are executed. This means the buffer effect of the NC-channel is removed. So the last programmed traverse block before the #FLUSH is executed at once.

Generally at the end of this traverse block the movement is stopped, even if the next traverse block is already present in the Look-ahead. However the decoding of the part program is continued without any interruption.

Programming example

If the statement #FLUSH is not programmed, the Look-ahead waits with the interpretation of the linear movement till the next traverse block appears. However, because subsequently a jump is made to the WHILE-loop, the execution of the traverse movement can be delayed. Therefore, with #FLUSH the buffer effect of the Look-ahead is neutralized, so that before the jump in the WHILE-loop, the traverse block is executed.

N10 G01 X20

N20 #FLUSH

N30 $WHILE 1

...

Nnn $ENDWHILE

M30

#FLUSH CONTINUE (non-modal)

By the addition CONTINUE the stopping at block end of a traverse movement can be avoided. If in the Look-ahead the next traverse block is already present, the movement is executed without any interruption. If no following traverse block is present, the move-ment is also stopped.

Programming example

Between the traverse blocks N10 and N200 a lot of non-movement relevant NC-blocks are programmed (e.g. extensive parameter calculation, variable declaration and so on). Because of that the execution of the traverse movement can be delayed in Look-ahead and the movement can be stopped at the end of N10. This can be avoided by #FLUSH CONTINUE. If at the end of N10 the next traverse block (N200) is present, the movement is executed without any interruption.

N10 G01 X200

N20 #FLUSH CONTINUE

N30 P1 = [P2 * P3] + V.E...

...

N200 X250

M30


Synchronization of decoding and interpolation

#FLUSH WAIT (non-modal)

In contrast to "#FLUSH" the program execution will be interrupted by the command "#FLUSH WAIT". After that the buffer effect of the NC channel will be also removed. If the NC channel is empty and interpolation so is synchronized, the further execution of the part program will be started automatically.

Programming example

The decoding stops in block N20 until the interpolation has reached position X20. After that the decoding of N30 starts automatically.

N10 G01 X20

N20 #FLUSH WAIT

N30 X40

...

M30


Inter-block valid comments

#COMMENT BEGIN Beginning of a comment block

:

: Disabled area. All lines are
: overlooked by the NC-kernel
: without being evaluated.

:

#COMMENT END End of a comment block

Both the commands must be programmed, respectively, in an own NC line, i.e. further NC commands in the same block are impermissible. Exception is line-by-line comment that is to be framed in with "(" and ")".

Comment blocks can be defined within or outside an NC-program, however, are restricted to the current file, since on the one hand calls from, and on the other hand returns from global subroutines included in the comments, are not evaluated.

Nesting of comments can be included application-specifically.

Programming example

Nesting enabled:

:

#COMMENT BEGIN Beginning ofcomment block 1

...

#COMMENT BEGIN Beginning of comment block 2

...

#COMMENT END End of comment block 2

...

#COMMENT END End of comment block 1

:

Nesting disabled:

:

#COMMENT BEGIN Beginning ofcomment block 1

...

#COMMENT BEGIN Beginning ofcomment block 2

...

#COMMENT END End of comment block 1 and 2

:

In the following cases, the NC-kernel generates error messages:

q "End of File" is read in within a comment block. This leads to the message : "read in File end before the end of comments."

q #COMMENT END is read without a comment begin programmed previously. Message: Comment end programmed without corresponding comment begin

q After the comment-commands, further NC-commands programmed in the block. Message: "After #COMMENT BEGIN/END no further NC commands allowed


Waiting for event

#WAIT FOR <expr> (non-modal)

With this command the decoding of NC program is stopped till the arithmetic expression is TRUE or > 0,5.

Programming example

N10 #WAIT FOR V.E.EXT1 == 5 (Decoding of NC program is stopped at this)
(point, till the value of external variable)
(is 5)

....

N100 #WAIT FOR V.E.EXT2 (Decoding of NC program is stopped at this)
(point, till the value of external variable)
(is > 0.5.)

N200 G01 X200 F1000

....

812_start


Minimum radius for tangential feedrate adaptation

This command completes the tangential feedrate adaptation programmed with G10/G11. The minimum radius is taken into account in circular blocks containing the identifier for feedrate adaptation. The feedrate only will be adapted, if the programmed circular contour radius is greater than or equal to the minimum radius.

#SET TANGFEED RMIN [ <expr> ] (modal)

<expr> Minimum contour radius Rmin at which the tangential feedrate is not applied.

Fig. 11.1: Programming the tangential feedrate.

q A new programmed minimum radius will be taken into account with the next relevant motion block.

q The declaration of the minimum radius is optional. The tangential feedrate adaptation also work if #SET TANGFEED RMIN is not programmed or the radius is set to zero.

Programming example

(Contour with TRC and tangential feedrate adaptation)

N10 V.G.WZR=5

N20 #SET TANGFEED RMIN [3] (Set minimum radius rmin to 3mm)

N30 G41 G01 X0 Y20 G11 F600 (Selection of TRC and feedrate adaptation)

N40 X20 Y20

N50 G03 X40 R10 (Feedrate adaptation)

N60 G01 Y40

N70 G02 X44 R2 (No feedrate adaptation à rprg < rmin)

N80 G01 Y20

N20 #SET TANGFEED RMIN [5] (Set new minimum radius rmin to 5mm)

N90 G03 X57 R4 (No feedrate adaptation à rprg < rmin)

N100 G01 Y50

N110 X60 G40 G10 (Deselection of TRC and feedrate adaptation)

N120 X0 Y0

N999 M30

812_end


Conditional interpretation

Similar to a precompiler-statement in the programming language C, parts of NC-program can be summarized in #IF-#ELSE-#ENDIF-constructs. The interpretation of these program parts can thus be controlled as a function of the arithmetic expression.

The conditional interpretation always begins with

#IF <expr>

and ends with

#ENDIF

The statement

#ELSE

is optional and serves to build up a branching also.

The condition in $IF-control-block is checked by verifying the mathematical expression for true or  not true (TRUE and FALSE). To be able to use also decimal variables the jump condition is fulfilled (TRUE) if

.. the absolute value of the mathematical expression is > or = 0.5.

In the use of conditional interpretation, the following rules are valid:

q Only "/" may be programmed in front of #IF, #ELSE und #ENDIF. Block numbers are not allowed.

q Nested conditional interpretations are allowed. The nesting depth is firmly given.

q Invalid branches of conditional interpretations are not checked for syntax but completely skipped.

Programming example

#IF V.E.START_VALUE == TRUE

N100 F100

:

#ELSE

N200 F40

:

#ENDIF

N300

:

:

N999 M30


Suppression of axis offsets

#SUPPRESS OFFSETS <axis_name><expr> {<axis_name><expr>} (non-modal)

<axis_name> <expr> New axis position without any offsets

The positions programmed in the same NC-block with this command will be passed to the NC-channel without any modification, i.e. active coordinate offsets (e.g. zero offset, additional zero offset, .. , tool offsets) will not be considered.

Programming example

:

N10 G92 X10 Y20 (BPV X10 Y20)

N20 X0 Y0 (Position X=10 Y=20)

N30 #SUPPRESS OFFSETS X0 Y0 (Position X=0 Y=0)

:


Switching of measurement mode

Using the command #MEAS MODE[<expr.>] the measurement type can be set via the NC-program.

#MEAS MODE [ [<expr>] ] (modal)

<expr> Measurement type acc. to chapter 4.1.10 .

The programming of #MEAS MODE without parameter selects the default measurement type, which is specified in the channel parameters list [1]-1.

Programming example

N10 #MEAS MODE[3] (Measurement type 3)

N20 G100 X150 (Measurement traverse)

..

N100 #MEAS MODE (Default- measurement type)

..

M30

More:

button Extended programming


Extended programming

Alternative to the command #MEAS MODE the following command offers additional adjustments besides the definition of measuring types. The programmed parameter settings keep valid until program end. But after program start the default settings based on the configuration lists are effective. The changing of measurement parameters of an axis implies, that it is marked as measurement axis ( this means the axis parameter P-AXIS-00118 is set on 1).

#MEAS [DEFAULT] [ [ [TYPE<expr>] [SIMU_OFFSET<expr>] ] | [ {AX<axis_name> |AXNR<expr>}

[SIGNAL<expr>] [EDGE<expr>] [INPUT<expr>] [G107 | G108] ] ] (modal)

TYPE<expr> New measuring type according to chapter 4.1.10 . This measuring type is valid until the next new setting or program end.

SIMU_OFFSET<expr> This keyword is only effective in the particular case during measuring simulation in connection with the axis parameter [2]-19 (P-AXIS-00112 - meas_simu_mode=4). The value shifts the simulated default measuring point with reference to the path movement based on the programmed target points.

With SIMU_OFFSET for measuring type 2 the default measuring point can be shifted in positive or negative direction. In this case the possibly additional offset of the axis parameter [2]-20 (P-AXIS-00114 - mess_offset) is not taken into consideration.

TYPE and SIMU_OFFSET may not be programmed in combination with the other keywords.

AX<axis_name> Name of the measurement axis

AXNR<expr> Logical axis number of the measurement axis, positive integer

SIGNAL<expr> Name of the source of the measurement signal, which shall be used for the measurement.

Valid values | Significance
PLC | Measurement signal by PLC, see P-AXIS-00257
DRIVE | Measurement signal by drive position latch, see P-AXIS-00116 or P-AXIS-00269
FIXED_STOP | Measurement signal by moving on fixed stop, see P-AXIS-00330

EDGE<expr> Relevant measurement edges, see also P-AXIS-00113.

Valid values | Significance
POS | Rising measurement edge
NEG | Falling measurement edge

INPUT<expr> Name of the drive measurement input, which shall be used for the measurement (see P-AXIS-00295).

Valid values | Significance
1 | 1st. measurement input
2 | 2nd. measurement input

G107 Deselection of edge banding function for this axis. During edge banding no measurement value is latched for this axis.

G108 Selection of edge banding function for this axis. As a pre-condition in the axis parameters list for this axis the functionality - edge banding - is activated (see P-AXIS-00098).

DEFAULT Resetting of the axis specific (AX, AXNR) parameter settings changed by the #MEAS command (SIGNAL, EDGE, INPUT, G107/G108). The measurement settings of the axis parameters list are effective again.

Measurement edge (EDGE) and measurement input (INPUT) can not be changed for SERCOS drives with integrated position latch (SIGNAL=DRIVE), because for this purpose parameter changes in the drive are necessary as well.

Programmierbeispiele

Selection of another measurement type:

N100 #MEAS [TYPE=2]

Setting of measurement positions for the measurement simulation for meas type 2:

For all other measuring types only a shifting in negative direction (against the path movement) is possible.

Activation of measurement by moving on fixed stop for X and Y axes:

N100 #MEAS [AX=X AX=Y SIGNAL=FIXED_STOP]

Activation of measurement signal by PLC on negative edge:

N100 #MEAS [AXNR=1 SIGNAL=PLC EDGE=NEG]

Deactivation of edge banding function for Y and Z axes:

N100 #MEAS [AX=Y AX=Z G107]

Restoring of the measurement settings for all path axes based on the axes parameters:

N100 #MEAS DEFAULT

Restoring of the measurement settings for X axis based on the axes parameters:

N100 #MEAS DEFAULT [AX=X]


Position preset

The programming of a new position preset is done with:

#PSET <axis_name><expr> {<axis_name><expr>} (non-modal)

<axis_name><expr> New actual position of an axis

The positions are programmed absolutely. No traverse movement is linked with this command.

Axes, for which no new programming position preset was programmed, retain their current programming position preset, i.e the corresponding offset does not change for the concerned axis.

The #PSET-command can be repeated as often as desired.

The preset-function is non-modal.

By a machine reference search (G74) the offsets of the coordinate system caused by the #PSET command are removed.

More:

button Deselection of position preset


Deselection of position preset

#PRESET {<axis_name> <dummy_expr> } (non-modal)

<axis_name><dummy_expr> Actual value offset of the axis is reset. The coordinate value is required only for syntax reasons and is irrelevant otherwise.

If #PRESET is programmed without axis specification, the programming position preset offsets in all axes are removed.

If tool radius compensation, mirroring or diameter programming are used, #PSET or #PRESET must not be programmed.

(Only the commands #PSET and #PRESET are "non-modal". The programming position preset offset itself is, naturally, valid until programmed again or deselected by #PRESET.)

Programmierbeispiel

N10 X50 Y10 Z0

N20 #PSET X20 Y20 (Preset position for X and Y)

N30 X10

N40 #PRESET X10 (Reset X-Position; value 10 not relevant)

N50 X30

N60 #PRESET (Reset all axes)

N70 M30

The following shows the position of the x-axis in machine coordinates after the execution of the respective NC-block:

Fig. 11.2: Positions of the x-axis in machine coordinates / programmed coordinates (In this example, no other coordinate transformations are selected).

(In this example, no other coordinate transformations are selected).


Synchronous operation

More:

button Programming of axes couplings

button Extended programming of axes couplings (SOFT-GANTRY)

button Selection/deselection of axes couplings

button Inquiring Coupling State and Coupling Number via Variables


Programming of axes couplings

The following command can be used in an NC program for defining axes couplings:

#SET AX LINK [ <coupling_group> , <slave>=<master> {,<slave>=<master>} ]

or alternative

#AX LINK [NBR] [<coupling_group>, <slave>=<master> {,<slave>=<master>} ]

< coupling_group > Number of the coupling group
1 ... [Max. number of coupling groups(1) -1] , Positive integer

<slave> Designation or logical axis number of the slave axis of the coupling pair i

<master> Designation or logical axis number of the master axis of the coupling pair I

i Max. number of coupling pairs(2)

NBR With the logic switch NBR the evaluation can be changed from logical axes names to axes numbers. Then the axes couplings (resp. coupling pairs) have to be defined with logical axis numbers. At that time of definition the axes must not exist in NC channel. Their availability in NC channel is checked only at activation of the coupling group!

At least one master-slave coupling pair must be defined in each coupling group.

General handling and method of operation:

q The definitions of coupling groups apply across programs. This means, they can be reselected in a subsequent NC-program (see also Chapter 11.12.3).

q The coupling group with the coupling number '0' cannot be programmed in NC-program. It is defined in the channel parameters list [1]-13.

q A disabled coupling group can be modified at any time. The previously defined couplings are overwritten.

q An enabled coupling group can not be modified.

q Recursive axes coupling is not possible. A master axis in a coupling group cannot be slave axis at the same time and vice versa. A slave axis cannot be master axis in another coupling group at the same time and vice versa.

q Master and slave axis of a coupling pair may not be identical.

q Main axes cannot be slave axes.

q A slave axis only may be assigned to one master axis, but a master axis can be the owner of several slave axes.

q When synchronous operation is activated, it is checked whether all master and slave axes are contained in the axis group of the NC-channel

q Master and slave axes must be of the same axis type and be used in the same axis mode.

(1) see [6]-2.11

(2) see [6]-2.12

q The NC command used for programming the coupling group must be a single instruction in the NC block.

q The coupling number may also be programmed in mathematical expressions. The result must be a positive integer.

q A tracking axis (#CAXTRACK) may not be a master- or a slave axis.

Programming example

N10 #SET AX LINK[1, Z2=Z] Z2 is coupled as slave to main axis Z

N20 #SET AX LINK[2, Y2=Y, X2=X] Coupling Y2 with Y and X2 with X

N30 #SET AX LINK[3, X1=X, X2=X, X3=X] Coupling of X1, X2, X3 as slaves to the same master axis X

...

or alternative

N10 #AX LINK[1, Z2=Z1]

N20 #AX LINK NBR[2, 8 = 2, 9 = 3] Coupling vialog. axis numbers


Extended programming of axes couplings (SOFT-GANTRY)

The availability of this function depends on the configuration and the concrete scope of version.

Besides contouring axes, spindles can also be run in the synchronous mode. An exact description can be found in Chapter 14.5.

Besides this, contouring axes can also be operated as so-called gantry axes. Contrary to normal synchronous operation, additional monitoring mechanisms with regard to position deviations are active and specific error reactions apply. Due to the machine structure, during mechanical (also static) gantry operation the axes are permanently coupled to one another and are defined by the configuration of the machine. Dynamic changing of the gantry coupling after starting up the control system is not possible.

Fig. 11. 3 : Mechanical gantry operation

Machines that do not permit any mechanical gantry operation because of their basic structure, e.g. milling machines with two independent slides, can be operated in the gantry mode by programming. For example, this is necessary whenever such slides have to be coupled with one another for clamping and machining large workpieces.

Fig. 11. 4 : Programmable gantry operation (Soft-Gantry)

The #SET AX LINK command described in Chapter 11.12.1 is available with extended syntax for this purpose:

#SET AX LINK [ < coupling_group> , [ <slave>=<master>,G [,<limit_1>,limit_2>] ]

{, [ <slave>=<master>,G [,<limit_1>,limit_2>] ] } ]

or alternative

#AX LINK [NBR] [<coupling_group>, [ <slave>=<master>,G [,<limit_1>,limit_2>] ]

{, [ <slave>=<master>,G [,<limit_1>,limit_2>] ] } ]

<coupling_group> Number of the coupling group
1 ... [Max. number of coupling groups(1) -1] , Positive integer.

<slave> Designation or logical axis number of the slave axis of coupling pair i

<master> Designation or logical axis number of the master axis of coupling pair i

i Max. number of coupling pairs(2)

NBR With the logic switch NBR the evaluation can be changed from logical axes names to axes numbers. Then the axes couplings (resp. coupling pairs) have to be defined with logical axis numbers. At that time of definition the axes must not exist in NC channel. Their availability in NC channel is checked only at activation of the coupling group!

G Key word for "gantry coupling"

When gantry coupling is used, the following values serve to monitor, in two stages, the permissible position difference of the gantry axes. Specified in [mm]. Positive real number:

<limit_1> First monitoring limit. If this limit is exceeded, the motion is aborted and the control system assumes the error state. In the case of the default, the position difference is dissipated during RESET. Depending on the specific application, deviating motion can still be realised.

<limit_2> Second monitoring limit. An error that is not capable of reset is output if this limit is exceeded. The control system must be switched off and the position difference must be remedied manually.

If the monitoring limits are not programmed, the defaults from the axis parameter record [2] -14/-15 of the slave axis apply.

(1) see [6] -2.11

(2) s ee [6]-2.12

Additions to general handling and the operating principle

q Gantry coupling takes place precisely at the positions where the axies are located at the time of selection (see Chapter 11.12.3) of coupling. There is no need to specify an offset in the NC command because the offset is calculated internally in the position controller via the position setpoints.

q The dynamic data of the slave axis is taken into account in the contouring motion.

q For safety reasons, a coupling still active on reset or at the end of the program is implicitly restored the next time the program is started. This behaviour is parameter-definable [1]-14, [1]-39.

Programming example

:

N10 #SET AX LINK[1, [Y2 = Y1,G,0.01,0.25]] Gantry coupling of Y1 as
master axis and Y2 as slave
axis. First limit is 10µm,
second limit is 250 µm.

N20 #SET AX LINK[2, [Y2 = Y1,G]] Gantry coupling of Y1 (master) and
Y2 (slave). The monitoring limits
of the axis parameter record of the
Y2-axis are valid.

N30 #SET AX LINK [3,[Y2 = Y1]] Standard coupling of Y2 and Y1.
No gantry operation.

or alternative

N10 #AX LINK[1, [Y2 = Y1,G,0.01,0.25]]

N20 #AX LINK NBR[2, [8 = 2,G]] Gantry coupling via log. axis numbers

Parallel machining of workpieces with a symmetrical or scaled contour can also be programmed by means of an extended syntax of the #SET AX LINK command. Position differences are not monitored in these modes (mirroring or scaling).

#SET AX LINK [ <coupling_group> , [ <slave>=<master>,<numerator>, <denominator>]

{, [ <slave>=<master>,<numerator>,<denominator>] } ]

or alternative

#AX LINK [NBR] [<coupling_group>, [ <slave>=<master>,<numerator>, <denominator>]

{, [ <slave>=<master>,<numerator>,<denominator>] } ]

<coupling_group> Number of the coupling group
1 ... [Max. number of coupling groups(1) -1] , Positive integer.

<slave> Designation or logical axis number of the slave axis of the coupling pair i

<master> Designation or logical axis number of the master axis of the coupling pair i

i Max. number of coupling pairs(2)

NBR With the logic switch NBR the evaluation can be changed from logical axes names to axes numbers. Then the axes couplings (resp. coupling pairs) have to be defined with logical axis numbers. At that time of definition the axes must not exist in NC channel. Their availability in NC channel is checked only at activation of the coupling group!

<numerator>, <denominator> Integers. These serve to calculate a coupling factor between the
master and slave axes.

The following applies to the resulting coupling factor:

-1 : Mirror coupling

1 : Standard coupling; equivalent to the previous syntax

0 : Output of an error message

Factors that result in pure scaling (factor ≠ 1) or in scaling with simultaneous mirroring (factor ≠ -1) are currently not permitted. A warning is output and the coupling is handled as standard coupling. This means, only the coupling factors 1 and 1 are permissible (see examples).

(1) see [6] -2.11

(2) see [6]-2.12

Programming example

:

N10 #SET AX LINK[1, [Y2 = Y1,1,-1]] Mirroring coupling (Factor -1)

N20 #SET AX LINK[1, [Y2 = Y1,-1,1]] Mirroring coupling (Factor -1)

N30 #SET AX LINK[1, [Y2 = Y1,-2,2]] Mirroring coupling (Factor -1)

N40 #SET AX LINK[1, [Y2 = Y1,1,1]] Standard coupling

N50 #SET AX LINK[1, [Y2 = Y1,2,2]] Standard coupling

N60 #SET AX LINK[1, [Y2 = Y1,0,1]] Error, Program abortion

N70 #SET AX LINK[1, [Y2 = Y1,1,0]] Error, Program abortion

N80 #SET AX LINK[1, [Y2 = Y1,1,2]] Warning (Factor 0.5), Standard cpl.

N90 #SET AX LINK[1, [Y2 = Y1,2,3]] Warning(Factor 0.666), Standard cpl.

N100 #SET AX LINK[1, [Y2 = Y1,3,2]] Warning (Factor 1.5), Standard cpl.

N110 #SET AX LINK[1, [Y2 = Y1,-1,2]] Warning (Factor -0.5), Standard cpl.

N120 #SET AX LINK[1, [Y2 = Y1,-3,2]] Warning(Factor -1.5), Standard cpl.

or alternative

N40 #AX LINK[1, [Y2 = Y1,1,1]] Standard coupling

N50 #AX LINK NBR[1, [8 = 2,2,2]] Standard coupling via log. axis numbers


Selection/deselection of axes couplings

A coupling group can be activated by the following NC command:

#ENABLE AX LINK [ < coupling_group> ]

or

#ENABLE AX LINK (Coupling group 0, defined in the channel parameter list)

or alternative

#AX LINK ON [ < coupling_group> ]

oder

#AX LINK ON (Coupling group 0, defined in the channel parameter list)

An active coupling group can be de-activated by the following NC commands:

#DISABLE AX LINK [ < coupling_group > ]

or

#DISABLE AX LINK (Deselection of the latest activated coupling group )

or alternative

#AX LINK OFF [ < coupling_group > ]

or

#AX LINK OFF (Deselection of the latest activated coupling group )

#AX LINK OFF ALL (Deselection of all active coupling groups )

Handling and method of operation:

q No coupling group is active after startup in the initial position of the NC kernel. The axes coupling is effective when it is enabled in the NC program. Provided that it is not disabled, per default it ends at the program end (M30, M02). If active axes couplings should be effective for the next program (program global), a specific channel parameter [1]-39 has to be set.

q At the same time multiple coupling groups can be enabled.

q Unassigned coupling groups cannot be activated. A coupling group is considered assigned if at least one valid master-slave coupling pair has been defined.

q The NC command must be a single instruction in the NC block.

q The number of the coupling group may also be programmed in mathematical expressions.

q Before selection or deselection of synchronous mode the TRC must be deselected.

q Manual mode with parallel interpolation (G201) may not be active for the slave axes when synchronous mode is selected

q Positions of slave axes cannot be programmed when synchronous mode is active.

Programming example

Used axes designations: Master axis system X, Y, Z, C

Slave axis system Y_S, Z_S, C_S

(Initialization program)

%L UP_INIT_ACHS_KOPPL

(initialize axis coupling 1)

N10 #SET AX LINK[1, Y_S=Y, Z_S=Z, C_S=C]

(or #AX LINK[1, Y_S=Y, Z_S=Z, C_S=C]

N20 M17

(tool changing program)

%L UP_WZ

N30 #DISABLE AX LINK (or #AX LINK OFF)

(Approach tool changing position)

N40 G01 G90 Y1000 Z100 C0 Y_S=1000 Z_S=100 C_S=0

(Tool change; T10 contains all tool axis offsets and the tool lengths of master and slave tools; or these values are explicitly included in the calculation.)

N50 T10 D10

......................

(Further commands for physical tool change)

....................

(Approach old coupling position. The coupling position may also be defined

via parameter programming, and then be used by the subroutine.)

N80 G01 G90 X20 Y20 Z40 C50 Y_S=20 Z_S=40 C_S=50

N90 #ENABLE AX LINK[1] (or #AX LINK ON[1])

N110 M17

(Subroutine for contour machining)

%L UP1

N150 G01 G91 X10 Y10 Z-20 C90

N160 G02 X20 Y20 I10 J10

N170 LL UP_WZ

N180 G01 G91 X10 Y10 Z-20 C90

N190 G02 X20 Y20 I10 J10

N200 M17

(Main program; initial condition: Both tools have been changed in.)

(Move both axis systems to coupling position first.)

N300 G01 G91 X20 Y20 Z40 C50 Y_S=20 Z_S=40 C_S=50 F300

(Start synchronous operation)

N310 #ENABLE AX LINK[1] (or #AX LINK ON[1])

N320 LL UP1

........................................

........................................

N400 #DISABLE AX LINK (or #AX LINK OFF)

N410 M30


Inquiring Coupling State and Coupling Number via Variables

Via variables in the NC program the current coupling state and the current or last active coupling group can be accessed. The following axis-group-related variables are introduced for this purpose:

Inquiring the current or last active coupling group:

V.G.AX_LINK.NR

Inquiring the current coupling state:

V.G.AX_LINK.ACTIVE

These variables only allow read access. A write operation leads to an error message and to abortion of the decoding process.


Messages from the NC-Program

This functionality permits messages from the NC-program to be output to any system device. The functionality corresponds to the 'printf' function of the operating systems.

A message in the NC-program can be programmed, for example, to notify the operator of the current state of the process or the controller. Thus, the message display may optionally be synchronized with the current processing state. This means that the message is only displayed when the interpolator has reached the point in the NC-program.

A message text may consist of ASCII characters, parameters and variables.

A message may not be programmed together with other NC-commands in the same NC block (exception: #ADD).

The message is transmitted in ASCII format.

More:

button Programming a message

button Programming the message information

button Including the 'Symbolic Character Strings' functionality

button Writing messages into a file

button Output of additional informations at block end


Programming a message

#MSG [<mode>] [<receiver>] ["<message_text>"]

<mode> The mode defines the time of the message output. SYN or SYN_ACK mode must be specified if the message is to be output synchronously with the processing state in the interpolator. The message is output immediately after decoding if a mode has not been specified.

Mode | Time of the message output
SYN | Synchronous with processing state in interpolator
SYN_ACK | Synchronous with processing state in interpolator with acknowledgement by the receiver (e.g. PLC). The processing in interpolator is continued, if the acknowledgement is finished.
--- | Immediately after decoding (Default)

<receiver> The receiver of the message is specified by its communication device ID. Specifying the receiver is optional. If no receiver is programmed, the message is sent to the configurated default receiver [6].

Receiver-ID | Significance
ISG_DIAG_BED | Message is sent to the CNC-diagnosis interface
HMI | Message is sent to the system specific user interface
PLC | Message is sent to the system specific PLC
GCM | Message is sent to the system specific GCM ( Nur_812_HMG )

<message_text> The message text must be enclosed in quotation marks "...".

Programming example

#MSG HMI ["Text_1"]

#MSG SYN HMI ["Text_2"]

#MSG ["Text_3"]

#MSG SYN ["Text_4"]

#MSG SYN_ACK ["Text_5"]

Immediately after decoding, Text_1 is transmitted to the system specific user interface; the Text_2 string is transmitted to the same device synchronously with processing in the interpolator.

Immediately after decoding, Text_3 is transmitted to the default receiver; Text_4 string is transmitted to the same device synchronously with processing in the interpolator.

Text_5 string is also transmitted to the same device synchronously with processing in the interpolator, but the processing is stopped until the acknowledgement is received.

For the output of numerical values and for the output of strings following format elements are available:

%d oder %D | Output of decimal numbers (signed integer)
%u oder %U | Output of decimal numbers (unsigned integer)
%f oder %F | Output of real numbers (float)
%s oder %S | Output of strings (<String>, Macros, V.E.STRING)

The number of format characters must agree with the number of the subsequent parameters.

Programming examples

Programming of a message with a format element:

#MSG [ "Message text_%d and message text_2", 1 ]

Sended string: Message text_1 and message text_2

#MSG [ "Current measurement value: %f", V.A.MESS.X]

Sended string: Current measurement value: 3.4567800000E+001

#MSG [ "Current state: %s", "End of roughing"]

Sended string: Current state: End of roughing

The control sequence "%%" must be programmed to output the "%" character. The "\" character must precede a quotation mark.

Programming of a message with "%" and quotation mark:

#MSG [ "Text with %%-character"]

#MSG [ "Text in quotation marks: \"TEXT\" "]

This example outputs the following strings:

Sended string: Text with %-character and Text in quotation marks: "TEXT"

A message text may also be specified with parameters and variables.

Programming of a message with parameters and variables:

P10 = 1

V.P.BSP = 2

#MSG SYN ["Text_%D and Text_%D", P10, V.P.BSP]

This example transmits the Text_1and Text_2 string synchronously with the processing in the interpolator to the default receiver.


Programming the message information

The following command can be used for programming user-related information and display parameters for message processing. The information and the parameters are also transmitted as ASCII-characters.

#MSG INFO [<mode>] [<receiver>] ["<message_information>"]

In contrast to a message, in which the message receiver usually merely displays the ASCII string, the message information indicates that the ASCII-string contains user-related information that is encoded by the receiver itself.

SYN mode must be specified if the message information is to be sent to the receiver synchronously with the processing state in the interpolator. The message is output immediately after decoding if a mode has not been specified (see previous chapter ).

For the receiver specifications, the same requirements as for the #MSG command apply.

The message information must be enclosed in quotation marks "...". For the output of numerical values the same format elements as for the #MSG command are available (see previous chapter).

Programming example

P1 = 20

#MSG INFO ["RED,%d,BOLD ,P1]

In this example, the string RED,20,BOLD is sent as message information to the default receiver.


Including the 'Symbolic Character Strings' functionality

The availability of this function depends on the configuration and the concrete scope of version.

To enable message management across programs, messages may also be defined as a Symbolic Character String. This is particularly expedient for messages that are used repeatedly or by several programs.

Example:
Definition of a Symbolic Character String in the channel parameters list [1]:

makro_def[1].symbol Message_1

makro_def[1].nc_code #MSG ["Message text "]

This permits the following message to be output in the NC-program:

"Message_1" (The "Message text" string is transmitted to the)

(default receiver of messages)


Writing messages into a file

With the command #MSG SAVE data are saved directly out of the NC program in a file on a storage media (e.g. hard disk). The possibilities for the structuring of a message text and for the output of data are identical to the commands #MSG or #MSG INFO.

#MSG SAVE [EXCLUSIVE] ["<message_text>"]

The programming of a mode (SYN) or of a receiver ID (e.g. HMI) is not necessary and causes an error, because the message is written into the report file directly after evaluation in NC program.

The message text must be enclosed in quotation marks "...". For each call of #MSG SAVE the message text is added to the file end, if the file already exists. To create a new report file, before NC program start the user should delete an already existing file.

With #MSG SAVE ["message text "] in the report file the message text is stored in the form

< time stamp > message text

With #MSG SAVE EXCLUSIVE ["message text "] in the report file the message text is stored without time stamp in the form

message text

The name of the report file can be defined before with the command #FILENAME. If this command is not used, #MSG SAVE writes into a file with the default name message.txt.

The path for the report file can be defined in the start-up list [7]-2. If no path for the report file is entered, dependend on the control platform a default path is used respectively the report file is stored in the main directory of the control.

Programming example

:

#FILENAME [MSG="timer.txt"]

:

#TIMER START [ID=10] Start counter 10

#TIMER START SYN [ID11] Start counter 11 (IPO-level)

:

:

#TIMER READ [ID10] Save counter value in V.G.TIMER[10]

#TIMER READ SYN [ID11] Save counter value in V.G.TIMER[11]

#MSG SAVE["T10= %d",V.G.TIMER[10]] Store counter value in timer.txt

#MSG SAVE["T11= %d",V.G.TIMER[11]] Store counter value in timer.txt

#TIMER STOP [ID10] Counter 10 is stopped.

#TIMER CLEAR [ID10] Reset counter 10.

:


Output of additional informations at block end

The #ADD command can be used for programming additional information in NC block. The possibilities for the structuring of an additional information (message text) are identical to the #MSG commands. But in contrast to the #MSG commands other NC commands may be programmed before the #ADD. Therefore #ADD has to be programmed always as the last command on NC block end. Following comments are allowed.

#ADD [<receiver>] ["<additional_information>"]

The programming of a mode (SYN) is not necessary and causes an error, because the message is always to be output synchronously with the processing state in the interpolator.

For the receiver specifications, the same requirements as for the #MSG commands apply.

The additional information must be enclosed in quotation marks "...".

Programming example

%add_block_info

N05 P1=20

N10 G00 X0 Y0 Z0

N15 T1 #ADD["Tool T=%d active", V.G.T_AKT]

N20 G01 F2000 X10 #ADD["Move to X-position"] (Comment)

N30 YP1 #ADD["Y-position=%d", P1]

N40 Z30 #ADD["Z-position"]

N50 Z33 #ADD["Z-position"] X11 Y22 ->Error 21509

N999 M30


Jerk limiting slope

The slope function determines the velocity on the programmed path while observing the specified permissible velocities, accelerations and jerks [2]-8. The following modes are available :

q step-shaped acceleration profile with restriction of acceleration without monitoring the jerk,

q trapezoidal acceleration profile with jerk-monitoring,

q square-sinusoidal acceleration profile with jerk monitoring.

The acceleration curve is generated according to the selection of slope function:

Fig. 11.5: Acceleration on the programmed path

Acceleration profile is specified axis-specifically by accelerations and ramping times [2]-8:

Fig. 11.6: Parameters of the acceleration profile.

More:

button Selection of the operating mode


Selection of the operating mode

#SET SLOPE PROFIL [ [<Profil> [,<t_id>,<a_id>] ] ] (modal)

<profile> Type of acceleration profile:

Profile | Significance
0 | Step-shaped acceleration profile (default)
1 | Trapezoidal acceleration profile
2 | Square-sinusoidal acceleration profile
3 | HSC slope, is recommended for "Extended HSC programming"

The programming of #SET SLOPE PROFIL without any declarations restores the basic state (like after start-up), this means as default the slope type of the channel parameters[1]-26 is used.

* The use of this feature for the selection of profile type 3 (HSC slope) requires the licence for the extension package "HSC". This feature is not included in the scope of the standard licence.

<t_id> Determines, on which ramp times the weighting of ramping times (G132/ G133) is effecting. The weighting is included in the calculation only in respect of trapezoidal or square-sinusoidal acceleration profiles.

ID | Significance
0 | Weighting of ramping time effects on all ramping times (default).
1 | Weighting of ramping time effects on TR,accel,incr
2 | Weighting of ramping time effects on TR,accel,decr
3 | Weighting of ramping time effects on TR,braking,incr
4 | Weighting of ramping time effects on TR,braking,decr

<a_id> Determines, on which accelerations the weighting of acceleration (G130/ G131) is effecting.

ID | Significance
0 | Weighting of acceleration effects on all accelerations (default).
1 | Weighting of acceleration effects on aaccel
2 | Weighting of acceleration effects on abraking

For step-shaped acceleration profile aaccel = abraking is valid. The weighting of acceleration generally includes both the parameters.

Programming example 1

N10 G01 X50 Y10 Z0 F1000 (step-shaped acceleration profile)

N20 #SET SLOPE PROFIL[1] (trapezoidal acceleration profile)

N30 X10 Y30

N40 #SET SLOPE PROFIL[2] (sinusoidal acceleration profile)

N50 X15

N60 Y50

N70 M30

On the programmed path, the following velocity progress is obtained :

Fig. 11.7: Velocity depending on the programmed path.

The individual ramping times and accelerations of the acceleration profile can be weighted differently at the same time. To reach this, the programming of each weighting must be done in a single step.

In the following example the segments of the trapezoidal acceleration profile of single axes (X, Y) are defined with different weightings.

Then, for all axes (in this example X, Y, Z, A) a specific ramping time and a specific acceleration is defined.

Programming example 2

:

N10 #SET SLOPE PROFIL[1,1,0] (Weighting effects on TR,accel,incr)

N15 G132 X75 Y65 (Weighting of ramping time TR,accel,incr of)
(X-axis on 75%, Y-axis on 65%)

N20 #SET SLOPE PROFIL[1,2,0] (Weighting effects on TR,accel,decr)

N25 G132 X50 Y100 (Weighting of ramping time TR,accel,decr of)
(X-axis on 50%,resetting of Y-axis on 100%)
(to overwrite the modal value of N15 (65%) )

N30 #SET SLOPE PROFIL[1,3,0] (Weighting effects on TR,braking,incr)

N35 G132 X25 (Weighting of ramping time TR,braking,incr of)
(X- axis on 25%)

N40 #SET SLOPE PROFIL[1,1,1] (Weighting effects on aaccel)

N45 G130 X75 (Weighting of acceleration aaccel of)
(X- axis on 75%)

N50 #SET SLOPE PROFIL[1,4,0] (Weighting effects on TR,braking,decr)

N55 G133 80 (Weighting of ramping time TR,braking,decr of all)
 (axes on 80%)

N60 #SET SLOPE PROFIL[1,1,2] (Weighting effects on abraking)

N65 G131 66 (Weighting of acceleration abraking of all)
(axes on 66%)

:

N.. G01 X.. Y.. F..

:

N.. #SET SLOPE PROFIL[1,0,0] (trapezoidal acceleration profile)

N.. G133 100 G131 100 (Resetting of weighting of ramping time-/)
(and acceleration for all axes on 100%)
:

N.. G01 X.. Y.. F..

:

N999 M30

Weighting of the acceleration profile segments for the axes X, Y, Z, A up to block N65:

Profile Axis | TR,accel,incr | TR,accel,decr | TR,braking,incr | TR,braking,decr | aaccel | abraking
X | 75% | 50% | 25% | 80% | 75% | 66%
Y | 65% | 100% | 100% | 80% | 100% | 66%
Z | 100% | 100% | 100% | 80% | 100% | 66%
A | 100% | 100% | 100% | 80% | 100% | 66%


Akima- spline interpolation

The use of this feature requires the licence for the extension package "Spline". It is not included in the scope of the standard licence.

When spline interpolation is selected, then Akima splines are laid through the programmed vertices.

More:

button Selection of spline type

button Selection of spline interpolation

button Deselection of spline interpolation

button Programming of vertices

button Specification of the type of transition

button Definition of start tangent

button Definition of target tangent


Selection of spline type

#SET SPLINETYPE AKIMA (modal)

This spline type is default, if it exists. Nevertheless it is recommended to specify the spline type explicitly.

Immediately following the selection of the spline type no tangential transition from the preceding movement block into the spline curve is possible.


Selection of spline interpolation

#SET SPLINE ON (modal)

For compatibility reasons it is also possible to do a selection with the G151 command.

Spline interpolation is selected in the mode last selected. The spline curve begins at the target position last programmed. This position is the first vertice of the spline curve.

The command may be programmed in the same statement as the second vertice or in the preceding statement.


Deselection of spline interpolation

#SET SPLINE OFF (modal)

For compatibility reasons it is also possible to do a deselection with the G150 command.

If the command is programmed in one statement together with a position, then the respective point is not part of the spline curve.

Deselection is allowed only if at least 3 vertices have been programmed. If all tangents have been specified (tangential transition at both ends of the curve or explicit programming of all tangents), deselection is allowed after 2 programmed vertices.


Programming of vertices

Programming of vertices is done with linear blocks (G00, G01), whose target points are used as vertices.


Specification of the type of transition

#SET ASPLINE MODE [ <start_transition>, <target_transition> ] (modal)

<start_transition> ,

<target_transition> Type of tangential transition between the spline curve and the adjacent (linear- or circular) movement blocks.

Type of transition | Significance
1 | Tangent of the spline curve at the transition is automatically calculated
2 | Tangential transition to the preceding or succeeding linear or circular block
3 | Tangent of the spline curve at the transition is explicitly specified

The specification of the of transition type is optional. In case of a missing specification, transition type 1 is used as default.

Textfeld: #SET SPLINE OFF or G150 Textfeld: #SET SPLINE ON or G151 #SET ASPLINE MODE [Start, Ziel]

Fig. 11.8: Exampel for the combination of transition types 1 and 2

If explicit tangent specification is chosen for a certain transition (transition type 3) and if for a certain axis no tangent is programmed, then this tangent is automatically determined (transition type 1).


Definition of start tangent

#SET ASPLINE STARTTANG {<axis_name><expr>} (modal)

<axis_name> <expr> Components of the tangent vector

Using axis designations, a vector is specified whose direction corresponds to the direction of the tangent - the vector thus need not be normalized, however, always all the components must be specified.

For tracking axes the derivation regarding the curve parameter is specified, which corresponds to the ratio of movement of the tracking axis to the movement of the main axes.


Definition of target tangent

#SET ASPLINE ZIELTANG {<axis_name><expr>} (modal)

<axis_name> <expr> Components of the tangent vector

Definition of target tangent; analogous to the definition of the start tangent.

Programming example

N10 G01 X20 Y0 F1000 (Becomes the first support point of the )

(spline curve, due to the following G151)

N20 #SET ASPLINE MODE[3,1] (Transition type with explicit )

(specifiction of start tangent and )

(automatic determination of the target)

N30 #SET ASPLINE STARTTANG X1 Y1 Z0 (Pre-setting of start tangent)

N40 G151 (Selection of spline-interpolation)

N50 G01 X40 Y20

N60 X60

N70 Y0

N80 X80

N90 Y10 (becomes the last support point of the)

(spline curve due to the following G150)

(Support point of the spline-curve)

N100 G150 (Deselection of spline-interpolation)

N110 X70

N120 M30

The following NC program provides the same result, however, uses for selection and deselection of the spline interpolation the second variation.

N10 G01 X20 Y0 F1000

N20 #SET ASPLINE MODE[3,1] (Transition type with explicit)

(pre-setting of start tangent und autom.)

(determination of target tangent)

N30 #SET ASPLINE STARTTANG X1 Y1 Z0 (Pre-setting of start tangent)

N40 G151 G01 X40 Y20 (Selection of spline interpolation)

N50 X60

N60 Y0

N70 X80

N80 Y10

N90 G150 X70 (Deselection of spline-interpolation)

N100 M30

Caution: Block No. 80 contains the end point of the spline !

The program generates the following contour:

Fig. 11.9: Contour resulting of the program-example (numbering relates to the first program example

It is clearly evident that the curve section corresponding to block N50 has the programmed slope of 1 at its beginning (which corresponds to the beginning of the spline curve). The slope at the end of the spline curve (end of block N90) is calculated automatically.

If circular blocks (G02 or G03) are inserted, then the spline curve is broken off before the circular block and with the arrival of the next linear block, a new spline curve is automatically begun. The transitions into and from the circular block occur tangentially.

The spline-curve is also interrupted if a linear block is programmed with stationary main axes and moving tracking axes. The deselection of spline interpolation takes place with automatic tangent determination at the curve end. The tracking axes are interpolated linearly till a linear block with moving main axes is programmed. In this case the spline interpolation is automatically re-selected. The transition into spline curve occurs tangentially for both the main and the tracking axes.

Between the linear blocks which serve as vertices, other functions (e.g. M-functions) also may be programmed. The count of these functions which were programmed between totally 5 consecutive vertices, is, however, restricted depending on the configuration.


B- spline interpolation

The use of this feature requires the licence for the extension package "Spline". It is not included in the scope of the standard licence.

When spline interpolation is selected, then B-Splines are generated for the programmed control points.

More:

button Selection of spline type

button Selection of spline interpolation

button Deselection of spline interpolation

button Programming of control points


Selection of spline type

TwinCAT CNC: Overview

Selection of spline typ e

#SET SPLINETYPE BSPLINE (modal)

If only the B spline type exists, this type is selected automatically. Nevertheless it is recommended to always select the spline type explicitly.


Selection of spline interpolation

#SET SPLINE ON (modal)

For compatibility reasons it is also possible to do a selection with the G150 command.

The curve begins at the target position last programmed.


Deselection of spline interpolation

#SET SPLINE OFF (modal)

For compatibility reasons it is also possible to do a deselection with the G150 command.

If the command is programmed in one statement together with a position, then the respective point is not part of the spline curve.

Deselection is allowed only if at least 4 vertices have been programmed.


Programming of control points

Programming of control points is done with linear blocks (G00, G01), whose target points are used as control points.

It must be ensured that the curve runs through the control points only at the start and end.

Programming example

N10 #SET SPLINETYPE BSPLINE

N20 G01 X0 Y50 Z0 F10000

N30 #SET SPLINE ON

N40 X3 Y25

N50 X15 Y15

N60 X23 Y12

N70 X25 Y25

N80 X30 Y35

N90 X50 Y37.5

N100 X55 Y32.5

N110 X58 Y12

N120 X70 Y12

N130 X77.5 Y10

N140 X90 Y35

N150 X100 Y37.5

N160 #SET SPLINE OFF

N170 M30

The following figure shows the contour resulting from the Programming example:

Fig. 11.10: Contour resulting from programming example

The figure shows the smoothing property of a B spline curve, especially for blocks N120/N130. Moreover it shows that the curve will not pass through the control points. However, the polygon resulting from connecting the control points will give an idea of the actual shape of the curve.

In case of a B spline curve it is not possible to directly specify the tangents at the curve ends. However, because the tangents of the curve is the same as the tangent of the corresponding moving blocks at the curve end, tangents may be given by programming the moving blocks at the curve end appropriately.


Free form surface operation

Typical free form surface programs are created using CAD systems or through digitilization of a specimen workpiece. They usually consist of a large number blocks, each with a block length between 0.01 and several mm. Ideally, the programmed contour is moved along at a high feed rate and without velocity variations. The contour error is very small, even at longer cycle times. With respect to a high surface quality, contour errors may be tolerated under certain circumstances if they result in smoother path curves. The requirement profile that results from those conditions can be summarized as follows:

Boundary condition | Requirements to the control
Contour description via a large number of short blocks | High throughput, high machining velocity of the individual NC blocks.
High feed rate without velocity variations. | Adjusting the path velocity to the data supply; swift provision of the blocks in the interpolator.
Minimum contour error | Interpolation as exactly as possible on the programmed contour.
High surface quality | Using splines for smoothing the vertex sequence, observing the resulting contour error.

In free form surface programs, the short block lengths usually result in a large data quantity that must be processed. With an increased cycle time, the distance between the interpolation vertices is so large that several blocks will be skipped. Removing redundant blocks, at least partly, seems therefore to be logical. This is the task of data reduction. The saved computing time leads to a better data throughput and, in certain cases, to shorter processing times.

More:

button Standard HSC programming

button Extended HSC programming

button Filter programming


Standard HSC programming

#HSC [ON | OFF] [ [OPMODE<expr>] [CONTERROR<expr>] ] (modal)

ON Enable free form mode

OFF Disable free form mode

OPMODE <expr> Set operation mode:

Valid values | Significance
1 | Insertion of transfer polynomials
2 | Generation of interpolating spline curves

CONTERROR <expr> Specification of maximum allowed contour error:

Valid values | Significance
>=0.0 | Maximum contour error " ε " Is only valid in combination with active OPMODE 1. If the parameter is set in OPMODE 2, it only is effective after changing into OPMODE 1!

If the #HSC ON command is programmed without parameters, following default values are valid:

OPMODE | 1
CONTERROR | 0.1 mm

q The parameters may be changed separately. This means, it is possible to select free form operation mode ("OPMODE"), enable free form mode ("ON"), but change the maximum contour error ("CONTERROR") later.

q Free form operation mode cannot be changed while free form mode is enabled. Trying to do this will cause an error message to be output.

More:

button Available operation modes

button Additional parameters


Available operation modes

OPMODE 1: Insertion of transfer polynomials

In free form operation mode 1 at movement block transitions the blocks are shortened and transfer polynomial are inserted.

From the maximum contour error CONTERROR ("ε") the corner distance "a" is calculated. This value is necessary for the generation of the polynomial transition. That means, the inserted polynomial reduce the actual contour error.

OPMODE 2: Generation of spline curves for free form parts

In free form operation mode 2 spline curves are generated through the given edge points. At the beginning of prismatic parts the spline generation is automatically deselected and a tangential transition is carried out.

At block transitions in prismatic parts, which were detected based on the additional parameters of chapter 11.17.1.2, it is changed automatically into operation mode 1 (OPMODE 1), this means transfer polynomials are inserted. For the inserted spline curves no contour deviation between the vertices is monitored.

Programming example 1

...

#HSC[OPMODE 1 CONTERROR 0.01] (Free form operation mode 1)

(Max. contour error <= 0,01 mm)

...

#HSC ON (Enable free form mode)

...

#HSC OFF (Disable free form mode)

...

#HSC ON (Enable free form mode)
(Previously selected parameter are active)

(Free form operation mode 1)
(Max. contour error <= 0,01 mm)

...

#HSC OFF (Disable free form mode)

...

#HSC ON [OPMODE 2 CONTERROR 0.002] (Enable free form mode with)
(operation mode 2)

(Maximum contour error <= 0,002 mm)

...

#HSC[CONTERROR 0.005] (Change maximum contour error to <= 0,005 mm)

...

#HSC OFF (Disable free form mode)

Programming example 2

...

#HSC[OPMODE 1 CONTERROR 0.01] (Select free form operation mode 1)

(Maximum contour error <= 0,01 mm)

#HSC ON (Enable free form mode)

...

#HSC[OPMODE 2] (Error message!)

(Changing of operation mode is)
(not allowed while free form mode)
(is active.)


Additional parameters

Normally only the previously described parameters should be necessary. But to get access to internally used settings for free form mode 2, the following additional parameters are available:

#HSC [ [COS_PHI_MIN<expr>] [FACT_BLOCK_LEN<expr>] ]

HSC-Parameter | Type | Valid range (Default) | Description
COS_PHI_MIN | Real | -1.0...1.0 (0.7) | Minimum value for cos( ϕ ). Smaller values lead to de-selection of spline curve generation.
FACT_BLOCK_LEN | Real | > 0.0 (3.0) | Maximum factor the block length can exceed the median block length *. Larger values lead to de-selection of spline curve generation. * The median block length results from the block lengths of the previous 5 movement blocks.


Extended HSC programming

The use of this feature requires the licence for the extension package "HSC". It is not included in the scope of the standard licence.

For the programmed control points with the extended HSC programming B splines are created. For this kind of HSC operation it is recommended, to select first by the command #SET SLOPE PROFIL the profile type 3 (HSC slope).

For the HSC selection/deselection and for the parameterization of B spline programming the following NC command is available:

        #HSC
[ON | OFF]  [ [BSPLINE
[PATH_DEV<expr>]
[TRACK_DEV<expr>]
[MERGE<expr>]

[ AUTO_OFF_PATH <expr> ] [ AUTO_OFF _TRACK <expr> ]

[ AUTO_OFF_G00 <expr> ]

[MAX_PATH_LENGTH<expr>] [MAX_ANGLE<expr>]] ] (modal)

ON Enable free form mode

OFF Dis able free form mode

BSPLINE Identification for HSC operation with B spline. Must always be the first programmed keyword.

PATH_DEV<expr> Maximum deviation of B spline from programmed path contour in mm. If this deviation is exceeded, the B spline is deselected automatically. If the maximum deviation is defined as zero, no monitoring of the path deviation is executed.

Default value: 1 mm

TRACK_DEV<expr> Maximum deviation of tracking axes in mm or degrees. If the maximum deviation is defined as zero, no monitoring of the dragged axes is executed.

Default value: 10 mm or degree

MERGE<expr> Merging of blocks. The maximum deviation is determined according to the values from PATH_DEV and TRACK_DEV.

0: No merging of blocks (Default)

1: Merging of blocks

AUTO_OFF_PATH<expr> Automatic block separation when exceeding the programmed B spline deviation of the main axes. (PATH_DEV).

0: No deselection when deviation is to large (Default), block is separated

1: Deselection when deviation is to large

AUTO_OFF_TRACK<expr> Automatic block separation when exceeding the programmed B spline deviation of the dragged axes. (TRACK_DEV).

0: No deselection when deviation is to large (Default), block is separated

1: Deselection when deviation is to large

More optional switches:

AUTO_OFF_G00<expr> Automatic deselection of B spline interpolation for G00 blocks

0: No implicit deselection due to a rapid movement block (Default)

1: Implicit deselection due to a rapid movement block

MAX_PATH_LENGTH<expr> Maximum path length of relevant blocks in mm. If blocks are longer than the given length, the B spline is deselected automatically.

Default value: 0 mm (implicit deselection because of the block length does not take place)

MAX_ANGLE<expr> Maximum contour angle for transitions between two linear blocks in degrees, up to it a B spline is inserted. If the angle between this two linear blocks exceeds this limit, the B spline is deselected internally. Default value: 0° (no implicit deselection because of the contour angle)

The programming of the control points is done with linear blocks (G00 and G01). Their target points are used for control points. It has taken into account, that the curve is going straight through the control points only in the beginning and at the end.

The parameters may be changed in several steps. This means, for example it is possible to define in a first step the maximum contour deviation ("PATH_DEV ") and in a second command the maximum path length ("MAX_PATH_LENGTH ") and the selection of B spline interpolation ("ON").

The parameterization cannot be changed while B spline interpolation is active.

Programming examples

The spline curve is based on the control positions N40  N155, but the spline curve only is going straight through at N20 and N50.

N20 G00 X0 Y0 Z0 F10000

N30 #HSC ON [BSPLINE PATH_DEV=0.2 MERGE=1..] Parametrization + Selection

N40 X3 Y25

N50 15 Y15

N60 23 Y12

N70 X25 Y25

N80 X30 Y35

N90 X50 Y37.5

N100 X55 Y32.5

N110 X58 Y12

N120 X70 Y12

N130 X77.5 Y10

N140 X90 Y35

N150 X100 Y37.5

N160 #HSC OFF Deselection

N170 M30

... or also

N20 G00 X0 Y0 Z0 F10000

N25 #HSC [BSPLINE PATH_DEV=0.2 MERGE=1..] Parametrization

N30 #HSC ON Selection

N40 X3 Y25

N50 15 Y15

N60 23 Y12

N70 X25 Y25

N80 X30 Y35

N90 X50 Y37.5

N100 X55 Y32.5

N110 X58 Y12

N120 X70 Y12

N130 X77.5 Y10

N140 X90 Y35

N150 X100 Y37.5

N160 #HSC OFF Deselection

N170 M30


Filter programming

For reaching a high surface finish during free form surface processing, any excitation of machine oscillations have to be avoided as far as possible. With HSC filters the user has the possibility, to smooth the commanded axis values for the drives and so to minimize the excitations for the machine. As a result, deviations from the programmed contour can occur, but these can be limited by the user. Contrary to conventional low pass filters HSC filters do not distort the contour, this means parallel paths in diametrical directions remain parallel.

A requirement for the use of this functionality is the complete and correct configuration of the axis specific filter parameters [2] -26.

Example for the settings in the axes lists:

filter[0].order 0

filter[0].prototype 5 #Typ HSC-Filter

filter[0].type 1

filter[0].fg_f0 20

filter[0].guete 100

filter[0].share_percent 100

For the selection and for the parametrisation of the filter programming the following NC command is available:

#FILTER [ON | OFF] [HSC] (modal)

HSC Keyword for the selection of HSC filter.

Programming example

N1111 #FILTER ON [HSC]

N10 X0 Y0

N20 X0 Y1

N30 X1 Y1

N50 X1 Y0

N40 X0 Y0

N4001 #FILTER OFF

Sollwert = Command value


Writing and reading SERCOS parameters and commands

More:

button SERCOS parameters

button SERCOS commands


SERCOS parameters

TwinCAT CNC: Overview

SERCOS parameter s

The following NC-commands are used to write and read SERCOS parameters. The original SERCOS-format [4] is used in order to simplify programming.

Further information, such as axis name or logical axis number, codes and an attribute, are required for correct processing of the parameter IDENT-number in the drive. This information is programmed together with the IDENT-number in the same NC-command.

Non-synchronous means the execution of the command during decoding.

Synchronous means the execution of the command synchronized to the processing on interpolation level.

More:

button Non-synchronized writing

button Non-synchronized reading

button Synchronized writing


Non-synchronized writing

#IDENT WR [ AX <axis_ name> | AXNR <expr> ID <i dent_nr> VAL <expr> TYP <expr>

DEC <expr> <drive_type>]

AX <axis_name> Name of the SERCOS axis

AXNR<expr> Logical axis number of the SERCOS axis, positive integer

ID <ident_nr> Identification number in SERCOS format, e.g. S-0-0047 or P-0-0129

VAL<expr> Value to be written; Real number

TYP<expr> Data type of the value (2 or 4 byte length):

Valid values | Significance
2 | 2 bytes data length
4 | 4 bytes data length

DEC<expr> Number of places after the decimal point; positive integer

<drive_type> Drive type

Valid IDs | Significance
SERC | Sercos drive (currently only drive permitted)

Programming example

:

#IDENT WR [AX X ID S-0-0104 VAL 655.35 TYP 4 DEC 2 SERC]

#IDENT WR [AXNR 1 ID S-0-0104 VAL 655.35 TYP 4 DEC 2 SERC]

:

No plausibility check as regards the logical axis number, the identification number and the programmed attributes data type and places after decimal point is conducted. The operator is solely responsible for making the correct entries.


Non-synchronized reading

#IDENT RD [ AX <axis_ name> | AXNR <expr> ID <i dent_nr> P = <v ariable> TYP <expr>

DEC <expr> <drive_type>]

AX<axis_name> Name of the SERCOS axis

AXNR<expr> Logical axis number of the SERCOS axis, positive integer

ID<ident_nr> Identification number in SERCOS format, e.g. S-0-0047 or P-0-0129

<variable> Variable to which the value to read is to be saved.
e.g. P-parameter or V.P. , V.L. or V.S. variables.

TYP<expr> Data type of the value (2 or 4 byte length):

Valid values | Significance
2 | 2 bytes data length
4 | 4 bytes data length

DEC<expr> Number of places after the decimal point; positive integer

<drive_type> Drive type

Valid IDs | Significance
SERC | Sercos drive (currently only drive permitted)

Programming example

:

#IDENT RD [AX X ID S-0-0104 P=P1 TYP 4 DEC 2 SERC] or

#IDENT RD [AXNR 1 ID S-0-0104 P=V.P.KV_WERT TYP 4 DEC 2 SERC]

:

No plausibility check as regards the logical axis number, the identification number and the programmed attributes data type and places after decimal point is conducted. The operator is solely responsible for making the correct entries.


Synchronized writing

#IDENT WR SYN [ AX <axis_ name> | AXNR <expr> ID < ident_nr> VAL <expr> TYP <expr>

DEC <expr> <drive_type> [ NO_WAIT ] ]

AX<axis_name> Name of the Sercos axis

AXNR<expr> Logical axis number of the SERCOS axis, positive integer

ID<ident_nr> Identification number in SERCOS format, e.g. S-0-0047 or P-0-0129

VAL<expr> Value to be written; Real number

TYP<expr> Data type of the value (2 or 4 byte length):

Valid values | Significance
2 | 2 bytes data length
4 | 4 bytes data length

DEC<expr> Number of places after the decimal point; positive integer

<drive_type> Drive type

Valid IDs | Significance
SERC | Sercos drive (currently only drive permitted)

NO_WAIT No waiting for successful writing of the parameter.

Without programming this key word the interpolation always waits for the successful parameter writing.

Programming example

:

#IDENT WR SYN [AX=X ID S-0-0104 VAL 655.35 TYP 4 DEC 2 SERC]

#IDENT WR SYN [AXNR=1 ID S-0-0104 VAL 655.35 TYP 4 DEC 2 SERC]

:

#IDENT WR SYN [AX Y ID S-0-0104 VAL655.35 TYP 4 DEC 2 SERC NO_WAIT]

:

No plausibility check as regards the logical axis number, the identification number and the programmed attributes data type and places after decimal point is conducted. The operator is solely responsible for making the correct entries.


SERCOS commands

The following NC-commands serves to start SERCOS commands. The original SERCOS format [4] is used to facilitate programming.

Further information, such as axis name or logical axis number and code, is required for correct processing of the command IDENT-number in the drive. This information is programmed together with the IDENT-number in the same NC-command.

Non-synchronous means the execution of the command during decoding.

Synchronous means the execution of the command synchronized to the processing on interpolation level.

More:

button Non-synchronized writing

button Synchronized writing

button Non-synchronized waiting

button Synchronized waiting


Non-synchronized writing

#COMMAND WR [ AX<axis_name> | AXNR<expr> ID<ident_nr> <drive_type> ]

AX <axis_name> Name of the SERCOS axis

AXNR<expr> Logical axis number of the SERCOS axis, positive integer

ID <ident_nr> Identification number of the command in SERCOS format,
e.g. S-0-0148 (drive-controlled referencing)
or S-0-0170 (tracing cycle)

<drive_type> Drive type

Valid IDs | Significance
SERC | Sercos drive (currently only drive permitted)

Programming example

:

#COMMAND WR [AX=X ID S-0-0148 SERC]

#COMMAND WR [AXNR 1, ID S-0-0148, SERC]

:


Synchronized writing

#COMMAND WR SYN [ AX<axis_name> | AXNR<expr> ID<ident_nr> <drive_type> ]

AX <axis_name> Name of the SERCOS axis

AXNR<expr> Logical axis number of the SERCOS axis, positive integer

ID <ident_nr> Identification number of the command in SERCOS format,
e.g. S-0-0148 (drive-controlled referencing)
or S-0-0170 (tracing cycle)

<drive_type> Drive type

Valid IDs | Significance
SERC | Sercos drive (currently only drive permitted)

Programming example

:

#COMMAND WR SYN [AX Y, ID S-0-0170, SERC]

#COMMAND WR SYN [AXNR 2 ID S-0-0170 SERC]

:

No plausibility check as regards the logical axis number and identification number is conducted. The operator is solely responsible for making the correct entries.


Non-synchronized waiting

#COMMAND WAIT [AX <axis_ name> | AXNR <expr> ID<ident_nr> <drive_type> ]

AX <axis_name> Name of the SERCOS axis

Additional ID | Significance
ALL | Check all SERCOS axes of the system

AXNR<expr> Logical axis number of the SERCOS axis, positive integer

ID <ident_nr> Identification number of the command in SERCOS format,
e.g. S-0-0148 (drive-controlled referencing)
or S-0-0170 (tracing cycle)

If no identification number is programmed, the waiting is valid for all
open commands.

<drive_type> Drive type

Valid IDs | Significance
SERC | Sercos drive (currently only drive permitted)

Programming example

...

#COMMAND WAIT [AX X, ID S-0-0148, SERC]

:

#COMMAND WAIT [AX ALL ID S-0-0148 SERC]

...

No plausibility check as regards the logical axis number and identification number is conducted. The operator is solely responsible for making the correct entries.


Synchronized waiting

#COMMAND WAIT SYN [AX <axis_ name> | AXNR <expr> ID<ident_nr> <drive_type> ]

AX <axis_name> Name of the SERCOS axis

Additional ID | Significance
ALL | Check all SERCOS axes of the system

AXNR<expr> Logical axis number of the SERCOS axis, positive integer

ID <ident_nr> Identification number of the command in SERCOS format,
e.g. S-0-0148 (drive-controlled referencing)
or S-0-0170 (tracing cycle)

If no identification number is programmed, the waiting is valid for all
open commands.

<drive_type> Drive type

Valid IDs | Significance
SERC | Sercos drive (currently only drive permitted)

Programming example

...

#COMMAND WAIT SYN [AX=X, ID=S-0-0148, SERC]

:

#COMMAND WAIT SYN [AX ALL, ID S-0-0148, SERC]

...

No plausibility check as regards the logical axis number and identification number is conducted. The operator is solely responsible for making the correct entries.

To wait for SERCOS commands the movement is not stopped absolutely. But if a SERCOS command is not finished at the end of the movement block, no new NC-block is processed and the movement is therefore stopped.

Programming example

Wait at the end of block N120 until command S-0-0148 is finished.

..

N100 #COMMAND WR SYN [AX Y ID S-0-0148 SERC]

N110 G01 X1000 F100

N120 #COMMAND WAIT SYN [AX Y ID S-0-0148 SERC]

N130 G01 X2000

...

A (WAIT)-command can only check commands, which are instructed from the same level of processing (Decoding context or synchronous to the processing on interpolation level). For example a synchronized command (SYN) can only be checked on interpolation level.

Programming example

Although the command S-0-0148 still could be active, no wait at block N110 is initiated, because on decoding level no active command S-0-0148 is detected. The real state of the command on interpolation level just can be detected at block N120.

...

N100 #COMMANDWR SYN [AX Y ID S-0-0148 SERC]

N110 #COMMAND WAIT [AX Y ID S-0-0148 SERC]

N120 #COMMANDWAIT SYN [AX Y ID S-0-0148 SERC]

...


Channel synchronization

When operating a multi-channel control (particularly in the case of n > 2), situations may occur in which it is essential that specific run sequences be complied with between channels.

Fig. 11.11: Example application, double-column machine with tool changer

The example in Fig. 11.11 shows such an application in which two machining units (A and B) share a common machining space. Likewise, both machines use the tool changer resource (C). In order to avoid collisions with such a machine configuration, the NC-programs of the various channels of the control system must be synchronized with each other at specific points. In the above case for example, unit A may not enter the collision space for as long as unit B is still in it. Likewise, unit B may not use the tool changer if unit A is currently accessing it.

The time sequence on the two channels of the control system, shown in Fig. 11.12, results for instance for access to the tool changer resource.

Fig. 11.12: Sequence for shared access to a resource

The required synchronization is based on sending and waiting for signals and is performed via the NC-commands described below in the NC programs.

More:

button Sending signals

button Clearing broadcast signals

button Waiting for signals

button RESET handling

button Synchronization scenarios


Sending signals

Basically, a distinction is made between broadcast signals with no specification of the receiver and non-broadcast signals in which a channel is specified explicitly as the receiver. The signals are identified by a unique number, whereby it is permitted to send signals with identical signal numbers.

In the case of non-broadcast signals, one or more NC-channels are specified as the receiver explicitly. If several receivers are specified for one signal, this acts in the same way as multiple transmission of the same signals to the individual channels.

Example:

#SIGNAL [ID4711 CH1 CH2 CH3]

acts in the same way as

#SIGNAL [ID4711 CH1]

#SIGNAL [ID4711 CH2]

#SIGNAL [ID4711 CH3]

These signals are valid only for a WAIT of the addressed receiver and are used up if the consumption counter (COUNT) is not specified for a WAIT of the receiver channel. If a consumption counter is specified, the period of validity can be prolonged accordingly.

Unlike this situation, broadcast signals can be received by a WAIT of any channel. If no consumption counter (COUNT) is specified in the case of broadcast signals, these are not used up by a WAIT, i.e. they persist until they are explicitly cleared (see #SIGNAL REMOVE). If a consumption counter is specified, just as many WAIT requests are possible until the signal is used up as is the case with non-broadcast signals.

#SIGNAL [<mode>] [ID<sgn_nr> [COUNT<expr>] { P[<idx>]=<param>} {CH<chan_nr>} ] (non-

modal)

<mode> Synchronization mode

Valid modes | Significance
--- | Synchronization on decoder level (basic setting). This synchronization is required for instance if it is necessary to synchronize with parameters or variables.
SYN | Synchronization on interpolator level. This synchronization is required in the case of real-time requests, e.g. synchronization of two machining units of a multi-column machine

ID<sgn_nr>Signal number; must be unique system-wide. Positive integer.

COUNT<expr> Consumption counter; defines how frequently a signal can be retrieved with #WAIT. Positive integer

P[<idx>] = <param> Signal parameter. The parameters are entered in the parameter array of the signal in accordance with the specified index.

Index | Significance
<idx> | Range for maximum possible number of parameters: 0.... max. number of signal parameters(1)

CH<chan_nr> Channel number; positive integer

Valid values | Significance
1...Max. number of channels(2) | Number of the channel for which the signal is destined.
--- | If no channel number is specified, a (broadcast) signal is sent to all available signal receivers of the system.

(1) see [6]-6.45

(2) see [6]-2.4

Programming example

(Signal 812, Synchronization on DEC-level, Broadcast)

N500 #SIGNAL [ID812]

(Signal 4711, Synchronization on DEC-level, to channnel 2)

N100 #SIGNAL [ ID4711 CH2 ]

(Signal 4711, Synchronization on DEC-level,
for 10 #WAIT-queries, Broadcast)

N100 #SIGNAL [ ID4711 COUNT10 ]

(Signal 815, Synchronization on IPO-Ebene,
twice to channel 2 and once to 3)

N200 #SIGNAL SYN [ ID815 CH2 CH2 CH3 ]

(Signal 911, Synchronization on DEC-level, to channel 3)

(1. signal parameter V.A.MESS.X, 2. signal parameter P200,
3. signal parameter 944)

N260 P200 = 924

N300 #SIGNAL [ IDP100 CH3 P[0]=V.A.MESS.X P[1]=P200 P[2]=944 ]


Clearing broadcast signals

Signals are generally cleared after consumption by an assigned WAIT. In addition, normal signals, i.e. non-broadcast signals, are cleared implicitly in the case of an NC-Reset (see also Chapter Reset handling). Since broadcast signals are not cleared by a WAIT unless the consumption counter is specified, they must be removed explicitly. An additional NC-command exists for this purpose. This NC-command can also be used to clear normal signals whereby, in this case, the identification number and the addressed channel must correspond.

If a single signal is specified for clearing, only one signal is removed if more than one identical signals are present. On the other hand, all signals are removed if a signal range is specified [ID; IDMAX], i.e. including several identical signal numbers within this range if they exist.

#SIGNAL REMOVE [<mode>] [ID<sgn_nr> |IDMIN<sgn_nr> [IDMAX<sgn_nr>]

{CH<chan_nr>} ] (non-modal)

<mode> Synchronization mode

Valid modes | Significance
--- | Synchronization on decoder level (basic setting). This synchronization is required for instance if it is necessary to synchronize with parameters or variables.
SYN | Synchronization on interpolator level. This synchronization is required in the case of real-time requests, e.g. synchronization of two machining units of a multi-column machine

ID<sgn_nr>Number of the broadcast signal to be cleared. Positive integer

IDMIN<sgn_nr> First broadcast signal of a range to be cleared.
(Also alternatively to ID<sgn_nr>). Positive integer

IDMAX<sgn_nr> Last broadcast signal of a range to be cleared. Positive integer

CH<chan_nr> Channel number:

Valid values | Significance
1...Max. number of channels(1) | Number of the channel for which the signal to be cleared is destined.
--- | If no channel number is specified, the corresponding broadcast signal is cleared.

(1) see [6]-2.4

Programming example

(Deleting of a broadcast signal 812, Synchronization on DEC-level)

N500 #SIGNAL REMOVE [ID812] oder #SIGNAL REMOVE [IDMIN812]

(Deleting of the signal 812 to Kanal2, Synchronization on DEC-level)

N500 #SIGNAL REMOVE [ID812 CH2]

(Deleting of all broadcast signals between 812-820, Synchronization on DEC-level)

N500 #SIGNAL REMOVE [IDMIN812 IDMAX820] oder #SIGNAL REMOVE [ID812 IDMAX820]

(Deleting of all signals 812 to Kanal 1, Synchronization on DEC-level)

N500 #SIGNAL REMOVE [ID812 IDMAX812 CH1]

(Deleting of the broadcast signals 813, Synchronization on IPO-level)

N600 #SIGNAL REMOVE SYN [ID813]


Waiting for signals

Analogously to sending signals, it is possible to wait for a corresponding SIGNAL with the WAIT command. A broadcast WAIT waits only on a broadcast SIGNAL with the same signal number. A WAIT synchronized on decoder/interpolator level takes up one separate SIGNAL in each case.

#WAIT [<mode>] [ID<sgn_nr> { P[<idx>]=<param> } { CH<chan_nr> } [ AHEAD ] ] (non-modal)

<mode> Synchronization mode

Valid modes | Significance
--- | Synchronization on decoder level (basic setting). This synchronization is required for instance if it is necessary to synchronize with parameters or variables.
SYN | Synchronization on interpolator level. This synchronization is required in the case of real-time requests, e.g. synchronization of two machining units of a multi-column machine

ID<sgn_nr> Number of the signal with which synchronization is to occur (for which the system waits). Positive integer.

P[<idx>] = <param> Signal parameters as real number. While waiting for the signals also parameters can be transmitted by the signal senders from different channels. They are assigned to the specified parameters or variables (<param>).

Index | Significance
<idx> | Range for the maximum possible number of parameters: 0...Max. number of signal parameters(1)

After the complete acknowledgement of the waiting condition (receiving of all required signals) it is checked, wether all programmed parameters have been evaluated and stored. An error message is created, if this check is negative.

Signal parameters are currently evaluated only on decoder level. This means, for example a #WAIT SYN[... P[0] = ... ] is not allowed.

CH<chan_nr> Channel number:

Valid values | Significance
1...Max. number of channels(2) | Number of the channel from which a signal is anticipated.
--- | If no channel number is specified, the system waits for a signal of any user.

AHEAD Key word for the execution of a flying WAIT. Is used for the reduction of waiting time because of the buffer effect of the Look-ahead (up to 70 blocks in advance). At synchronization on interpolator level output of WAIT at once. As a result, at the following acknowledgement check (SIGNAL) the next traverse block can be executed without any interruption.

(1) see [6]-6.45

(2) see [6]-2.4

Programming example

(Wait mark 4711, Synchronization on DEC-level, SIGNAL 4711 from any channel)

N200 #WAIT [ID4711]

(Wait mark 815, Synchronization on IPO-level, SIGNAL 815 from channel 2 and 3)

N100 #WAIT SYN [ID815 CH2 CH3]

(Wait mark 911, Synchronization on DEC-level, from channel 3)

(1. signal parameter V.P.SIGNAL, 2. signal parameter P200)

N300 #WAIT [IDP100 P[0]=V.P.SIGNAL P[1]=P200 CH3]

N350 P20 = 10 * V.P.SIGNAL * P200

Programming example

Waiting for signals with evaluation of parameters (in channel 3):

%channel1

N10 #SIGNAL [ID 110014 P[0] = 1234 CH3]

N20 M30

%channel2

N10 #SIGNAL [ID 110014 P[1] = 200 CH3]

N20 M30

%channel3

N10 P1 = 1 (Stores value from channel 1

N20 P2 = 1 (Stores value from channel 2

N30 XP1 YP2

N40 #WAIT [ID 110014 P[0] = P1 P[1] = P2 CH1 CH2]

N50 XP1 YP2

N60 M30


RESET handling

If an individual channel is reset, the synchronization events of the channel affected are deleted, i.e. all wait requests (#WAIT) which the channel in question has sent and all non-broadcast signals (#SIGNAL) destined for it are deleted.

Broadcast signals are not deleted if a channel is reset since these signals may still be awaited by channels. They must be deleted explicitly (#SIGNAL REMOVE).


Synchronization scenarios

Synchronization of two decoders on two channels

q Decoder 3 waits for decoder 1, decoder 1 continues to operate without interruption

Programming example

% channel_1

...

(Signal P100)

(Synchronization on DEC-level)

(Synchronization on channel 3)

(Parameter V.P.SYNC)

V.P.SYNC = 1000

P100 = 814

#SIGNAL [IDP100 P[0]= V.P.SYNC CH3]

...

% channel_3

...

(Wait request 814)

(Synchronization on DEC-level)

(Synchronization with channel 1)

(Parameter V.P.SIGNAL)

#WAIT [ID814 P[0]= V.P.SIGNAL CH1]

...

Synchronization between decoder and interpolators on three channels

q Interpolator 1 waits for interpolator 2 and decoder 3,

q Interpolator 2 waits for interpolator 1 and decoder 3,

q Decoder 3 signals to interpolator 1 and interpolator 2.

Programming example

% channel_1

...

(Wait request 968)

(Sync. on IPO-level)

(Sync. with channel 2+3)

#WAIT SYN [ID968 CH2 CH3]

%channel_2

...

(Wait request 968)

(Sync. on IPO-level)

(Sync. with channel 3+1)

#WAIT SYN [ID968 CH3 CH1]

%channel_3

...

(Signal 968)

(Sync. on DEC-level)

(Sync. with channel 1+2)

#SIGNAL [ID968 CH1 CH2]

Synchronization between interpolators on three channels

q Interpolator 1 waits for interpolator 2,

q Interpolator 3 waits for interpolator 2,

q Interpolator 2 signals to interpolator 1 and interpolator 3.

Programming example

% kanal_1

...

(Wait request 100)

(Sync. On IPO-level)

(Sync. With channel 2)

#WAIT SYN [ID100 CH2]

%kanal_2

...

(Signal 100)

(Sync. on IPO-level)

(Sync. with channel 1+3)

#SIGNAL SYN [ID100 CH1 CH3]

% kanal_3

...

(Wait request 100)

(Sync. on IPO-level)

(Sync. with channel 2)

#WAIT SYN [ID100 CH2]

Synchronization between decoder and interpolator of one chann el

q Decoder waits until interpolator has reached position X 250.

q Motion block "G01 X370 Z200 F80" is already on the NC-channel and is processed after signaling.

q Movement block "G01 X900" is decoded only after synchronization.

In the case of synchronization requests between decoder and interpolator, statuses may occur in which the NC-program cannot be decoded further since no acknowledgement has yet arrived. The acknowledgement is, however, not dispatched by the interpolator since the signal block does not reach the interpolator owing to the buffer effect of the NC-channel. A #FLUSH which flushes the NC-channel must be provided in such cases in order to avoid possible deadlocks.

Programming example

% channel_1

G00 X100 Y500

G01 X250 F300

(Signal 88)

(Synchronization on IPO-level)

(Synchronization with channel 1)

#SIGNAL SYN [ID88 CH1]

(Operation)

G01 X370 Z200 F80

(Wait request 88)

(Synchronization on DEC-level)

(Synchronization with channel 1)

#FLUSH

#WAIT [ID88 CH1]

G01 X900

...


Rotation in a plane (contour rotation)

Contour rotation acts in the main plane only on the programmed axis coordinates (contour) before all other contour-influencing functionalities, i.e. all offsets and mirror-imaging operations are not influenced by the rotation and can be used as previously (*).

Rotation may also be applied within an already rotated coordinate system (CS, ACS).

A change of plane with G17/18/19 automatically deselects an active contour rotation and a warning is output.

#ROTATION ON [ [ [ANGLE <expr> ] [CENTER1<expr>] [CENTER2<expr>] ] ] (modal)

#ROTATION OFF (modal)

ANGLE<expr> Rotation angle in degrees (°).

CENTER1<expr> Offset of the first main axis with respect to the center of rotation in real format

CENTER2<expr> Offset of the second main axis with respect to the center of rotation in real format

Fig. 11.13: Significance of the rotation parameters in the main plane

The programmed rotation parameters can be read with the following variables:

V.G.ROT_ACTIVE Has the value 1, if a rotation is active

V.G.ROT_ANGLE Rotation angle

V.G.ROT_CENTER1 Offset of the first main axis with respect to the center of rotation

V.G.ROT_CENTER2 Offset of the second main axis with respect to the center of
rotation.

(*) It does not make a difference, whether the shifts were programmed before or behind the ROTATION command; they always act in the axis directions of the basic coordinate system of the machine (MCS).

Also the tool offsets always acts independently from [5] -2 in the axis directions of MCS.

Programming example

%L part

N10 G0 G90 X0 Y0

N30 G1 F5000 Y50

N40 X75

N50 G2 Y-50 R50

N60 G1 X0

N70 Y0

N80 M29

%ang1.nc

N100 G53 G17

N110 LL part

N130 #ROTATION ON [ANGLE -45 CENTER1=10 CENTER2=100]

N140 LL part

N150 G21 (mirroring of X coordinates)

N160 LL part

N170 G18 (warning expected)

M30

Same contour like in previous part program, but within #CS of 15°.

%L part

N10 G0 G90 X0 Y0

N30 G1 F5000 Y50

N40 X75

N50 G2 Y-50 R50

N60 G1 X0

N70 Y0

N80 M29

% ang1cs.nc

N99 #CS ON[0,0,0,0,0,-15]

N100 G53 G17

N110 LL part

N130 #ROTATION ON [ANGLE -45 CENTER1 10 CENTER2 100]

N140 LL part

N150 G21 (mirroring of X coordinates)

N160 LL part

N190 #CS OFF

M30

%L Trajectory0

N10 G54 G90 X0 Y0

N20 G0 X75 Y-50

N30 Y50

N40 X-75

N50 G3 X-75 Y-50 R50

N60 G0 X75

N70 X0 Y0

N80 M29

%ang2.nc

F1000

N100 LL Trajectory0

N200 G92 G90 Y-25

N400 #ROTATION ON [ANGLE 90 CENTER1 75 CENTER2=-50]

N600 LL Trajectory0

N700 G92 G90 Y25

N900 #ROTATION ON [ANGLE=-90 CENTER1 75 CENTER2 50]

N60 LL Trajectory0

N70 M30

%L Trajectory0

N10 G54 G90 X0 Y0

N20 G1 X75 Y-50

N30 Y50

N40 X-75

N50 G3 X-75 Y-50 R50

N60 G1 X75

N70 X0 Y0

N80 M29

%ang3.nc

N10 F4000 G90

N15 #ROTATION ON

N20 LL Trajectory0

N30 G90 G92 Y100

N35 #ROTATION ON [ANGLE 180]

N40 LL Trajectory0

N50 G90 G92 Y-100

N55 #ROTATION ON [ANGLE 180]

N60 LL Trajectory0

N70 M30

%L UPRG1

N1 X0 Y0 Z0

N10 X25

N30 X0

N40 Y25

N50 Y0

N60 X10

N70 Y10

N80 X0 Y0

N90 Y10

N100 X10 Y0

N110 G03 I-5 J5 Y10

N120 G1 X0 Y0

M17

%L UPRG2

N2 X0 Y0 Z0

N10 X25

N20 G02 I0.8

N30 G1 X0

N40 Y25

N45 G02 J0.8

N50 G1 Y0

N120 G1 X0 Y0

M17

%L UPRG3

N3 G1 X0 Y0 Z0

N10 X4 Y4

N20 G02 I1 J1

N30 G1 X0 Y0 Z0

M17

%ang4.nc

N1 G1 X0 Y0 Z0 F1000

N500 G92 X10 Y10

N510 LL UPRG1

N520 #ROTATION ON [ANGLE 0 CENTER1 25 CENTER2 15]

N540 LL UPRG1

N550 G92 X20 Y25

N560 #ROTATION ON [ANGLE -35]

N570 LL UPRG1

N580 G92 X35 Y-10

N590 #ROTATION ON [ANGLE=V.G.ROT_ANGLE-117]

N600 LL UPRG1

N610 #ROTATION ON [CENTER1 0 CENTER2 0]

N620 LL UPRG1

N630 #ROTATION ON [ANGLE=V.G.ROT_ANGLE+117]

N640 LL UPRG1

N650 #ROTATION ON [ANGLE=V.G.ROT_ANGLE+35]

N500 G92 X10 Y10

N510 LL UPRG2

N520 #ROTATION ON [ANGLE 0 CENTER1 25 CENTER2 15]

N540 LL UPRG2

N550 G92 X20 Y25

N560 #ROTATION ON [ANGLE -35]

N570 LL UPRG2

N580 G92 X35 Y-10

N590 #ROTATION ON [ANGLE=V.G.ROT_ANGLE-117]

N600 LL UPRG2

N610 #ROTATION ON [CENTER1 0 CENTER2 0]

N620 LL UPRG2

N630 #ROTATION ON [ANGLE=V.G.ROT_ANGLE+117]

N640 LL UPRG2

N650 #ROTATION ON [ANGLE=V.G.ROT_ANGLE+35]

N500 G92 X10 Y10

N510 LL UPRG3

N520 #ROTATION ON [ANGLE 0 CENTER1 25 CENTER2 15]

N540 LL UPRG3

N550 G92 X20 Y25

N560 #ROTATION ON [ANGLE -35]

N570 LL UPRG3

N580 G92 X35 Y-10

N590 #ROTATION ON [ANGLE=V.G.ROT_ANGLE-117]

N600 LL UPRG3

N610 #ROTATION ON [CENTER1 0 CENTER2 0]

N620 LL UPRG3

N630 #ROTATION ON [ANGLE=V.G.ROT_ANGLE+117]

N640 LL UPRG3

N650 #ROTATION ON [ANGLE=V.G.ROT_ANGLE+35]

M30

Test of relative and absolute programming:

%L contour_1

N1 G1 G91 (all positions with G91)

N2 X20

N3 Y20

N4 X20

N5 Y20

N6 X20

N7 Y20

N8 X20

N9 Y20

N10 X20

N11 Y20

N12 X5

N13 Y-3

N14 Y3

N15 X-5

N16 G90 X0

N17 Y0

N18 X5

N19 Y-3

N20 Y0

N21 X0

#MSG SYN["contour_1 finished"]

M17

%L contour_2

N100 G1 (same contour, X with G91, Y with G90)

N101 G91 X20

N102 G90 Y10 (transl. offset in Y is 10)

N103 G91 X20

N104 G90 Y30

N105 G91 X20

N106 G90 Y50

N107 G91 X20

N108 G90 Y70

N109 G91 X20

N110 G90 Y90

N111 G91 X8

N112 G91 Y-4

N113 G91 Y4

N114 G91 X-8

N115 G90 X0

N116 Y0

N117 X8

N118 Y-4

N119 Y0

N119 Y0

N120 X0

#MSG SYN["contour_2 finished"]

M17

%L contour_3

N200 G1 (same contour, Y with G91, X with G90)

N201 G90 X0 (transl. offset in X is 20)

N202 G91 Y20

N203 G90 X20

N204 G91 Y20

N205 G90 X40

N206 G91 Y20

N207 G90 X60

N208 G91 Y20

N209 G90 X80

N210 G91 Y20

N211 G91 X11

N212 G91 Y-5

N213 G91 Y5

N214 G91 X-11

N215 G90 X0

N216 Y0

N217 X11

N218 Y-5

N219 Y0

N220 X0

#MSG SYN["contour_3 finished"]

M17

%L contour_4

N300 G1 G90 (same contour with G90)

N301 X0 (transl. offset in X is 20)

N302 Y10 (transl. offset in Y is 10)

N303 X20

N304 Y30

N305 X40

N306 Y50

N307 X60

N308 Y70

N309 X80

N310 Y90

N111 G91 X14

N312 G91 Y-6

N313 G91 Y6

N314 G91 X-14

N315 G90 X0

N316 Y0

N317 X14

N318 Y-6

N319 Y0

N320 X0

#MSG SYN["contour_4 finished"]

M17

%ang5.nc

N5001 G0 G90 X0 Y0 F5000

N501 #ROTATION ON [ANGLE 0 CENTER1 20 CENTER2 10]

(Note: with angle != 0 the contours are

( not congruent because of difference

( of absolute and incremental movement !)

N502 #ROTATION ON

N503 LL contour_1

N504 #ROTATION OFF

N5002 G0 G90 Y0

N5003 X0

N505 #ROTATION ON

N506 LL contour_2

N507 #ROTATION OFF

N5004 G0 G90 Y0

N5005 X0

N508 #ROTATION ON

N509 LL contour_3

N510 #ROTATION OFF

N5006 G0 G90 Y0

N5007 X0

N511 #ROTATION ON

N512 LL contour_4

N513 #ROTATION OFF

N5005 G0 G90 Y0

N5006 X0

N210 M2

After selection valid rotation angular. The offsets for the rotation point may firstly be considered with the first absolute programming (G90).

%ang6.nc

N10 G90 X0Y0Z0 G1 F200

N20 #ROTATION ON [ANGLE 30 CENTER1 10 CENTER2 10]

N30 X0 Y0

N40 G3 I1 J1 F500

N50 G01 X10

N60 Y10

N70 G90 X0

N80 G90 Y0

N90 X10 Y10

(New rotation parameters.

(Note: Center offset has no effect until an absolute (G90) position

( has been programmed, the angle is effective however.

N100 #ROTATION ON [ANGLE 10 CENTER1 -10 CENTER2 0]

N110 G3 I1 J1 F500

N120 G01 G91 X10

N130 G91 Y10

N140 G91 X-10

N150 G91 Y-10

(Make the new center effective by first absolute position:

N200 G90 X0 Y0

N210 G3 I1 J1 F500

N220 G01 X10

N230 Y10

N240 X0

N250 Y0

M30

Transforming of the absolute or relative programmed circle center point:

%ang_cent.nc

N10 F2000 G53

N11 G0 X0 Y0 G90

(---------------------------------------------------------------------)

( 4 times the same circle with different programming of circle center point)

(---------------------------------------------------------------------)

N12 G0 X0 Y0 G90

N13 Y50

N14 X-75

N15 G3 X-75 Y-50 G161 I-75 J0 (absolute center)

N16 G0 X0 Y0 G90

N17 Y50

N18 X-75

N19 G3 X-75 Y-50 G162 I0 J-50 (relative center)

N20 G0 X0 Y0 G90

N28 #ROTATION ON [ANGLE 0 CENTER1 25 CENTER2 -75]

(---------------------------------------------------------------------)

( The same with LIN and ANG offset active (ED=0) )

(---------------------------------------------------------------------)

N80 G0 X0 Y0 G90

N90 Y50

N100 X-75

N110 G3 X-75 Y-50 G161 I-75 J0 (absolute center)

N120 G0 X0 Y0 G90

N130 Y50

N140 X-75

N150 G3 X-75 Y-50 G162 I0 J-50 (relative center)

N360 G0 X0 Y0 G90

(---------------------------------------------------------------------)

( The same rotated by 50ø (unnecessary I / J omitted) )

(---------------------------------------------------------------------)

N370 #ROTATION ON [ANGLE 50]

N380 G0 X0 Y0 G90

N390 Y50

N400 X-75

N410 G3 X-75 Y-50 G161 I-75 (J0) (absolute center, not prog. is 0)

N420 G0 X0 Y0 G90

N630 Y50

N640 X-75

N650 G3 X-75 Y-50 G162 I0 J-50 (relative center)

N650 G0 X0 Y0 G90

(---------------------------------------------------------------------)

( The same rotated by 95ø )

(---------------------------------------------------------------------)

N660 #ROTATION ON [ANGLE 95]

N670 G0 X0 Y0 G90

N680 Y50

N690 X-75

N700 G3 X-75 Y-50 G161 I-75 J0 (absolute center)

N710 G0 X0 Y0 G90

N730 Y50

N740 X-75

N750 G3 X-75 Y-50 G162 I0 J-50 (relative center)

N760 G0 X0 Y0 G90

M30


Automatic axis tracking (C-axis tracking)

Machining operations, such as cutting various materials, necessitate guidance of the tool used which is generally associated with the C-axis in such a manner that the tool is always aligned tangentially with respect to the path followed.

It must be noted that the tangent is not unique at each point of the path (break points). Consequently, a solution necessitates strategies for handling block transitions which do not feature constant tangents.

One typical application is the technology sector for glass cutting. This involves machining level contours with the aid of cutting tools in the form of carbide metal cutting wheels using CNC machines. The level workpiece is slit slightly at the machining point in accordance with the programmed contour (closed contour, e.g. ellipse). The required contour can then be broken out from the glass workpiece.

Fig. 11.14: Tracking the rotational C-axis tangentially with respect to the x-y contour

The C-axis can also be guided tangentially with respect to the path by explicit programming. The NC-commands described below do, however, simplify programming substantially.

#CAXTRACK ON [ [ [ANGLIMIT<expr>] [OFFSET<expr>] [OPTALIGN<expr>] ] ] (modal)

#CAXTRACK OFF [ [ANGPOS<expr>] ] (modal)

ANGLIMIT<expr> Limiting angle in degrees (°).
This parameter is only considered for non tangential continuous contour sections. Tangential continuous contour sections for example are created by the contouring function G61.
If the angle between the tangents to the contour exceeds the limit angle on block transition, the path movement is halted and the dressing movement is performed by an inserted motion block at rapid traverse rate. The inserted movement forms one unit in this case with the following, second block. This means, in particular, that PLC synchronization events in conjunction with the movement (M-functions etc.) are possible only before or after this motion unit.
If the transition angle to second block is smaller than the limiting angle, the dressing movement will start immediately with transition to second block. Because of limited axis acceleration in general the path transition velocity to second block is reduced by dynamic monitoring. If this behaviour is not acceptable, the axis dynamic monitoring of the trailing axis can be excluded by NC command and path motions are not affected. (e.g. G116 C1, see chap. 4.30 ).

OFFSET<expr> Angle offset in degrees (°).
This serves to specify an angle offset in order to orient the tool opposite to the tangent against the contour.

OPTALIGN<expr> At selection the alignment is automatically optimized, if the alignment distance is greater than the defined angle value.

This parameter is only considered for active automatic aligning according to P-CHAN-00101 and rotatory linear axes with limited moving area (no modulo axes). It is only effective during the automatic alignment process on the first contour element. After selection of the tangential tracking function with automatic aligning the position of the tracking axis lays without any offset in the area of -180..+180 degree. The parameter allows, that the position of the tracking axis before selection of the tangential tracking function is considered during the automatic aligning process. The function is only useful, if the tracking axis approximately has the correct position to the first contour element already before selection of the automatic aligning, but for example has a pre orientation of +-360 degree. If the internal calculated alignment angle value exceeds the programmed angle value, alternative solutions for the alignment angle are taken into consideration. Then the smallest alignment distance of the solutions determs the alignment angle. (*)

(*) For modulo axes the automatic alignment process always is executed on shortest way.

ANGPOS<expr> Position at deselection in degrees (°).

During the deselection the tracking axis can be positioned additional. The positioning for rotational axes is executed on shortest way.

The tracking axis is defined in the channel parameters [1]-34. Automatic tracking of the axis is performed with the correct sign, relative to the last position in accordance with the resulting contour transition angle.

Dependend on the parametrization [1]-37 the aligning of the tracking axis to the required orientation (generally parallel to the contour) is done as follows:

q Programmed aligning before selecting automatic tracking. No check of the position is conducted. The current angle position is freezed and the tracking axis is aligned with that angle.

q Automatic tangential aligning of the tracking axis to the first programmed contour element at selecting automatic tracking. The activation of this function is compellingly necessary, if there are programmed contour sections with polynomials (e.g. G261).

If the tracking axis has already the correct orientation at selecting, for active parameter [1]40 the path motion is continued with the first relevant motion block without interruption.

Tracking commences with the transmission of the first to the second relevant motion block after activation with #CAXTRACK ON. Automatic axis tracking operates in the main plane of circular interpolation (1st + 2nd main axis). This must be defined prior to activation (G17 / 18 / 19, #PUT AX / #CALL AX / #SET AX).

In synchronous operation a tracking axis my not be operated neither as master nor as slave axis!

Programming example

N10 G00 G90 X0 Y0 Z0 C0

N20 X5 Y5 C45 (Straight line 45° to the X-axis, C-axis (parallel to the contour

N20 #CAXTRACK ON [ANGLIMIT 3, OFFSET 0] (Activation of axis tracking, (Limit angular 3°,)
(Angular offset 0°)

N30 X10 Y10 (Primary movement block, no tracking

N40 X20 (Angular to the previous block: -45° > (Limit angular -> Block is inserted: (End position of C = 0

N50 M99 X30 (If M-function synchronization before (Movement -> First synch., then movem. C (on 0, then X on 30.

(If Sync. after block-> Movem. C on 0 (then X on 30, then Sync.

N60 X40 G60 (Transitional angular 0°, Exact stop

N70 X30 (Transitional angular 180°, no tracking

N80 Y10 X29.9 (Transitional angular -89.427°, new Pos. (C = -89.427° (clockwise)

N90 #CAXTRACK OFF (Deactivation of axis tracking

M30


User-defined error output

TwinCAT CNC: Overview

User-defined error outpu t

The NC-command #ERROR allows output of user-defined error messages, which are further-processed by the higher-level operating system (GUI). Additional parameters offer the option of specifying the error more precisely.

        #ERROR [ [
[ID<expr>]
[RC<expr>]
[MID<expr>]
{PV<i><expr>}
{PM<i><expr>}

{PIV<i><expr>} ] ] (non-modal)

ID<expr> Error number:

Valid values | Significance
1...1000 | The numerical value determines the customer-specific error number to be output.

RC<expr> Error (response) class:

Valid values | Significance
0 | Warning: No transition to error state. Program execution is continued. Corresponds to error class ERR_KLASSE_1 of the NC-kernel.
2 | Serious error: Transition to error state. Can be cleared only with NCRESET. Corresponds to error class ERR_KLASSE_3 of the NC-kernel.
7 | Fatal user error: Transition to error state. Can be cleared with NCRESET. Corresponds to error class ERR_KLASSE_8 of the NC-kernel.

MID<expr> Multiple ID. Counter serves as a distinguishing feature if the #ERROR command with the same error number (ID) is used several times in an NC-program. Positive integer.

PV<i><expr> Max. 5 (1 <= i <= 5) customer-specific numerical values (PV1...PV5) in real format can also be output in the error message.

PM<i><expr> The maximum 5 (1 <= i <= 5) PM parameters (PM1...PM5) serve to specifie the significance of the PV parameters more precisely.

Valid values | Significance
0 | IGNORE, value has no significance
1 | Limit value
2 | Current value
3 | Error value
4 | Expected value
5 | Corrected value
6 | Logical axis number
7 | Drive type
8 | Logical control element
9 | State (situation)
10 | Transition
11 | Sender
12 | Class
13 | Instance
14 | Identification number
15 | Status
16 | Ring number
17 | Block number
17 | Lower limit value
19 | Upper limit value
20 | Initial value
21 | Final value

PIV<i><expr> The maximum 4 (1 <= i <= 4) PIV parameters (PIV1...PIV4) serve to transfer additional information in real format.

For not programmed parameters following default values are valid:

ID | 1
RC | 0
MID | 0
PV1...PV5 | 0.0
PM1 PM5 | 1
PIV1...PIV4 | 0.0

Programming example

:

#ERROR Customer specific default(-standard-)error message (Warning).

:

#ERROR [ID455 RC2 PV1=5 PV2=4.999 PM1=2 PM2=3] Fatal error 455 with
additional parameters.

:

#ERROR [ID455 RC2 MID2 PV1 5 PV2 4.999 PM1 2 PM2 3] Fatal error 455 (Multiple-identification 2)
(with additional parameters)

:

#ERROR [ID100 RC0 MID10] Warning 100 (Multiple identification 10)

:

#ERROR [ID999 RC7] System error 999

:


Time measurement

The NC-command #TIMER offers the option of time measurement in the NC-program. The time recorded is represented in the unit milliseconds (ms).

#TIMER <action> [<mode>] [ID<counter_nr>] (non-modal)

<action> Determines the action with the designated counter (ID).

Action | Significance
START | Start of the designated counter (ID).
STOP | Stop of the designated counter (ID).
READ | Read-out of the designated counter (ID). The count is latched and saved in the assigned V.G.TIMER[ID] variable in milliseconds (ms).
CLEAR | Reset of the designated counter (ID). The assigned V.G.TIMER variable is not deleted but is retained until another READ action of the related counter.

With the timer function a maximum of 1193 hours can be recorded.

<mode> Synchronization mode:

Valid modes | Significance
--- | Time measurement asynchronously with respect to the interpolator on decoding level (basic setting). The time measurement starts directly after decoding.
SYN | Time measurement on interpolator level. The designated counter is set synchronous with the machining operations of the NC-machine. In the case of syn-chronous reading (<SYN>) in the interpolator, decoding is interrupted until the count on decoding level has been accepted in the timer variable.

For the measurement of execution of program operations it is advisable to use the timers always with the keyword SYN.

ID<counter_nr> Counter number:

Valid values | Significance
0...127 | A maximum of 128 counters can be programmed. However, only one counter (ID) can be programmed per timer command.

Programming example

:

#FILENAME[ MSG="C:\timer.txt" ] File name for time recording

:

#TIMER START [ID=10] Timer 10 is started (Decoding level)

#TIMER START SYN [ID11] Timer 11 is started (IPO-level)

:

:

#TIMER READ [ID10] Timer value is stored in V.G.TIMER[10]

#TIMER READ SYN [ID11] Timer value is stored in V.G.TIMER[11]

#MSG SAVE["T10 = %d",V.G.TIMER[10]] Recording of timer value in file

#MSG SAVE["T11 = %d",V.G.TIMER[11]] Recording of timer value in file

#TIMER STOP [ID10] Timer 10 is stopped

#TIMER CLEAR [ID10] Timer 10 is reseted

:

:

#TIMER READ SYN [ID11] Timer value is stored in V.G.TIMER[11]

#MSG SAVE["T11 = %d",V.G.TIMER[11]] Recording of timer value in file

:

:

#TIMER READ SYN [ID11] Timer value is stored in V.G.TIMER[11]

#MSG SAVE["T11 = %d",V.G.TIMER[11]] Recording of timer value in file

:

:

#TIMER READ SYN [ID11] Timer value is stored in V.G.TIMER[11]

#MSG SAVE["T11 = %d",V.G.TIMER[11]] Recording of timer value in file

#TIMER STOP SYN [ID11] Timer 11 is stopped

#TIMER CLEAR SYN [ID11] Timer 11 is reseted

:

:

:

#TIMER START [ID=10, ID11] Error, only one counter per timer command
permissible!

:

:


Definition of feed axes

For the axes programmed in the command #FGROUP a path in space is determined, which is moved with the programmed feed. All other axes are treated like tracking axes. They reach their target positions at the same time like the path axes.

A characteristic feature of a path axis is, that the distance to be traversed is considered for the feed. In comparison the distance to be traversed of a tracking axis has no direct influence on the path velocity.

If no feed axes are programmed, the default settings of the channel parameters [1]-29/30 are valid.

#FGROUP [ [<axis_name> {,<axis_name>} ] ] (modal)

<axis_name> Name of the axes, which are members of the feed group

For linear interpolation any axis may be feed axis, for circular interpolation and for polynomial interpolation following restrictions are valid:

q For circular interpolation either all main axes must be feed axes or all defined feed axes must be tracking axes

q For polynomial interpolation only main axes must be feed axes

Programming example

N10 #FGROUP [X, Y] (X and Y are feed axes)

:

N50 #FGROUP [A] (Tracking axis A is feed axis)

:

N100 #FGROUP (Feed axes according to the default settings)
(in the channel parameters)

:

N999 M30

During the processing of cylindrical workpeaces on a rotary workpeace axis the real programmed feed [mm/min] shall be effective in the contact point of the tool. One way to ensure this, is the selection of a useful kinematic transformation (e.g. lateral surface transformation). The other way is the use of the NC command #FGROUP ROT[...]. After programming of this command the feed of the rotary axis (Grad/min) is transformed in dependence on a reference radius. When programming the rotary axis alone or together with linear axes, at the reference radius the demanded programmed feed arises.

#FGROUP ROT [ AX <axis_name> REF <reference_radius> ] (modal)

AX <axis_name> Name of the axis, on which the reference radius shall be effective.

REF<reference_radius> Effective radius of the rotary axis.

The deselection of feed calculation relating to a rotary axis is done with:

#FGROUP ROT (modal)

It is not checked, weather the axis "AX.." is really a rotary axis or not.

The function can only be used for feed blocks (G01) and combined with G94.

Typically this function is used für milling!

Feed adaptations for turning are programmed via G95 and G96.

Programming example

Workpeace with reference radius R=10mm

N05 G00 C0

N10 G01 C180 F1000

(* Rotational speed of the workpeace 1000 degree/min *)

(* Feed at the workpeace periphery 174.67 mm/min *)

N20 #FGROUP ROT[AX=A REF=10]

N30 G01 C360 F1000

(* Feed at the workpeace periphery 1000 mm/min *)

(* Rotational speed of the workpeace 5727.6 degree/min *)

:

Nxx #FGROUP ROT (Deselection)

The command #FGROUP WAXIS defines independent from the default settings in the channel parameters that the axis with the longest running time (weakest axis) is moved automatically as feed axis with the programmed feed (F-Word). All other axes are treated as tracking axes.

#FGROUP WAXIS (modal)

Programming example

N10 #FGROUP [X, Y] (X and Y are feed axes)

:

N50 #FGROUP WAXIS (Weakest axis is feed axis)

:

N100 #FGROUP [X, Y, Z] (X, Y and Z are feed axes)

:

N999 M30


Adaption of the path dynamic limits

From version V2.10.1507.02 the command #VECTOR LIMIT ON/OFF... replaces the commands #VECTORACC ON/OFF... and #VECTORVEL ON/OFF... .For compatibility reasons the commands are furthermore available, but they should not be used in new NC programs.

The maximum permissible velocity, acceleration and decelaration on path depends on the dynamic characteristics set in the axis specific parameter lists and the programmed contour.

To ensure optimal results for some particular applications (e.g. high-intensity laser or plasma torch cutting processes) it should be possible to modify and adapt the dynamic characteristics on path directly in NC program.

These path limit values can be influenced by the following NC-commands during the dynamic moving phases of the processing. They enable the activation/deactivation of self-defined limits respectively default limits.

#VECTOR LIMIT ON [ [ ACC<acc> ] [ DEC<dec> ] [ VEL<vel> ] ] (modal)

or

#VECTOR LIMIT ON [ [ ACC ] [ DEC ] [ VEL ] ] (modal)

or

#VECTOR LIMIT ON ALL (modal)

ACC <acc> Acceleration limit in mm/min².

DEC <dec> Deceleration limit in mm/min².

The parameter DEC is effective, if the selected slope profile allows a separate defintion of acceleration and deceleration parameters (e.g. slope type 1).

VEL <vel> Velocity limit in mm/min.

If no limit values are programmed after the keywords ACC, DEC, VEL or the command #VECTOR LIMIT ON ALL is used, the default dynamic values from the channel parameter list [1]-31 [1]-31, [1]-50, [1]-32 are used.

The command #VECTOR LIMIT OFF ... causes the switch over to the calculation of the dynamik limitation by the Look Ahead. The switching can be programmed both, for specific limits and for all limits.

#VECTOR LIMIT OFF [ [ ACC ] [ DEC ] [ VEL ] ] (modal)

or

#VECTOR LIMIT OFF ALL (modal)

The path dynamic limits are only used, if they are smaller than the valid limits of the look ahead. They have

no influence on axis specific motions like homing, manual operation, independent axis and..

they effect on both G01 and G00.

In connection with the channel parameter [1] -33 the user must take into consideration, that the deceleration of a machine during feedhold dependent on the programmed limit also is slowing down.

The path dynamic limits for G00 also can be influenced by a path dependend weighting table defined in the channel parameters [1] -49.

Programming examples

%vec_limit

(Setting of dynamic limit data on specific values)

N10 #VECTOR LIMIT ON [ACC=3600000 DEC=4000000 VEL=3000]

N11 #VECTOR LIMIT ON [ACC=3600000 DEC=4000000]

N12 #VECTOR LIMIT ON [ACC=3600000 VEL=3000]

N13 #VECTOR LIMIT ON [ACC=3600000]

N14 #VECTOR LIMIT ON [DEC=4000000 VEL=3000]

N15 #VECTOR LIMIT ON [DEC=4000000]

N16 #VECTOR LIMIT ON [VEL=3000]

(Setting of dynamic limit data on default values)

N20 #VECTOR LIMIT ON [ACC DEC VEL]

N21 #VECTOR LIMIT ON [ACC DEC]

N22 #VECTOR LIMIT ON [ACC VEL]

N23 #VECTOR LIMIT ON [ACC]

N24 #VECTOR LIMIT ON [DEC VEL]

N25 #VECTOR LIMIT ON [DEC]

N26 #VECTOR LIMIT ON [VEL]

(Mixed setting of dynamic limit data)

N27 #VECTOR LIMIT ON [ACC=3600000 DEC]

N28 #VECTOR LIMIT ON [ACC VEL=3000]

( Setting of all dynamic limit data on default values )

N30 #VECTOR LIMIT ON ALL (:= #VECTOR LIMIT ON [ACC DEC VEL])

( Setting of dynamic limit data by LOOK_AHEAD)

N40 #VECTOR LIMIT OFF [ACC DEC VEL]

N41 #VECTOR LIMIT OFF [ACC DEC]

N42 #VECTOR LIMIT OFF [ACC VEL]

N43 #VECTOR LIMIT OFF [ACC]

N44 #VECTOR LIMIT OFF [DEC VEL]

N45 #VECTOR LIMIT OFF [DEC]

N46 #VECTOR LIMIT OFF [VEL]

( Setting of all dynamic limit data by LOOK_AHEAD)

N50 #VECTOR LIMIT OFF ALL (:= #VECTOR LIMIT OFF [ACC DEC VEL])

N999 M30


Definition of a minimum block transition velocity

At discontinuous block transitions (contour angles) the path velocity is so far reduced, that the resulting axes accelerations do not exceed the limit values predefined in the axes parameters. From technological view this velocity reduction at contour angles sometimes is unwanted (e.g. flame or gas cutting). In this cases with the following command a minimum velocity can be defined, which may not be fallen below at contour angles.

The programmed minimum velocity acts only at discontinuous block transitions of circular and linear blocks. As a result in NC program no contouring mode or spline interpolation may be selected (e.g. G261, #HSC, G151).

#TRANSVELMIN ON [ [<vel>] ] (modal)
#TRANSVELMIN OFF

<vel> Minimum block transition velocity in mm/min.

If no limit value is programmed after #TRANSVELMIN ON, the minimum transition velocity is set to 0. The command #TRANSVELMIN OFF causes the switch over to the free calculation of the velocity limitation of the look ahead function.

The functions works with linear and non-linear slope, but during non-linear slope the jerk limitation for discontinuous block transitions may not be active (Channel parameter corr_v_trans_jerk=1). In such cases the jerk limitation is prior.

The programmed minimum velocity is only valid until program end. It is set to zero at the next program start or RESET.

A predefinition in the channel parameters [CHAN] is not possible.


Writing of machine data

The availability of this function depends on the configuration and the concrete scope of version.

This command makes it possible to change in a part program axis specific machine parameters. The new values are valid program global. They are overwritten by the next update of machine data lists (e.g. startup of control).

An eventually active path interpolation is stopped until the taking over of the new parameter is finished and the value has become effective. Eventually turning spindles are not stopped.

#MACHINE DATA [<mode>] [AX<name> | AXNR<expr>

<param_id><expr> | AXPARAM "<string>" [ WAIT ] ] (modal)

<mode> Synchronisation mode

Valid modes | Significance
--- | Synchronization on decoding level (basic setting)
SYN | Synchronization on interpolation-(real time) level

AX<name> Name of the related axis or spindle for the new axis specific parameter value

AXNR<expr> Logical axis number of a channel axis or spindle for the new axis specific parameter value. Positiv integer.

No plausibility check as regards the logical axis number is conducted. The operator is solely responsible for making the correct entries.

<param_id><expr> Axis parameter in ISG-spelling (P-AXIS-xxxxx) with assigned new value in the unit of the parameter list [AXIS]. The following axis parameters can be changed by predefined keywords (param_id):

param_id | Significance
P-AXIS-00001 | Non linear velocity profile: A xis acceleration with increasing velocity
P-AXIS-00002 | Non linear velocity profile: Axis deceleration with decreasing velocity
P-AXIS-00004 | Acceleration at rapid movement (G00)
P-AXIS-00005 | Linear velocity profile: Acceleration step 1 in rapid mode (G00)
P-AXIS-00006 | Linear velocity profile: Acceleration step 2 in rapid mode (G00)
P-AXIS-00008 | Permissible axis dynamics: Maximum permissible axis acceleration
P-AXIS-00011 | Linear velocity profile: Acceleration step 1 at feed interpolation (G01, G02, G03)
P-AXIS-00012 | Linear velocity profile: Acceleration step 2 at feed interpolation (G01, G02, G03)
P-AXIS-00045 | Minimum distance between two collision axes
P-AXIS-00056 | Maximum difference after deactivation of the tracking mode
P-AXIS-00075 | Gantry operation: Velocity of correction for the compensation of the static offset between master- and slave axis because of difference in measurement systems
P-AXIS-00099 | Amplification factor kv for P-Positional Control
P-AXIS-00103 | Size of backlash compensation
P-AXIS-00109 | Maximum permissible velocity override for independent axis and spindles
P-AXIS-00151 | Maximum transient time to reach the window for accuracy stop
P-AXIS-00152 | Absolute position of the reference point
P-AXIS-00166 | Remaining deviation for non linear following error monitoring
P-AXIS-00167 | Factor for dynamic following error monitoring
P-AXIS-00168 | Maximum following error
P-AXIS-00169 | Minimum following error
P-AXIS-00172 | Type of following error monitoring
P-AXIS-00195 | Non linear velocity profile: Ramp time for acceleration down-gradation
P-AXIS-00196 | Non linear velocity profile: Ramp time for acceleration up-gradation
P-AXIS-00197 | Non linear velocity profile: Ramp time for deceleration down-gradation
P-AXIS-00198 | Non linear velocity profile: Ramp time for deceleration up-gradation
P-AXIS-00200 | Non linear velocity profile: Ramp time at rapid movement (G00)
P-AXIS-00201 | Minimum permissible ramp time of the drive to limit the axis jerk
P-AXIS-00208 | Maximum feed of compensation movement after deselection of tracking operation
P-AXIS-00209 | Rapid traverse G00
P-AXIS-00211 | Linear velocity profile: Changeover speed in rapid mode (G00) between ramp 1 and ramp 2
P-AXIS-00212 | Permissible axis dynamics: Maximum permissible axis velocity
P-AXIS-00216 | Minimum permissible axis velocity for spindles. Below this velocity the ro-tational speed monitoring in position controler shows the state "speed zero"
P-AXIS-00217 | Factor for calculation and determination of the state "speed-value attained"
P-AXIS-00218 | Minimum homing velocity
P-AXIS-00219 | Maximum homing velocity
P-AXIS-00221 | Linear velocity profile: Changeover speed in feed interpolation (G01, G02, G03) between velocity-ramp 1 and velocity-ramp 2
P-AXIS-00236 | Size of the control window for accuracy stop

AXPARAM "<string>" Alternative syntax: Axis parameter with complete structure path and value in internal spelling of the parameter list [AXIS] (see example). All axis parameters can be changed

WAIT The use of this keyword is only allowed in connection with a synchronized setting (SYN) of an axis parameter. If a WAIT is programmed, additionally the program decoding is interrupted (implicit FLUSH) and it is waited, until the taking over of the new parameter is finished and the value has become effective in the whole NC channel.

WAIT can not be used during contour modifying functions like e.g. active tool radius compensation, polynomial contouring or HSC-mode.

Programming example

N10 G00 X100 (Positioning with rapid traverse velocity acc.)
(to default settings after startup)

N20 #MACHINE DATA SYN [AX=X P-AXIS-00209=80000] (New rapid velocity)

:

N30 ... (In following program sequence the new rapid traverse)
(velocity is valid)

:

Alternative in axis list syntax:

:

N20 #MACHINE DATA SYN [AX=X AXPARAM= "getriebe[i].vb_eilgang 80000" ]
(New rapid vel.)

:

For a spindle axis:

N20 #MACHINE DATA SYN [AX=S P-AXIS-00109=1200] (New V-Override)

Setting of a new software limit and waiting in channel:

:

N20 #MACHINE DATA SYN [AX=X AXPARAM= "kenngr.swe_pos 15000000" WAIT]


Definition of file names

With that command in NC program file names can be defined, which are used from specific NC functions for example for the creation of a report file or for the call of a NC program.

#FILENAME [ <file_id>"<filename>" { <file_id>"<filename>" } ] (modal)

<file_id> File identification

file id's | Significance
MSG | Name of the report file for #MSG SAVE. Default name is "message.txt".
M6 | Name of the global sub program for implicit program call at M6 in NC program. The name is valid until M30. M6 is not used as M function anymore! Default name is set in [1] -43.
G80  G89 | Name of the global sub programs for implicit program calls at G80 G89 in NC program. The names are valid until M30. Default names are set in [1] -45.
G800- G819 | Name of the global sub programs for additional implicit program calls at G800 G819 in NC program. The names are valid until M30. Default names are set in [1] -46.

Optional an equation sign (=) can be programmed between <file_id> and <filename>. The file names can be defined or changed in NC programe with #FILENAME at any time.

The file names are set on the default name at RESET and NC program start.

Programming examples

%example1

N10 #FILENAME[ MSG="prog_flow.txt" ]

N20 $IF V.E.PLC_START_HOME == 1

N30 G74 X1 Y2 Z3

N40 #MSG SAVE["Homing executed"] Output in prog_flow.txt

N50 $ENDIF

:

Nxx #MSG SAVE["Roughing OK"]

:

Nxx #MSG SAVE["Finishing OK"]

N985 V.E.WP_CNTR = V.E.WP_CNTR+1

N990 #MSG SAVE["Workpiece No. %d OK", V.E.WP_CNTR]

M1000 M30

%example2

N10 #FILENAME[ M6="tool_change.nc" ]

N20 G00 X100 Y100 Z0

N30 M6 Call of tool change program tool_change.nc

:

M1000 M30

%example3

N10 #FILENAME[ G80="g80_up_test.nc" ]

N20 G00 X100 Y100 Z50

N30 G80 Call of sub program g80_up_test.nc

:

M1000 M30

%example4

N10 #FILENAME[ G800="g800_up_test.nc" G815="g815_up_test.nc"]

N20 G00 X100 Y100 Z50

N30 G800 Call of sub program g800_up_test.nc

:

N90 G815 Call of sub program g815_up_test.nc

:

M1000 M30


Restoring of axes configurations and axes couplings

TwinCAT CNC: Overview

Restoring of axes configurations and axes couplin gs

Complex multi channel machines, which uses axes exchange operations and synchronous axes for processing, are interrupted in case of an error by a NC Reset. After that the NC channels are reinitialized and the channel configuration valid at the time of abort is lost. To enable the cleareance of the tool axes, the axes configuration of the NC channel and the axis couplings valid at the time of the abort have to be restored. For this the following NC commands can be used.

More:

button Saving of a current configuration

button Loading or restoring of a saved configuration

button Deleting of a saved configuration


Saving of a current configuration

# SAVE CONFIG [ [ AX ] [ AXLINK ] ] (modal)

AX: Saving of the current existing axes configuration of the NC channel.

AXLINK: Saving of the current selected axis couplings of the NC channel. Already saved couplings are deleted, if AXLINK is programmed and no couplings are active.

Usually in NC program the command #SAVE CONFIG always is used after operations, which cause the change of an axes configuration or the selection of axis couplings. So for example after an axes exchange command or after a command for the selection of synchronous operation.

During the saving the configuration data in NC channel are adjusted with the interpolator data and then stored in the working data of the asynchronous task. This mechanism ensures the consistent saving of the current configuration data synchronous to the current processing state.

Programming example

%main

:

N10 X0 Y0 Z0

N15 #AX REQUEST [C,4,5] [B,5,6]

N20 #AX LINK [1, C=X, B=Y]

N25 #AX LINK [2, B=X]

N30 #AX LINK ON [1]

N35 #SAVE CONFIG [AX AXLINK] Saving of axes configuration X,Y,Z,B,C
and the active coupling group 1

N.. X.. Y.. Z..

:

N200 #AX LINK OFF ALL

N210 #AX RELEASE [C]

N220 #SAVE CONFIG [AX] Saving of new axes configuration X,Y,Z,B.
The saved axes configuration up to now
from block N35 is overwritten!

:

N.. X.. Y.. Z..

N99 M30

A saved configuration is stored program global. It only can be updated by a following #SAVE CONFIG command or deleted by a #CLEAR CONFIG !


Loading or restoring of a saved configuration

#LOAD CONFIG [ [ AX ] [ AXLINK ] ] (modal)

AX: Loading of the latest saved axes configuration. If no saved configuration is available, an errror message is output. In NC channel not existing axes are requested without any offsets.

AXLINK: Loading of the latest saved active axis couplings. All axis couplings are summarized, restored and activated under coupling group 1. If no saved axis couplings are available, an errror message is output.

In the clearance program after a NC RESET the command #LOAD CONFIG is used, to restore the latest saved configuration. Nevertheless the machine user is responsible for the correct programming of the #SAVE CONFIG commands and so for the correct restoring of a required configuration. If both keywords are programmed, independent from the sequence of programming always at first the axes configuration in NC channel is restored (without "FAST") and after that the saved axis couplings are selected.

Programming example

Start of a clearance program after abort of processing and NC-RESET:

%Clearance

N10 G53

N35 #LOAD CONFIG [AX AXLINK] Restoring of the saved axes
configuration and axis couplings
under coupling group 1

N40 #ECS ON Definition of a EKS for the execution
of the retract travel

N.. X.. Y.. Z..

:

N200 #AX LINK OFF ALL

:

N.. X.. Y.. Z..

N99 M30

With the use of #SAVE CONFIG and #LOAD CONFIG in the same NC program, at the beginning of #LOAD CONFIG always an implicit FLUSH is executed to ensure the consistency of the saved configuration in the channel.

Programming example

N..

Nxx #SAVE CONFIG [AX AXLINK]

:

N..

:

Nxx #LOAD CONFIG [AX AXLINK] At first an implicit FLUSH, then
restoring of axes confguration,
then restoring of axis couplings

N.. X.. Y.. Z..

N99 M30


Deleting of a saved configuration

#CLEAR CONFIG (modal)

With #CLEAR CONFIG the latest saved configuration is completely deleted. A #LOAD CONFIG, programmed directly after that, causes the error message "No restorable configuration found". This means, before the use of #LOAD CONFIG at first with #SAVE CONFIG a configuration has to be saved again.

For the machine user a #CLEAR CONFIG is always helpful, if he wants to prevent the unsuited access on saved configurations in other NC programmes.

Programming example

Execute clearance program, then delete the saved configuration:

%Clearance

N10 G53

N35 #LOAD CONFIG [AX AXLINK] Restoring of the saved axes
configuration and axis couplings
under coupling group 1

N40 #ECS ON Definition of a EKS for the execution
of the retract travel

N.. X.. Y.. Z..

:

N200 #AX LINK OFF ALL

:

N.. X.. Y.. Z..

N.. #CLEAR CONFIG After finishing the retraction travel
deleting of the saved configuration

N99 M30


Work space/ Protection space monitoring

The use of control areas prevents, that specific axes constellations can cause collisions between the tool and machine or workpiece parts. A control area can be designed as a work space or a protection space.

Control areas can be defined as three dimensional bodys in cylindrical or polygonal form. The third dimension is defined with minimum and maximum constant values. The assignment of the axes depends on the currently active working plane (e.g. G17).

Fig. 11.15: Definition of 3D control areas (Cylindrical, Polygonal)

Fig. 11.16: Application example

It is not allowed to move out of a work space and it is not allowed to move into a protection space. The current tool data are included, and the tool tip can be checked for validity in the control area.

Work and protection spaces are defined, selected and deselected in the NC program. Several control areas can be active at the same time. If a control area is deselected, it can be redefined.

The work space/ protection space monitoring is possible for:

q Linear interpolation

q Circular interpolation (independent of orientation G17/G18/ G19).

q Cinematic transformations (monitoring of tool center point).

q Polynomial contouring

q Helical interpolation

Not allowed are:

q Cartesian transformations ( #(A)CS )

More:

button Definition of control areas

button Deselection/ selection of control areas

button Deleting of control areas


Definition of control areas

The definition of a work or protection area has to be done directly in NC program. The definition consists of #-commands and a sequence of standard movement blocks. The standard movement blocks have to be programmed in absolute dimensions. The contour of the control area in the plane is defined either with a closed polygon formed by linear movement blocks (end point and starting point of the block sequence have to be identical) or by a full circle. The excursion in the third dimension and further characteristics of the control area are defined in the assigned #-command.

Start of definition of a control area:

#CONTROL AREA START [ ID <expr> WORK | PROTPOLY | CIRC

MIN_EXCUR <expr> MAX_EXCUR <expr> ] (modal)

ID <expr> Identification number of the control area (ID). The definition is global valid after program end and RESET.

WORK Control area is a work space.

PROT Control area is a protection space.

POLY Contour of control area is defined as a closed polygonal shape.

CIRC Contour of control area is defined as a full circle.

MIN_EXCUR <expr> Limitation of the control area in the third dimension in negative direction.

MAX_EXCUR <expr> Limitation of the control area in the third dimension in positive direction.

End of definition of a control area:

#CONTROL AREA END (modal)

Each control area has to be closed with the command #CONTROL AREA END. Only after that further control areas can be defined.

A deselected control area can be redefined by programming the new definition using the same ID.

Programming example

(Definition of a polygonal work space:)

:

N10 #CONTROL AREA START [ID1 WORK POLY MIN_EXCUR=-50 MAX_EXCUR=50]

N20 G01 F1000 G90 X-150 Y75 (Start point)

N30 X-50 Y150

N40 X50 Y150

N50 X150 Y75

N60 X150 Y0

N70 X50 Y0

N80 X50 Y75

N90 X-50 Y75

N100 X-50 Y0

N120 X-150 Y0

N130 X-150 Y75 (End point identical with start point)

N140 #CONTROL AREA END

:

(Definition of a cylindrical protection space:)

:

N210 #CONTROL AREA START [ID2 PROT CIRC MIN_EXCUR=-70 MAX_EXCUR=70]

N220 G01 X100 Y0 F10000 (Start point for cylindrical prot. space)

N230 G02 G162 I50 J0

N240 #CONTROL AREA END

:


Deselection/ selection of control areas

With activation of control areas the TCP has to be already inside the valid work space. In the same way on the current position the TCP may not cause a violation with activation of a protection space.

#CONTROL AREA ON [ALL] | [ ID<expr>] (modal)

ID <expr> Identification number of the control area (ID).

ALL Selecet all defined control areas.

Programming example

#CONTROL AREA ON [ID3] (Activate a specific control area)

#CONTROL AREA ON ALL (Activation of all defined control areas)

#CONTROL AREA OFF [ [ALL] | [ ID<expr>] ] (modal)

ID <expr> Identification number of the control area (ID).

ALL Deselecet all defined control areas.

Programming example

#CONTROL AREA OFF [ID3] (Deactivate a specific control area)

#CONTROL AREA OFF (Deactivate the latest selected control area)

#CONTROL AREA OFF ALL (Deactivation of all active control areas)


Deleting of control areas

#CONTROL AREA CLEAR [ALL] | [ ID<expr>] (modal)

ID <expr> Identification number of the control area (ID).

ALL Delet all defined control areas.

Programming example

#CONTROL AREA CLEAR [ID3] (Delete a specific control area)

#CONTROL AREA CLEAR ALL (Deleting of all defined control areas)

812_start


Influencing of function forward/backward on path

The availability of this function depends on the configuration and the concrete scope of version.

For more information to these commands and the forward/ backward on path function see the functional description [FCT-C7].

More:

button Omitting of program parts

button Clearing of backward storage


Omitting of program parts

Within the NC-program by the command #OPTIONAL EXECUTION a sequence of NC-blocks can be marked as able to be skipped during forward/ backward on path. The marked part is just omitted on interpolator level if forward/ backward on path is active, no recalculation of any conditions is done when the commands are omitted.

#OPTIONAL EXECUTION ON | OFF (modal)

Therefore any interpolator state, especially the axis positions, has to be the same after skipping some NC-commands otherwise the path, speed, acceleration would not be continuously.

Programming example

%t_storag.nc

X10 Y0

N10 G91 G00 X10 F1000

N11 #OPTIONAL EXECUTION ON

N12 Z123

N13 S1000 M3

N14 Z-123

N15 M101

N16 #OPTIONAL EXECUTION OFF

N20 G90 G01 X0

N30 G02 I10

N40 G03 J10

M30

The continuous path of axis with or without omitting of blocks is checked and detected by the CNC. Any further conditions must be ensured by the user itself and are not checked by the CNC.

Nesting of multiple commands optional execution on/off is not considered.

If simulation is turned on while execution is within OPTIONAL EXECUTION ON/OFF-sequence, the omitting is automatically delayed till execution has reached OPTIONAL EXECUTION OFF. This is necessary, because the marked sequence is just allowed to omit at all or not.


Clearing of backward storage

By the NC-command #BACKWARD STORAGE CLEAR the actual available backward storage can be cleared explicitly. Thereby it is ensured that afterwards it can not be moved further back than up to the clearing position in the program.

#BACKWARD STORAGE CLEAR (modal)

Programming example

%backward-storage

N000 G01 X0 F10000

N010 X100 Y123

N020 X100

N030 X200 Y10

N040 X300 Y20

N050 #BACKWARD STORAGE CLEAR

N051 #BACKWARD STORAGE CLEAR (test multiple clearing

N052 #BACKWARD STORAGE CLEAR (test multiple clearing

N060 X400 Y-20

N070 X500 Y-3

N060 #BACKWARD STORAGE CLEAR

N080 X444 Y10

N090 X333 Y3

N100 X222 Y10

N110 X111 Y3

N120 X000 Y10

N130 X-111 Y3

N140 #BACKWARD STORAGE CLEAR

N1000 M30

812_end


Tool change during active synchronous operation

For security reasons during active synchronous operation the adoption of new tool data (T (with implicit D), D or #TOOL DATA) generally is not allowed and is monitored by error message 20169. The locking can be influenced by the following NC command:

#FREE TOOL CHANGE ON | OFF (modal)

The NC command has to be programmed at the latest before the first tool change during active synchronous operation.The disabling of the locking has to be done with the keyword "ON".

The enabling of the locking of synchronous operation and tool change has to be done with the keyword "OFF". Furthermore at RESET and implicit at program end the NC command is deselected.

For compatibility and security reasons the locking of synchronous operation and tool change at program start also is always active (Default).

The error message 20169 is monitored in future, if at the same time the channel parameter P-CHAN-00100 (move_tool_offsets_directly) is active, because the direct moving of the tool offsets could lead to machine damages in the slave axes during active synchronous operation. This means, if #FREE TOOL CHANGE is used, the P-CHAN-00100 should be deselected.

Programming example

%TOOL_AXLINK

N05 X0 Y0 Z0 C100 G53 D0

N10 #AX LINK [1,C=X]

N15 #FREE TOOL CHANGE ON

N20 #AX LINK ON [1]

N30 X100 Y50 Z30

N40 D2

N50 X200 Y75 Z40

N60 D1

N65 X300 Y100

N70 #AX LINK OFF [1]

N75 #FREE TOOL CHANGE OFF

N70 X25 Y25 Z25 C25

N80 M30


Locking of program areas for block search

For block search in NC program any program areas can be locked by the command #BLOCKSEARCH LOCKED/RELEASED. If the start position of block search is located in one of this restricted areas, the error message P-ERR-21399 is output.

The block search lock also includes all local and global sub program calls of the corresponding area.

For nested locked areas the block search lock includes the area beginning from the first activation to the first deactivation (see example 2).

For further information to block search see the documentation [FCT-C6].

#BLOCKSEARCH LOCKED | RELEASED (modal)

Programming examples

Example 1:

In the program area N40N100 and all included sub programs for block search no start position may be selected.

%BLOCKSEARCH

N10 X0 Y0 Z0

N20 X10

N30 Y10

N40 #BLOCKSEARCH LOCKED

N50 X20

N60 Y20

N65 L GSP.nc

N70 Z20

N80 X30

N90 Z30

N100 #BLOCKSEARCH RELEASED

N110 Y30

N120 X40

N130 Z40

N999 M30

Example 2:

For the following nested areas the block search lock includes N40-N75.

%BLOCKSEARCH

N10 X0 Y0 Z0

N20 X10

N30 Y10

N40 #BLOCKSEARCH LOCKED

N50 X20

N55 #BLOCKSEARCH LOCKED

N60 Y20

N65 L GSP.nc

N70 Z20

N75 #BLOCKSEARCH RELEASED

N80 X30

N90 Z30

N100 #BLOCKSEARCH RELEASED

N110 Y30

N120 X40

N130 Z40

N999 M30


Programmable path override

This command allows, if required the different influencing of feed and rapid feed blocks in the NC program. The programmed override for path motions is active, if at least one axis is moving. Therefrom the real time influencing of the feed by the PLC is not affected

As a second function also a programmable axis override is available.

If for an axis, involved in path motions also an axis override is defined, the effective path override results from the multiplication of the both override values.

The function G166 suppresses the effect of programmed override values.

#OVERRIDE [FEED_FACT<expr>RAPID_FACT<expr>]

FEED_FACT<expr> Override factor for feed blocks [0,1% - 200%].

RAPID_FACT<expr> Override factor for rapid feed blocks [0,1% - 200%].

Programming example

%path_override

N10 G00 G90 X0 Y0 Z0

(Path override G01 122.765%, G00 155.7%)

N20 #OVERRIDE [FEED_FACT=122.765 RAPID_FACT=155.7]

N30 G01 X100 Y100 Z100 F1000 Effective feed=1227.65

(Path override G01, G00 100%)

N40 #OVERRIDE [FEED_FACT=100 RAPID_FACT=100]

N50 G01 X200 Y200 Z200 F1000 Effective feed=1000

M30


Drive independent switching of drive functions

In contrast to the SERCOS specific commands according to chapter 11.18 the following commands allow the drive independent setting of drive parameters. The parameters only can be set synchronously, this means the execution of the command takes place on interpolator level at the moment of processing. In the default setting the execution of the #DRIVE command is done parallel to the following processing of the NC program. This means, the program processing is not stopped. To stop the interpolation until the successful execution of the drive function, the parameter WAIT can be used.

The command #DRIVE WAIT SYN can be used, if the check of the successful execution of the drive function is only necessary at a subsequent time.

More:

button Synchronous writing

button Synchronous waiting for acknowledgement


Synchronous writing

#DRIVE WR SYN [ AX <a xis_name> | AXNR <expr> [ MOTOR<expr> ] [ PARAM_SET<expr> ]

KEY <expr> VAL <expr> [ WAIT ] ]

AX <axis_name> Name of the (drive) axis

AXNR<expr> Logical axis number of the (drive) axis, positive integer

MOTOR<expr> Selectable motor number in the drive amplifier during motor switching; positive integer.

PARAM_SET<expr> New parameter record in the drive amplifier; positive integer

KEY<string> Identification of the function to be addressed, see [2]

VAL<expr> Value to be transmitted, negative or positive integer

WAIT Stopping of interpolation and waiting for successful execution of drive function.

Without using this keyword, for the check of the successful execution of the drive function in the following NC program a #DRIVE WAIT SYN can be used.

For spindles during active continuous rotation no motor switching and no changing of the parameter record (MOTOR=<expr>, PARAM_SET=<expr>) may be programmed.


Synchronous waiting for acknowledgement

With the following command it is checked, if all previous #DRIVE WR SYN for an axis have been finished. The interpolator is stopped as long as all #DRIVE WR SYN have been executed in the drive. This is both valid for path axes and spindle axes.

#DRIVE WAIT SYN [ AX <axis_ name> | AXNR <expr> [ SWITCH_OK ] ]

AX <axis_name> Name of the (drive) axis

AXNR<expr> Logical axis number of the (drive) axis, positive integer

SWITCH_OK Check, if all previous #DRIVE WR SYN have been finished.

Programming examples

Synchronous writing with immediate waiting on acknowledgement:

%TOOL_AXLINK1

N05 X0 Y0 Z0

N10 #DRIVE WR SYN [AX=X MOTOR=2 PARAM_SET=4 KEY= Torque_limit VAL=400 WAIT]

N20 X100 Y50 Z30 G01 F3000

N30 X200 Y75 Z40

N65 X300 Y100

N70 X25 Y25 Z25 C25

Nxx

N80 M30

Synchronous writing with subsequent waiting on acknowledgement:

%TOOL_AXLINK2

N05 X0 Y0 Z0

N10 #DRIVE WR SYN [AX=X MOTOR=2 PARAM_SET=4 KEY=Torque_limit VAL=400]

N20 X100 Y50 Z30 G01 F3000

N30 X200 Y75 Z40

N60 #DRIVE WAIT SYN [AX=X SWITCH_OK]

N65 X300 Y100

N70 X25 Y25 Z25 C25

Nxx

N80 M30


Tool geometry compensation

Tool geometry is compensated concerning length, radius and axis shift. The corresponding tool geometry compensation data must be made available.

Tool compensation data are selected using D-word respectively if parametrized automatically with Tnn [1]-9.

D <expr> Selection of tool compensation (modal)

<expr> Number of the tool compensation data block. Positive integer

The D-word defines a tool data block that contains the following values:

- Tool length (perpendicular to main plane)

- Tool radius (in the main plane)

- Axis offset coordinates (in all axis directions)

- Measuring unit of the numerical statements (mm/Inch)

- Tool-validity code

- Tool dynamic data

The time of the effectiveness of the tool compensation data for the tool length (perpendicular to the main plane) and the axis offset coordinate (in the axis directions) is programmed by the channel parameter [1]-36.

Two modes can be distinguished:

- The compensating movement is executed directly at the D-word without programming of a traverse preparatory function.

- For security reasons the control only executes the compensating movement in the corresponding axis at the next absolute traverse block. (Default mode).

In G91-mode for the inclusion of tool compensation data following is important:

The programming of...

N10 D16

N20 G00 X0 G91

... must not cause any movement of the X-axis (correspond to relative movement of 0). Thus tool compensation data for an axis acts only when the next traverse information is programmed to be absolute (G90).

Please note for both modes together: The tool radius is transmitted to the tool radius compensation and influences the equidistant calculation. The compensating movement always take place combined with a traverse preparatory function.

The rules for the execution of the compensating movement are also valid for the deselection of the tool compensation.

D00 Deselection of tool compensation

More:

button Tool length compensation (TLC)

button Tool radius compensation (TRC)


Tool length compensation (TLC)

In the following example, the tool length compensation is carried out in Z-direction. While selecting the compensation data block D16 in the block N30, the compensation movement occurs in N30 in the Z-direction jointly with the traverse data block.

Programming example

N10 G01 F900 G17 (X-Y-Plane; length compensation in Z+ direction

N20 X150 Y10 Z10

N30 D16 Y40 Z15 ( Selection of length compensation D16 )

. ( Compensating movement is executed )

.

N100 D20 (Se lection of length compensation D20 )

. ( Compensating movement occurs only with )

. ( next traverse block in the Z-direction )

.

N200 G0 D0 X0 Y0 Z0 ( Deselection of TLC )

Compensation data block D0 : Length = 0 Radius = 0

. D16 : Length = 5 Radius = 5

.

D20 : Length = 12,5 Radius = 5

Fig. 12.1: Example for tool length compensation


Tool radius compensation (TRC)

Tool radius compensation (TRC) allows programming of the workpiece contour independently of the geometry of the tool. If TRC is selected (G41, G42), a tool path equidistant from this programmed tool contour is computed at distance "tool radius".

Tool radius compensation acts in the plane selected with G17, G18 or G19. The tool compensation blocks saved in the D-words (see chapter 12: "Tool geometry compensation") are used as tool compensation values.

Selection of a new D-word or writing variable V.G.WZ_AKT.R allows the tool radius to be changed even with TRC active. The change in tool radius is possible only together with a linear block.

When using negative tool radius the side of selection of TRC is changed automatically.

Fig. 12.2: Mechanism and terminology's of tool radius compensation

Overview of all TRC-relevant G-functions:

Selection/ Deselection

G40 TRC-Deselection (modal, Default)

G41 Selection of TRC left of contour (modal)

G42 Selection of TRC right of contour (modal)

Selection/ deselection methods:

G138 Direct selection/ deselection of TRC (modal)

G139 Indirect selection/ deselection of TRC (modal, Default)

G237 Perpendicular selection/ deselection of TRC (modal)

G238 Inner corner selection of TRC (modal)

G239 Direct selection/deselection of TRC without a block (modal)

G05 Tangential selection/ deselection of TRC (non-modal)

812_start

During active TRC the change of a modal selection method directly to G238 is not allowed.

812_end

Selection of transitions:

G25 Linear transition (modal, Default)

G26 Circular transition (modal)

Feed adaption:

G10 Constant feed (modal, Default)

G11 Adapted feed (modal)

Contour masking:

G140 Deselection of contour masking (modal, Default)

G141 Selection of contour masking (modal)

Programming examples

Presentation of the different possibilities of selection modes at the use of tool radius compensation. There are shown the commands for direct, indirect and tangential selection/ deselection of TRC (G139/G138/G05) in combination with the TRC-transition types for linear and circular transition (G25/G26).

The test programs are executed with a tool radius of 10 mm.

Example 1 | G138 | G139 | G05
G25 | Path 1 | Path 2 | Path 3

%WZKG25 (Contour for G25)

N10 G00 G90 T1 D1 X0 Y0 Z0 G17

(Presentation of contour)

N15 G01 X20 Y20 F1000

N20 G91

N25 G1 X10

N30 X5 Y-5

N35 Y-5

N40 X-5 Y-3

N45 G01 G90 X0 Y0 F1000

(Path 1)

N100 G138 G41 (Direct selection and TRC left of contour)

N105 G01 X20 Y20 F1000 (Compensation movement after G41)

N110 G25 (G25 linear transition)

N115 G1 G91 X10

N120 X5 Y-5

N125 Y-5

N130 X-5 Y-3

N135 G138 G40 (Direct deselection and TRC-off)

N140 G01 G90 X0 Y0 F1000 (Compensation movement after G40)

(Path 2)

N200 G139 G41 (Indirect selection and TRC left of contour)

N205 G01 X20 Y20 F1000 (Compensation movement after G41)

N210 G25 (G25 linear transition)

N215 G1 G91 X10

N220 X5 Y-5

N225 Y-5

N230 X-5 Y-3

N235 G139 G40 (Indirect deselection and TRC-off)

N240 G01 G90 X0 Y0 F1000 (Compensation movement after G40)

(Path 3)

N300 G05 G41 (Tangential selection and TRC left of contour)

N305 G01 X20 Y20 F1000 (Compensation movement after G41)

N310 G25 (G25 linear transition)

N315 G1 G91X10

N320X5 Y-5

N325 Y-5

N330 X-5 Y-3

N335 G05 G40 (Tangential deselection and TRC-off)

N340 G01 X20 Y20 F1000 (Compensation movement after G41)

N999 M30

Example 2 | G138 | G139 | G05
G26 | Path 4 | Path 5 | Path 6

%WZKG26 (Contour for G26)

N10 G00 G90 T1 D1 X0 Y0 Z0 G17

(Presentation of contour)

N15 G01 X20 Y20 F1000

N20 G91

N25 G1 X10

N30 X5 Y-5

N35 Y-5

N40 X-5 Y-3

N45 G01 G90 X0 Y0 F1000

(Path 4)

N400 G138 G41 (Direct selection and TRC left of contour)

N405 G01 X20 Y20 F1000 (Compensation movement after G41)

N410 G26 (G26 circular transition)

N415 G1 G91 X10

N420 X5 Y-5

N425 Y-5

N430 X-5 Y-3

N435 G138 G40 (Direct deselection and TRC-off)

N440 G01 G90 X0 Y0 F1000 (Compensation movement after G40)

(Path 5)

N500 G139 G41 (Indirect selection and TRC left of contour)

N505 G01 X20 Y20 F1000 (Compensation movement after G41)

N510 G26 (G26 circular transition)

N515 G1 G91 X10

N520 X5 Y-5

N525 Y-5

N530 X-5 Y-3

N535 G139 G40 (Indirect deselection and TRC-off)

N540 G01 G90 X0 Y0 F1000 (Compensation movement after G40)

(Path 6)

N600 G05 G41 (Tangential selection and TRC left of contour)

N605 G01 X20 Y20 F1000 (Compensation movement after G41)

N610 G26 (G26 circular transition)

N615 G1 G91X10

N620 X5 Y-5

N625 Y-5

N630 X-5 Y-3

N635 G05 G40 (Tangential deselection and TRC-off)

N640 G01 X20 Y20 F1000 (Compensation movement after G41)

N999 M30

Change of tool data:

Programming example

:

N30 G0 D0 X0 Y0 Z0 G17 (X-Y-Plane)

N40 G0 D100 X10 Y10 (Selection of TLC)

N50 G1 Z0

N60 G0 Z100

N70 G41 (Selection of TRC with data block D100)

N80 G1 Z0

N90 G2 X10 Y10 I-15 (Full circle with radius 15)

N100 G0 Z100

N110 D2 Z200 (Other compensation data block, i.e.)

(other values for TLC and TRC)

N120 G1 Z0 (Here compensatory movement of TLC occurs)

N130 G1 X20 Y20 (Compensatory movement of TRC)

N140 G02 X10 Y10 I-15 (The TRC is now executed with the data block)

N150 G0 Z100

N160 G40 (Deselection of TRC)

N170 X0

:

Dynamic change of tool radius:

Another possibility to alter the tool radius is provided by the assignment through variables (see also chapter 0). By this means, for instance, the wear and tear of grinding tools could be compensated during the traverse blocks.

Programming example

N00 G1 G90 X0 D6 F5

N10 G41 G26 (Selection of TRC)

N20 X0 Y250 (Starting point)

N30 V.P.VERSCHLEISS = 0.010

N100 $FOR V.P.LAUF = 0,100,10 (Grinding cycle)

N110 X300

N120 Y200

N130 X0

N140 Y250 (Tool radius is always getting smaller)

N150 V.G.WZ_AKT.R = V.G.WZ_AKT.R - V.P.VERSCHLEISS

N160 $ENDFOR

N200 G40 X300 (De-selection of TRC)

N999 M30

More:

button Direct/ indirect selection (G41/G42) of TRC

button Perpendicular selection and deselection (G237) of TRC

button Inner corner selection (G238) of TRC

button Direct selection/deselection (G239) of TRC without a block

button Generation of compensation blocks

button Behavior during contour change

button Departing blocks at deselection of TRC

button Selection and deselection of TRC in tangential mode

button Limits of TRC

button Programmable additional options


Direct/ indirect selection (G41/G42) of TRC

With the next moving block in the part program during direct or indirect selected TRC in the related correction plane an approach block is generated.

Approach blocks can only be generated for linear traverse blocks, that means for the contour combinations:

Straight - Straight

Straight - Circular

A selection of the TRC under a contour combination

Circular - Straight

Circular - Circular

leads to an error message.

When selecting TRC, it is possible to select an alternative approach strategy (direct selection of the TRC) with G138, besides the standard approach strategy (indirect selection of TRC).

The following figures show all possible approach blocks regarding the permitted contour transitions. Two NC-blocks NC10 and NC20 are respectively illustrated for the three relevant contour transition angles.

Combination type 1: 0° < ß ≤ 180° | Combination type 2: 0° < ß ≤ 180°
Combination type 1: 180° < β ≤ 270° | Combination type 2: 180° < ß ≤ 270°
Combination type 1: 270° < ß ≤ 360° | Combination type 2: 270° < ß ≤ 360°

Fig. 12.3: Examples for approach blocks for indirect radius compensation with linear transition.

Combination type 1: 0° < ß ≤ 180° | Combination type 2: 0° < ß ≤ 180°
Combination type 1: 180° < β ≤ 270° | Combination type 2: 180° < ß ≤ 270°
Combination type 1: 270° < ß ≤ 360° | Combination type 2: 270° < ß ≤ 360°

Fig. 12.4: Examples for approach blocks for indirect radius compensation with transition circles

Combination type 1: 0° < ß ≤ 180° | Combination type 2: 0° < ß ≤ 180°
Combination type 1: 180° < ß ≤ 270° | Combination type 2: 180° < ß ≤ 270°
Combination type 1: 270° < ß ≤ 360° | Combination type 2: 270° < ß ≤ 360°

Fig. 12.5: Examples for approach blocks for direct radius compensation (independent of the type of transition)


Perpendicular selection and deselection (G237) of TRC

In the case of use of the perpendicular mode of tool radius compensation there are no restrictions concerning the sequence of motion blocks like for the direct or indirect mode.

Its possible to enable the tool radius compensation for an individual motion block.

The selection of perpendicular tool radius compensation adds a linear motion block orthogonal to the programmed path. This block produces the distance between the corrected and the programmed path. The output of this block takes place before the first programmed motion block.

The deselection of the perpendicular tool radius compensation adds another linear motion block orthogonal to the programmed path. This motion block reverses the distance between the corrected and the programmed path.

Programming example

%bsp01.nc

N10 G00 X0 Y0 Z0 G17

N20 X10Y10

N30 V.G.WZ_AKT.R=5 (Tool radius)

N40 G237 (Activation of perpendicular selection)

; Corrected path

N50 G42 (Selection of TRC on the right)

N60 G03 X60Y60J50F1000

N70 G01 Y100

N80 G03 X10Y150J50

N90 G40 (Deselection of TRC)

; Presentation of the original contour

N100 G00 X0Y0

N110 X10Y10

N120 G03 X60Y60J50F1000

N130 G01 Y100

N140 G03 X10Y150J50

N150 G00 X0Y0

N999 M30

Fig. 12.6: Programming example bsp01.nc

More:

button Technology functions at perpendicular selection/ deselection

button Technology function in single block


Technology functions at perpendicular selection/ deselection

The placement of technology functions in the NC program is with perpendicular selection or deselection of special importance, because this determines the output time.

The alignment of selection block, technology block and the first motion block is the decisive factor for the output time while perpendicular selection.

The alignment of technology block and the last corrected motion block is the decisive factor for the output time while perpendicular deselection.

The following examples and corresponding pictures will point out this connection.

Programming example

%bsp02.nc

N10 G00 X0 Y0 Z0 G17

N20 F9000

N30 V.G.WZ_AKT.R=5 (Tool radius)

N40 G237 (Activation of perpendicular selection)

N50 G91 (Relative programming)

N60 G01 X30 Y10

; Corrected path

N50 G41 M7 X20 Y70 (Selection of TRC on the left)

N55 M8

N60 G03 X60 I30

N70 G01 X30

N80 X25 Y-20

N85 M9

N90 G40 (Deselection of TRC)

N100 G90 X200 Y0 (Absolute programming)

N110 X0

; Presentation of the original contour

N200 G91 (Relative programming)

N210 G01 X30 Y10

N220 X20 Y70

N230 G03 X60 I30

N240 G01 X30

N250 X25 Y-20

N260 G90 X200 Y0 (Absolute programming)

N270 G00 X0

N999 M30

The output of the technology function M9 in the subsequent picture happens directly before the output of the perpendicular deselection block. The placement of the technology function must be between the last corrected motion block and the perpendicular deselection of tool radius compensation.

Fig. 12. 7 : Programming example bsp02.nc

Programming example

%bsp03.nc

N10 G00 X0 Y0 Z0 G17

N20 F9000

N30 V.G.WZ_AKT.R=5 (Tool radius)

N40 G237 (Activation of perpendicular selection)

N50 G91 (Relative programming)

N60 G01 X30 Y10

; Corrected path

N50 G41 M7 (Selection of TRC on the left)

N55 M8 X20 Y70

N60 M9 G03 X60 I30

N70 G01 X30

N80 X25 Y-20

N90 G40 (Deselection of TRC)

N100 G90 X200 Y0 (Absolute programming)

N110 X0

; Presentation of the original contour

N200 G91 (Relative programming)

N210 G01 X30 Y10

N220 X20 Y70

N230 G03 X60 I30

N240 G01 X30

N250 X25 Y-20

N260 G90 X200 Y0 (Absolute programming)

N270 G00 X0

N999 M30

The technology function M8 is executed after the selection block. To achieve this, the technology function must be programmed in another block than the selection block. Furthermore no motion block may be programmed between the selection block and the technology function.

Fig. 12. 8 : Programming example bsp03.nc

Programming example

%bsp04.nc

N10 G00 X0 Y0 Z0 G17

N20 F9000

N30 V.G.WZ_AKT.R=5 (Tool radius)

N40 G237 (Activation of perpendicular selection)

N50 G91 (Relative programming)

N60 G01 X30 Y10

; Corrected path

N50 G41 (Selection of TRC on the left)

N51 M7

N52 M8

N53 M8

N55 X20 Y70

N60 G03 X60 I30

N70 G01 X30

N80 X25 Y-20

N90 G40 (Deselection of TRC)

N100 G90 X200 Y0 (Absolute programming)

N110 X0

; Presentation of the original contour

N200 G91 (Relative programming)

N210 G01 X30 Y10

N220 X20 Y70

N230 G03 X60 I30

N240 G01 X30

N250 X25 Y-20

N260 G90 X200 Y0 (Absolute programming)

N270 G00 X0

N999 M30

Fig. 12. 9 : Programming example bsp04.nc


Technology function in single block

Programming example

%bsp05.nc

N10 G00 X0 Y0 Z0 G17

N20 F9000

N30 V.G.WZ_AKT.R=5 (Tool radius)

N40 G237 (Activation of perpendicular selection)

N60 G01 X10 Y10

; Corrected path

N50 G41 M7 (Selection of TRC on the left)

N55 M8 X70 Y30

N60 M7

N90 G40 (Deselection of TRC)

N100 G90 X100 Y0

N110 X0

; Presentation of the original contour

N210 G01 X10 Y10

N220 X70 Y30

N240 X100 Y0

N270 G00 X0

N999 M30

Fig. 12. 10 : Programming example bsp05.nc

812_start


Inner corner selection (G238) of TRC

Using inner corner selection means that the TRC should be selected at an inner corner of a closed contour.

In connection with the inner corner selection the following designations are used:

q Selection block: Linear motion block which starts at the point of selection

q First motion block: Motion block that starts at the end of the selection block, this block is also the second motion block after selection of TRC

q Last motion block: last motion block is the motion block before the deselection of TRC appears

Programming example

In contours like a star the TRC should be selected in a pointed inner corner.

%musterstern.nc

N1 G74 X1Y2Z3

N2 G17 G00 X0Y0Z0 G90

N4 F10000

(Display of the contour)

N100 G01 X0 Y100

N110 X-20 Y20

N120 X-100 Y0

N130 X-20 Y-20

N140 X0 Y-100

N150 X20 Y-20

N160 X100 Y0

N170 X20 Y20

N180 G01 X0 Y100

N200 G00 X0Y0

(Display of the path of tool)

N210 G238 (Activation of inner corner selection)

N220 V.G.WZR = 10 (Determine the radius of tool)

N230 G41 (Selection of TRC at the left hand side of the contour)

N240 G01 X0 Y100 (Selection block)

N310 X-20 Y20

N320 X-100 Y0

N330 X-20 Y-20

N340 X0 Y-100

N350 X20 Y-20

N360 X100 Y0

N370 X20 Y20

N380 G01 X0 Y100

N390 G40 (Deselection of TRC)

N400 G00 X0Y0

N999 M30

Annotation:

The command of selection G41 or G42 take place at point P1, point P2 is the endpoint of the first linear block. This first linear block is the selection block. This point has to be simultaneous also the endpoint of the last motion block before deselection to get a closed contour.

The outer (blue) represented process is the programmed contour, the inner (red) is the path of the tool.

Remark:

After the programmed G40 of the deselection of TRC no monitoring takes place on contour injury with the following movement block.

More:

button Restrictions of the inner corner selection


Restrictions of the inner corner selection

q The programmed contour must be closed.

q The last motion block of contour may not be a full circle.

q The first motion block of contour must be a linear motion block as well as the motion block after deselection of TRC .

q The point P1 must at least have the distance of the tool radius to all elements of the contour.

q The selection block may not cross an contour element, with exception of the first and the last motion block.

q Changing the side of selection of TRC while TRC is active is not permissible.

q Changing the radius of tool while inner corner selection is active is not permissible.

q The selection side of the TRC must be selected from the position of the selection in such a way that the tool does not cross the programmed contour.

q The enclosed angle of the first and the second motion block after the selection of TRC may not exceed 180 degrees.

Causes for the restriction of angle:

In the graphic the TRC should be selected at the right hand side of the contour. With an angle about 180 degrees between the last and the first motion block of the contour the first point of the equidistant path will be determined with the direct method of TRC. This first point of the equidistant path is P3 in the diagram. The diagram clarifies that the staight line between the points P1 and P3 hurts the red drawn contour.

The angle designated in the diagram with starting angle may amount up to 180 degrees. In this range of angle the cotour is not damaged. The shown angle is larger than 180 degrees. The alternative point of selection P1* prevents this contour damage.

With injury of one of the restrictions an appropriate error is created.


Direct selection/deselection (G239) of TRC without a block

With selected G239 the TRC start-up motion is identical to G138 (directly).

The deselection is done on G40. The TRC is deselected by overtaking the coordinates of the last equidistant point as the latest current position. A following motion block for reducing the tool radius distance is not required.

Programming example

%G239.nc

N010 G239 G25 (TRC mode and transition type)

N020 V.G.WZ_AKT.R =10

N030 G0 X0 Y0 Z0 F10000

N040 G41 G01 X10 Y20 (TRC selection)

N050 G1 X50

N060 G1 X60 Y30

N070 G1 X70

N080 G40 (TRC deselection)

N090 G0 X70 Y35

N100 G0 X80

N110 M30


Generation of compensation blocks

Generation of compensation blocks is not subject to restrictions in respect of the NC-block sequence, such as those applicable to direct or indirect TRC selection. The next block after the current block is used for computation of contour transitions between the programmed NC-blocks.

The contour transition is on straight lines (G25) by default  or optionally on circular arcs (G26)  with the option of feedrate adaptation (G10/G11).

The table below and the supplementary diagrams show all possible contour transitions, whereby both possible transitions (linear and circular intermediate blocks) are shown.

Insertion of blocks by the TRC LIN: Linear block, CIR: Circular block G25: Insertion of linear transition G26: Insertion of circular transition (2 LIN : The TRC inserts at transition 2 linear blocks).
 | Angle range
 | 0° to 180° |  | 180° to 270° |  | 270° to 360°
progr. block sequence | G25 | G26 | G25 | G26 | G25 | G26
LIN-LIN | 0 | 0 | 0 | 1 CIR | 1 LIN | 1 CIR
LIN-CIR/CIR-LIN | 0 | 0 | 1 LIN | 1 CIR | 2 LIN | 1 CIR
CIR-CIR | 0 | 0 | 2 LIN | 1 CIR | 3 LIN | 1 CIR

Fig. 12.11: Example for contour transition to a linear for the block-sequence linear-linear

Fig. 12.12: Example for contour transition to a circular arc for the block-sequence linear-linear

Combination type 1: 0° < ß ≤ 180°, G41 | Combination type 3: 0° < ß ≤ 180°, G41
Combination type 2: 0° < ß ≤ 180°, G41 | Combination type 4: 0° < ß ≤ 180°, G41

Fig. 12.13: TRC-transitions: combination cases for 0° ß 180 ° (independent of G25 or G26, since no compensation blocks are added)

Combination type 1: 180° < β ≤ 270°, G41 | Combination type 3: 180° < β ≤ 270°, G41
Combination type 2: 180° < β ≤ 270°, G41 | Combination type 4: 180° < β ≤ 270°, G41

Fig. 12.14: TRC-transitions: combination cases for 180° ß 270°with linear interim blocks

Combination type 1: 270° < ß ≤ 360°, G41 | Combination type 3: 270° < ß ≤ 360°, G41
Combination type 2: 270° < ß ≤ 360°, G41 | Combination type 4: 270° < ß ≤ 360°, G41

Fig. 12.15: TRC transitions: Combination cases for 270° ß 360° with linear interim blocks

Combination type 1: 180° < β ≤ 270° , G41, G26 | Combination type 3: 180° < β ≤ 270° , G41, G26
Combination type 2: 180° < β ≤ 270° , G41, G26 | Combination type 4: 180° < β ≤ 270° , G41, G26

Fig. 12.16: TRC transitions: Combination cases for 180° ß 270° with circular interim blocks

Combination type 1: 270° < ß ≤ 360°, G41, G26 | Combination type 3: 270° < ß ≤ 360°, G41, G26
Combination type 2: 270° < ß ≤ 360°, G41, G26 | Combination type 4: 270° < ß ≤ 360°, G41, G26

Fig. 12.17: TRC transitions: Combination cases for 270° ß 360° with circular interim blocks


Behavior during contour change

A direct contour change, e.g. from G41 to G42 is possible without any explicit deselection (G40) of TRC. The contour change corresponds to a TRC-deselection and selection. Contour change should only be carried out for linear NC-blocks for departing and approaching blocks. Directly before and after contour change circular blocks are also possible.

If during contour change a circular block is programmed then a warning is output and the circular block is transformed into a linear block.

Programming example

N05 G01 Y10 F100 G41 V.G.WZR=2 (Linear block with select. of TRC left)

(of the contour)

N10 X20 Y25

N20 X40 G42 (Linear block with select. of TRC right)

(of the contour)

N30 X60 Y10

N40 X0 Y0 G40 (Deselection of TRC)

N50 M30

Fig. 12.18: Example of a selection change without deselection


Departing blocks at deselection of TRC

Departing blocks are like approach blocks possible only for linear traverse blocks, i.e. during contour transitions: Straight line - straight line and circle - straight line. During the generation of departing blocks, two different departing strategies are possible. The standard type of departing blocks is shown in the following figure. The alternative departing strategy is selected with G138 (then G138 and G40 are present together in the same block). The alternative departing strategies are shown in the succeeding figure.

Combination type 1: 0° < ß ≤ 180° | Combination type 2: 0° < ß ≤ 180°
Combination type 1: 0° < ß ≤ 180° | Combination type 2: 0° < ß ≤ 180°
Combination type 1: 0° < ß ≤ 180° | Combination type 2: 0° < ß ≤ 180°

Fig. 12.19: Departing blocks of TRC without G138

Combination type 1: 0°<ß ≤ 180° | Combination type 2: 0°<ß ≤ 180°
Combination type 1: 180°<ß ≤ 270° | Combination type 2: 180°<ß ≤ 270°
Combination type 1: 270°<ß ≤ 360° | Combination type 2: 270°<ß ≤ 360°

Fig. 12.20: Departing blocks of TRC with G138 (alternative departing strategy)


Selection and deselection of TRC in tangential mode

During the direct selection/deselection mode of TRC, generally, a kink in the path contour arises at the time of commencement of machining. For angles greater than 180°, additionally the contour of the block, following the selected one and one before the deselection, gets damaged.

For avoiding this contour damages during direct selection/deselection mode, as also for minimizing the occurring jerk at the kink points on the path, the tangential entry and exiting offers help.

G05 must be programmed in conjunction with G40, G41, G42 in the same block. Out of this it will be derived whether a tangential transition should take place at the beginning or at the end of the contour.

From the momentary position, the next contour element G01, G02... is approached tangentially in a circle with programmed feedrate; where necessary, a feed matching should take place with G10/G11.

G05 in conjunction with G41 or G42 cause tangential entry at contour beginning, G05 with G40 under active G41/G42 a tangential exit at contour end. Thus, the selection/de-selection block is converted into a circular block.

The movement blocks triggered by the G05-function, during selection and deselection of the TRC, are demonstrated in Fig. 12.15 and Fig. 12.16. Totally, four courses are demonstrated, which emerge under similar programming through different starting points (P1,P1').

Selection in tangential mode

The selection point (AnP) is computed as applicable in the case of conventional direct calls. On the basis of the orientation of the first selected block and the position of the starting point, the direction of rotation of the circular-selection-block is specified. The circle center point (MP) emerges from the intersecting point of the center-perpendicular from starting point (P1 or P1') and selection point (AnP) and the straight line starting point of the approaching block (P2) -selection point (AnP).

De-selection in tangential mode

The last corrected endpoint (AbP), herein after referred to as last selection point, is computed as in the case of the conventional direct de-selection mode. Considering the orientation of the last selected block and the position of the de-selection point (P4 or P4') the direction of rotation of the circular de-selection block is specified. The circular center point emerges from the intersection point of the center perpendiculars to the connecting line of the last selection point (AbP) and the de-selection point and the straight line. Last selection point (AbP) - last programmed point (P3) prior to the de-selection.

Fig. 12.21: Selection and deselection of TRC in tangential mode

Fig. 12.22: Selection and deselection of TRC in tangential mode


Limits of TRC

For the calculation of intermediate blocks, the TRC takes into account the actual and two further relevant NC-blocks. "Relevant" means, traverse blocks in the chosen main plane in which the tool radius compensation takes place. "Non-relevant" would be for instance, techno-blocks, time delays (G04) or traverse movements with one axis perpendicular to the main plane. If within these three blocks an intermediate block is calculated, which would run in a direction contrary to the programmed profile, then thereby a contour violation is recognized. In Fig. 12.24 an example in this context is demonstrated.

If a bottleneck position is caused through one or more blocks, which are farther than 3 blocks away from actual block, then, this contour violation is not recognized by the TRC. For this case, an illustration is given in Fig. 12.25.

Fig. 12.23: Example for detected contour damage

Fig. 12.24: Example for non-detected contour damage

812_start


Programmable additional options

The following command allows the programming of optional TRC functions.

After selection this optional TRC functions are active until main program end or RESET, but they can also be deselected anytime during running NC-program.

#TRC [ [ CONV_CIR_TO_LIN<expr> ] [ KERF_MASKING<expr> ] [ REVERSE<expr> ]

[ IGNORE_CONT_DAMAGE<expr>] [ REMOVE_MASKED_BLOCKS <expr> ] ]

[ EXT_ANGLE_BLOCK_INTERSECTION<expr>] ]

CONV_CIR_TO_LIN<expr> This parameter controls the conversion of circular blocks with a programmed radius less than the tool radius directly to a linear block. Precondition for the effectiveness is an active contour masking process (G141).

Value | Significance
0 | No conversion of circular blocks (Default).
1 | Conversion of circular blocks into linear blocks.

KERF_MASKING<expr> This parameter explicitly enables the masking of kerfs.

Value | Significance
0 | No kerf masking (Default).
1 | Kerf masking active.

Using contour masking this TRC option is implicitly activated and/or deactivated.

The functionality of kerf masking is based on shifting of a programmed point when a kerf cannot be worked with a tool.

REVERSE<expr> This parameter allows the direct change of selection side without deselection (G41<->G42) while TRC is active.

Value | Significance
0 | No direct change of selection side (Default).
1 | Direct change of selection side active.

The change of selection side always takes place in the point of reversal. The conditions for this are with linear motion blocks accurately reversing movements.

Using circular motion blocks the tangents of both circles must be identically in the point of reversal and the direction of both circles must be different.

IGNORE_CONT_DAMAGE<expr> By this parameter contour damages are explicitly ignored. As a precondition for the effectivity the contour masking process has to be active (G141).

Value | Significance
0 | No ignoring of contour damages (Default).
1 | Ignoring of contour damages.

REMOVE_MASKED_BLOCKS <expr> With this parameter detected loops in a contour can be deleted by the contour masking. Both motion blocks for the determination of the closed loop are also deleted.

Pure motions of slave axes will be preserved. From view of TRC a motion of the 3rd main axis belongs to these motions.

The parameter is especially for contours with very short motion blocks.

An active contour masking (G141) is the condition for the effectivity of the parameter.

Value | Significance
0 | Closed contour loops are not deleted (Default).
1 | Closed contour loops are deleted.

Motion blocks in the contour loop are completely deleted. There is no examination in these motion blocks with regard to existing additional movements in slave axes.

EXT_ANGLE_BLOCK_INTERSECTION<expr> With this parameter the limit of the transition angle between two motion blocks can be switched from 180 degree to 181 degree. This avoids the creation of additional TRC transition blocks in this angle range.

The value of the limit itself can not be modified.

Value | Significance
0 | Limit of transition angle is 180 degree (Default).
1 | Limit of transition angle is 181 degree.

Programming examples

C onversion of circular blocks:

N1000 V.G.WZ_AKT.R=1 (Tool radius)

N2300 G140 (Deactivate contour masking)

....

N2450 #TRC[CONV_CIR_TO_LIN=1] (Activate parameter)

N2500 G41 (Selection of TRC left of the contour)

...

(Circular element with radius less than the tool radius)

N2550 G03 X3557.83 Y-577.61 I0.00 J0.60

(no direct conversion from circular to a linear block)

...

N3000 G141 (Activate contour masking)

...

(Circular element with radius less than the tool radius)

N3550 G03 X3557.83 Y-577.61 I0.00 J0.60

(direct conversion from circular to a linear block)

...

N3600 G40 (Deselection of TRC)

Direct change of selection side:

...

N090 G90

N100 #TRC[REVERSE=1]

N110 G00 X0 Y0

N120 G01 X100 Y100

N130 G41 G01 X150 (Selection of TRC left)

N140 G01 X250

N150 G01 Y200 (Point of reversal)

N160 G42 (Change side of selection of TRC to right)

N170 G01 X100

N180 G01 X100Y150

N160 G40 G01 X0

N170 G01 Y0

...


Variables and calculation of variables

Under variables, on the one hand an internal data of the decoder with a fixed name assignment is to be understood, and on the other hand there are self-defined variables, whose designation is essentially freely selectable. Excepting external variables (V.E...) their validity and use is limited exclusively to the particular NC channel.

General syntax is:

V. <NAME_1>. <NAME_2>. <NAME_3>.{<NAME_n>.}

V. indicates the accessing of the variables

<NAME_1>. the global data designation:

"A." represents axis-specific variables,

"SPDL." represents spindle-specific variables,

"G." represents inter-axis, globally valid variables,

"E." represents external variables,

"P." represents self-defined, non-inter-program, non-global variables,

"L." represents self-defined, non-inter-program, local variables,

"S." represents self-defined, inter-program, global variables.

<NAME_2>. specifies the data name

<NAME_3>. e.g. the index, if several data of the same kind are to be distinguishable.

Programming of the axis identification

The last identification code represents the axis-code of axis-specific and a few of the group-specific variables. Thereby the designations

".X" or "[0]",

".Y" or "[1]",

".Z" or "[2]"

are to be optionally used, if in the channel parameters [1]-27 the name "X" is assigned to the axis with the index 0, the name "Y" to the axis with the index 1 and the name "Z" to the axis with index 2.

Example: Absolute coordinate of the X-axis:

V.A.ABS.X or V.A.ABS[0]

Similar for spindle specific variables the spindle names or the corresponding indices according to the channel parameter data set are to be used.

".S" or "[0]",

".S2" or "[1]",

Example: Logical axis number of the S-spindle:

V.SPDL.LOG_AX_NR.S or V.SPDL.LOG_AX_NR[0]

Programming example

Both lines bring about a linear interpolation in X-direction around the value of the variables V.A.BZP.Y (coordinate preset in Y-direction).

N10 G92 X0 Y40 Z0 (Position preset)

N20 G91 G01 F1000 XV.A.BZP.Y

N30 XV.A.BZP[1] (here: Axis index 1 == Y )

N40 M30

The content can be read from all variables and to a few of them also a value can be assigned. The access type is firmly given for each variable, however generally only a reading access is allowed. Because for most of the variables a writing access is not practical.

Programming example

Here, the 2. zero offset vector for the axis with the index 1 is assigned with the value 100:

N10 V.G.NP[2].V[1] = 100

The EXIST-function (see chapter 2.6.1.3) checks, if a variable generally is available.

Programming examples

By the EXIST-request on an axis specific variable it is checked, if in NC-channel a special axis generally is available.

...

N10 G90 Y0

N20 $IF EXIST[V.A.LOG_AX_NR.X] == TRUE

N30 X-10 (X-axis is in channel, move to position 10)

N40 $ELSE

N50 #CALL AX [X,1,0] (X-axis is not in channel, first request axis)

N60 $ENDIF

...

M30

In a first step before the access on an external variable it is checked, weather the access generally is possible:

...

N10 G90 Y0

N20 $IF EXIST[V.E.POS_1] == TRUE

N30 XV.E.POS_1 (Move X-axis on position POS_1)

N40 $ELSE

N50 #MSG ["V.E.POS_1 not available!"] (Create message and stop)

N55 M0

N60 $ENDIF

...

M30

More:

button Axis specific variables (V.A.)

button Spindle specific variables (V.SPDL.)

button Global variables (V.G.)

button Self-defined variables

button External variables (V.E.)


Axis specific variables (V.A.)

The code for axis-specific variables is "V.A...".

V.A.-variables can only be programmed for linear and rotatory axes, but not for spindles.

V.A.<var_name> | Significance |  | Data type |  | Unit of In/ Output | Enabled access R ead / Write
MENT.X | Mental coordinate of the previous NC-block ( see chapter Mirroring G20-G23 ) |  | Real |  | [mm] [inch] | R
PROG.X | Programmed coordinate of the previous NC block During active contour rotation (#ROTATION) the variable delivers the coordinate value mapped on the machine axes. |  | Real |  | [mm] [inch] | R
ABS.X | Absolute coordinate of the previous NC block respectively currently absolute coordinate after NC command #CHANNEL INIT in the currently active coordinate system each. |  | Real |  | [mm] [inch] | R
ACT_POS.X | Current actual position in the present coordinate system without any offsets |  | Real |  | [mm] [inch] | R
-SWE.X | Current effective negative software limit switch |  | Real |  | [mm] [inch] | R
+SWE.X | Current effective positive software limit switch |  | Real |  | [mm] [inch] | R
-SWE_MDS.X | Configurated negative software limit switch (acc. to machine parameter [2]-10) |  | Real |  | [mm] [inch] | R
+SWE_MDS.X | Configurated positive software limit switch (acc. to machine parameter [2]-11) |  | Real |  | [mm] [inch] | R
REF.X | Machine reference point (is documented only after successful machine reference search) |  | Real |  | [mm] [inch] | R
BZP.X | Coordinate preset |  | Real |  | [mm] [inch] | R
PZV.X | Machine table offset |  | Real |  | [mm] [inch] | R
MESS.X | After successful measuring traverse the variable (measured value) gives the axis-specific coordinate in which all re-locations are included (see programming example). |  | Real |  | [mm] [inch] | R
MOFFS.X | Measurement offset |  | Real |  | [mm] [inch] | R
MERF.X | Measurement traverse completed ? If yes, then 1 |  | Boolean |  | 0 , 1 | R
MEIN.X | Included measurement offset |  | Real |  | [mm] [inch] | R
RERF.X | Machine reference search completed ? If yes, then 1 |  | Boolean |  | 0 , 1 | R
SOFFS.X | Moving path during manual operation. Useful only combined with NC command #GET IPO OFFSET |  | Real |  | [mm] [inch] | R
MODE.X | Current axis mode |  | Integer |  | - | R
MODULO_VALUE.X | Modulo range |  | Real |  | [°] | R
LOG_AX_NR.X | Logical axis number of an axis |  | Integer |  | - | R
AX_LIST_NAME.X | Configurated axis name ( acc. to machine parameter [2]-18) |  | String |  | - | R
MIRROR.X | Mirror mode of the axis: (1: no mirroring -1: axis is mirrored) | Integer |  | - |  | R
WCS.X MCS.X | Conversion between machine coordinates (MCS) and work peace coordinates (WCS). Only useful in combination with the NC commands #WCS TO MCS and #MCS TO WCS | Real |  | [mm] [inch] |  | R / W

In the use of strings for axis names (for instance X_SCHLITTEN see also chapter 3.1: axis-commands) these axis names are to be used for identifying the variables.

Example: V.A.MENT.X_SCHLITTEN

Programming example

The last block causes positioning in X to 148 (= 98 + 50) and in Y to 2

N10 G90 G92 X50

N20 G100 X100 ( Measurement traverse , measurement interrupt)
(occurs 2mm before the target )

N30 G90 G92 X0

N40 XV.A.MESS.X YV.A.MOFFS.X


Spindle specific variables (V.SPDL.)

The code for spindle-specific variables is "V.SPDL. ...".

V.SPDL.<var_name> | Significance | Data type | Unit of In/ Output | Enabled access R ead / Write
LOG_AX_NR.S | Logical axis number of a spindle | Integer | - | R
PLC_CONTROL.S | Is spindle a PLC spindle? If yes, then 1 | Boolean | 0 , 1 | R
NBR_IN_CHANNEL | Total number of available spindles in the current NC channel | Integer | - | R
M_FCT_FREE | How is the classification of the M functions M3, M4, M5, M19? Explicitly defined as spindle M functions: 0 Free available for other techno functions: 1 Caution: Write access causes permanent actualisation of internal channel parameter data (P-CHAN-00098) | Boolean | 0 , 1 | L/S

Programming example

Firstly before programming of a spindle it is checked, weather it is known in the channel

...

N10 G90 Y0

N20 $IF EXIST[V.SPDL.LOG_AX_NR.S] == TRUE

N30 M3 S1000 (Spindle S with speed 1000 rpm)

N40 $ELSE

N50 #MSG ["Spindle S is not available!"] (Message output and stop)

N55 M0

N60 $ENDIF

...

M30


Global variables (V.G.)

The code for inter-axis, globally (in channel) valid variables, is "V.G.. ...".

For the axis-specific code, the following notations are to be used optionally (for instance, axis-offset for tool number j in X-direction):

1. V.G.WZ[j].V.X or

2. V.G.WZ[j].V[0]

V.G.<var_name> | Significance | Data type | Unit of In/ Output | Enabled access R ead / Write
PROG_NR | Number of the NC-program, if the NC-program name is a digit | Integer | - | R
SATZ_NR | The last programmed NC-block number | Integer | - | R
PROG_SA | Local block type, if in NC-block no more alteration takes place | Integer | - | R
MASS_MM | If measuring unit [mm], then 0 | Boolean | 0 , 1 | R
MASS_360 | If measuring unit [degree], then 0 | Boolean | 0 , 1 | R
I | I-coordinate of the circular programming. Under active center point correction (G165) , access on corrected value | Real | [mm] [inch] | R
J | J-coordinate of the circular programming. Under active center point correction (G165), access on corrected value | Real | [mm] [inch] | R
K | K-coordinate of the circular programming. Under active center point correction (G165) , access on corrected value | Real | [mm] [inch] | R
R | The radius traversed during circular interpolation | Real | [mm] [inch] | R
FEEDRATE | The last programmed feedrate (F word) | Real | [mm/min], [m/min], [inch/min] | R
MERR[i] | Correction offset of the circle center point | Real | [mm] [inch] | R

The WZ[j]-variables enable the read access on the data of any tool. They are available both for an external tool management (transparent access) and for the use of an internal tool table (j corresponds in this case to the tool number respectively to the index of the tool from the tool list).

WZ[j].R | Radius of the tool | Real | [mm] [inch] | R
WZ[j].L | Length of the tool | Real | [mm] [inch] | R
WZ[j].P[i] | Parameters of the tool | Real | - | R
WZ[j].V[i] | Axis-offsets of the tool | Real | [mm] [inch] | R
WZ[j].ME | Measuring unit of the tool data list; if [mm], then 0 | Boolean | 0 , 1 | R
WZ[j].OK | Valid flag of the tool; if valid, then 1 | Boolean | 0 , 1 | R
WZ[j].SPDL_AX_NR | Logical axis number of the assigned spindle | Integer | - | R
WZ[j].KIN_PARAM[i] | Kinematic parameters of the tool | Real | [0.1 µm], [10-4 deg] | R
WZ[j].KIN_ID | Kinematik-ID of the tool | Integer | - | R
WZ[j].TYPE | Tool type (0: Milling 1: Turning 2: Grinding) | Integer | - | R
WZ[j].SRK_ID | Cutter orientation of a turning tool | Integer | - | R
WZ[j].S_MIN_SPEED | Minimum speed (Tool dynamic data) | Real | [U/min] | R
WZ[j].S_MAX_SPEED | Maximum speed (Tool dynamic data) | Real | [U/min] | R
WZ[j].S_MAX_ACC | Maximum acceleration (Tool dynamic data) | Real | [deg/sec2] | R
WZ[j].SISTER_VALID | Valid flag of the sister tool (TOOL-ID) | Boolean | 0 , 1 | R
WZ[j].SISTER | Number of the valid sister tool | Integer | - | R
WZ[j].VARIANT_VALID | Valid flag of the variant tool (TOOL-ID) | Boolean | 0 , 1 | R
WZ[j].VARIANT | Number of the valid variant tool | Integer | - | R

The WZ_AKT-variables, T_AKT and D_AKT enable the access on the data of the current selected tool. They are available both for an external tool management and for the use of an internal tool table.

T_AKT | Number of the selected tool | Integer | - | R
D_AKT | Number of the selected tool compensation data set | Integer | - | R

A write accesss always causes the temporary change of tool data for the time of selection. After deselection (D0) or selection of a new tool (Dxx) the changed data are lost. They are not saved!

Exception:

If using an external tool management during deselection of the tool or during selection of a new tool the so called additional tool data (V.G.WZ_AKT.P[i]) are adopted and saved [1]-38.

WZ_AKT.R | Radius of the current tool | Real | [mm] [inch] | R / W
WZ_AKT.L | Length of the current tool | Real | [mm] [inch] | R / W
WZ_AKT.P[i] | Parameters of current tool | Real | - | R / W
WZ_AKT.V[i] | Axis offset of the current tool | Real | [mm] [inch] | R / W
WZ_AKT.ME | Measuring unit of the current tool; if [mm], then 0 | Boolean | 0 , 1 | R
WZ_AKT.OK | Tool valid flag of the current tool; if valid, then 1 | Boolean | 0 , 1 | R
WZ_AKT.SPDL_AX_NR | Logical axis number of the assigned spindle | Integer | - | R
WZ_AKT.KIN_PARAM[i] | Kinematic parameter of the current tool. Note: For write access value must be programmed in internal units! | Real | [0.1 µm], [10-4 deg] | R / W
WZ_AKT.KIN_ID | Kinematic-ID of the current tool | Integer | - | R
WZ_AKT.TYPE | Tool type of the selected tool (0: Milling 1: Turning 2: Grinding) | Integer | - | R
WZ_AKT.SRK_ID | Cutter orientation of the selected turning tool | Integer | - | R
WZ_AKT.S_MIN_SPEED | Minimum speed (Tool dynamic data) | Real | [rpm] | R
WZ_AKT.S_MAX_SPEED | Maximum speed (Tool dynamic data) | Real | [rpm] | R
WZ_AKT.S_MAX_ACC | Maximum acceleration ( Tool dynamic data ) | Real | [deg/sec2] | R
WZ_AKT.SISTER_VALID | Valid flag of the sister tool (TOOL-ID) | Boolean | 0 , 1 | R
WZ_AKT.SISTER | Number of the valid sister tool | Integer | - | R
WZ_AKT.VARIANT_VALID | Valid flag of the variant tool (TOOL-ID) | Boolean | 0 , 1 | R
WZ_AKT.VARIANT | Number of the valid variant tool | Integer | - | R
WZ_AKT.WEAR_RADIUS | Radius wear at radius compensation (OTC) | Real | [mm] [inch] | R
WZ_AKT.WEAR[i] | Wear in axis <i> at length compensation (OTC) | Real | [mm] [inch] | R
WZ_AKT.WEAR_CONST | Wear constant (OTC) | Real | [0.1 µm/m] | R / W

Instead of V.G.WZ_AKT.P[i] also an access on the additional tool parameters with the variable V.G.WZ_INFO[i] is possible. It is only available for an external tool management:

WZ_INFO[i]

Parameters of current tool

Real

-

R

WZR | Radius of the current tool (Old syntax) | Real | [mm] [inch] | R / W
WZL | Length of the current tool (Old syntax) | Real | [mm] [inch] | R / W

NP[j].V[i]

Zero offset of one axis.
Caution: Write access causes permanent actualisation of internal zero offset data!

Real

[mm] [inch]

R / W

NP[j].ALL | Adressing of all axes of a zero group. Caution: Write access causes permanent actualisation of internal zero offset data! | Real | [mm] [inch] | R / W
NP_AKT.V[i] | Currently active zero offset of an axis | Real | [mm] [inch] | R / W
NP_AKT.ALL | Addressing of the currently active zero offsets of all axes | Real | [mm] [inch] | R / W
NP_AKT.IDX | Index of the currently active zero offset group (e.g. 0 at G53, 1 at G54...) | Integer | - | R
NP_DEFAULT | Default index of zero offset group after start-up | Integer | - | R / W
CNC_RELEASE | Build number of CNC version [ up to V260] | Integer | - | R

CNC_CHANNEL | Current channel number | Integer | - | R
IPO_COUNT | System time counter | Integer | - | R
CS_ACTIVE | CS (#CS ) active? If active, then 1 | Boolean | 0 , 1 | R
CS_COUNT | Number of active (linked) CS | Integer | - | R
ACS_ACTIVE | ACS (#ACS ) active ? If active, then 1 | Boolean | 0 , 1 | R
ACS_COUNT | Number of active (linked) ACS | Integer | - | R
CS | Machining coordinate system (CS) on/off | Integer | - | R
ACS | Fixture adaptive coordinate system (ACS) on/off | Integer | - | R
TOOL_COMP | Active tool compensation (1: RTCP 2: TLC 3: 2.5D ) |  |  | R
AKT_PLATZ | Current clamp position offset index |  |  | R

AX_LINK.NR | Number of current or last active coupling group | Integer | - | R
AX_LINK.ACTIVE | Axes coupling (#AX LINK...) active? If active, then 1 | Boolean | 0 , 1 | R

ROT_ACTIVE | Contour rotation (#ROTATION...) active? If active, then 1 | Boolean | 0 , 1 | R
ROT_ANGLE | Angle of contour rotation | Real | [deg] | R
ROT_CENTER1 | Offset of first main axis to the rotation point at contour rotation | Real | [mm] [inch] | R
ROT_CENTER2 | Offset of second main axis to the rotation point at contour rotation | Real | [mm] [inch] | R

TIMER[i] | Counter value of the timer with number <i> | Integer | [ms] | R
RANDOM | Creates a random value in the range 0.0 - 1.0 | Real | - | R
PROG_ABS | Dimensioning, 0: G91 active 1: G90 active | Boolean | 0 , 1 | R
KIN[j].PARAM[i] | Kinematic parameters of a specific kinematic [j] Note: For write access value must be programmed in internal units! Caution: Write access causes permanent actualisation of internal channel parameter data! | Real | [0.1 µm], [10-4 deg] | R / W

CNC_RELEASE

Build number of CNC version

Integer

-

L

CNC_VERSION.MAJOR | Major version of CNC [from V263.1501] (e.g. 2 in V263.1501.00) | Integer | - | L
CNC_VERSION.MINOR | Minor version of CNC [from V263.1501] (e.g. 63 in V263.1501.00) | Integer | - | L
CNC_VERSION.BUILD | Build number of CNC version [from V263.1501] (e.g. 1501 in V263.1501.00) | Integer | - | L
CNC_VERSION.PATCH | Patch number of CNC version [from V263.1501] (e.g. 00 in V263.1501.00) | Integer | - | L

MIRROR_ACTIVE

Mirroring (G351 X... oder G21, G22, G23) active?
If active, then 1

Boolean

0 , 1

L

WCS_POSLIMIT_1

WCS_POSLIMIT_2

WCS_POSLIMIT_3

Motion limits in the main axes in WCS.

Only useful in combination with the NC command #GET WCS POSLIMIT

Real

[mm] [inch]

R

FILE_OFFSET | File position of the beginning of the NC block with the programmed V.G.FILE_OFFSET variable | Integer | - | R
FILE_NAME | File name of the currently active NC program | String | - | R
PROG_NAME | Name (%...) of the currently active main or sub program (local/global) | String | - | R
PATH_NR | Logical path number of the currently active NC main or global sub program according to the startup list (P-STUP-00019) | Integer | - | R

TRAFO_ACTIVE | Kinematic transformation (#TRAFO...) active? If active, then TRUE | Boolean | 0 , 1 | R
HSC_ACTIVE | Free form surface operation (#HSC...) or spline interpolation (#SET SPLINE... oder G151) active? If active, then TRUE | Boolean | 0 , 1 | R
TRC_ACTIVE | Tool radius compensation (G41, G42) active? If active, then TRUE | Boolean | 0 , 1 | R
MCS_ACTIVE | Temporary transition to the machine axes coordinate system (#MCS...) active? If active, then 1 | Boolean | 0 , 1 | R
BLOCK_SEARCH_ACTIVE | Block search active? If active, then 1 | Boolean | 0 , 1 | R
CONT_MODE_ACTIVE | Polynom contouring (G261) active? If active, then the variable provides the value of the current contouring type: 1 at contouring type 1 ( AUTO_DEV ) 2 at contouring type 2 ( AUTO_VEL ) 3 at contouring type 3 ( DIST ) 4 at contouring type 4 ( DEV ) 5 at contouring type 5 ( POS ) 6 at contouring type 6 ( DIST_SOFT ) 0 at G260 | Integer | - | R

The following variables enable the access on data of the M/H functions, defined in the channel parameters.

If the write access (W) on the pre output values and the synchronisation types of the M/H functions are not conform, the synchronisation type is implicitly adapted.

The changes keep valid until the next start-up!

If the read access (R) on the pre output values and the synchronisation types of the M/H functions are not conform, an error message is created.

M_FCT[i].SYNCH | Synchronisation type of a M function <i>, defined in the channel parameters [1] -3 | Integer | - | R / W
M_FCT[i].PRE_OUTP_PATH | Pre output distance m_pre_output [1] -47 of a M function <i> from synchronisation type MEP_SVS, defined in the channel parameters. | Real | [mm] [inch] | R / W
M_FCT[i].PRE_OUTP_TIME | Pre output time m_pre_output [1] -47 of a M function <i> from synchronisation type MET_SVS, defined in the channel parameters. | Real | [sec] | R / W

H_FCT[i].SYNCH | Synchronisation type of a H function <i>, defined in the channel parameters [1] -3 | Integer | - | R / W
H_FCT[i].PRE_OUTP_PATH | Pre output distance h_pre_output [1] -47 of a H function <i> from synchronisation type MEP_SVS, defined in the channel parameters. | Real | [mm] [inch] | R / W
H_FCT[i].PRE_OUTP_TIME | Pre output time h_pre_output [1] -47 of a H function <i> from synchronisation type MET_SVS, defined in the channel parameters. | Real | [sec] | R / W

The V.G.SPEED_LIMIT" variables enable the access on data of the speed limit look ahead parameters [1]-48, defined in the channel parameters.

During write access the changed parameter setting is output to the channel. A possibly active motion is interrupted!

If the write access (W) on the values and the unit of the distance parameters are not conform, the unit is implicitly adapted.

The changes keep valid until program end or RESET! After program start the settings of the channel parameters are valid again.

If the read access (R) on the values and the unit of the distance parameters are not conform, an error message is created.

SPEED_LIMIT.ENABLE | Selection/deselection of speed limit look ahead (0: Deselection 1: Selection) | Boolean | 0 , 1 | R / W
SPEED_LIMIT.VEL_LIMIT | Definition of speed limit value | Integer | [%] | R / W
SPEED_LIMIT.TIME | Unit definition of the distances to and from the "corner" (0: Path 1: Time) | Boolean | 0 , 1 | R / W
SPEED_LIMIT.DIST_TO_CORNER | Path distance to "corner" | Real | [mm] [inch] | R / W
SPEED_LIMIT.DIST_FROM_CORNER | Path distance from "corner" | Real | [mm] [inch] | R / W
SPEED_LIMIT.TIME_TO_CORNER | Time distance to "corner" | Real | [sec] | R / W
SPEED_LIMIT.TIME_FROM_CORNER | Time distance from "corner" | Real | [sec] | R / W
SPEED_LIMIT.OVERRIDE_WEIGHT | Weighting of speed limit value(0: no weighting 1: Weighting by override) | Boolean | 0 , 1 | R / W

@P[i].VALID

Is a specific transfer parameter programmed in cycle call or sub programm call G8xx ?

0: Parameter is not programmed

1: Parameter is programmed

Index <i> contains the number of the parameter, which should be checked for validity (e.g. 1 for @P1 or the first parameter, called with G8xx).

Note for read access:

The variable can only be used inside a cycle or in global sub programms G8xx with transfer parameters !

Boolean

0 , 1

R

TIME_STAMP

Current time stamp <date time> :

(e.g. 16.06.2011 13:08:10:000) [from Build 1507.02]

String

-

R


Self-defined variables

Self-defined variables are created (and eventually initialized) in the NC-main or a sub program after the program name in a declarations block which starts with #VAR and is closed by #ENDVAR. The following syntax is used for creation:

For compatibility to older versions V.P and V.S variables may also be created outside the declarations block. The creation is then done implicitly during the first write access to the variable. But V.L variables and variable arrays must always be created in a declarations block. To the better overview the initialization of a parameter array can be written over several NC blocks by using the \-character. The following syntax is used for creating:

#VAR Start of declaration block

:

: Declaration and initialisation part

:

#ENDVAR End of declaration block

Programming example

%prog_name

:

#VAR

V.P.ARRAY_1[3][6] = [10,11,12,13,14,15, \

20,21,22,23,24,25, \

30,31,32,33,34,35 ]

V.L.MY_ARRAY[3][6] = [10,11,12,13,14,15, 20,21,22,23,24,25, 30,31,32,33,34,35]

V.P.VAR_1

V.L.VAR_1

V.S.VAR_1

#ENDVAR

Self-defined variable and variable arrays can also be deleted in the NC-program. For that, the #DELETE command is provided with the following syntax.

#DELETE V. <name> {,V.<name>}

Programming example

#DELETE V.P.ARRAY_1, V.L.MY_ARRAY, V.P.VAR_1, V.L.VAR_1, V.S.VAR_1

Furthermore, the SIZEOF and the EXIST function (see chapter 2.6.1.3) are used to determine the dimensions size of variable arrays and for checking the existence of self-defined variables.

Programming example

By the EXIST-request on a self-defined V.S.-array variable (any valid index) it is checked, wether this variable has already been defined in a previous part program or if this variable still has to be defined.

...

N10 $IF EXIST[V.S.EXAMPLE[0]] == TRUE

N20 V.S.EXAMPLE[2] = 10 (enter value for V.S-variable[2])

N30 $ELSE

N40 #VAR

N50 V.S.EXAMPLE[5] = [1,2,3,4,5 ]

N60 #ENDVAR

N60 $ENDIF

...

M30

More:

button Global, not valid after part program end (V.P.)

button Global, valid after part program end (V.S.)

button Local, not valid after part program end (V.L.)


Global, not valid after part program end (V.P.)

With the code "V.P. ...", it is possible to define individual variables and to assign values to them. The variables are global in the current part program (i.e. after creation known at any point of the part program and all of its subroutines), but not valid after program end.

Syntax:

V.P. <FREE_DEF> global variable, not valid after program end

<FREE_DEF> whereby FREE_DEF is a name chosen arbitrarily, which can consist of a maximum firmly given number of any characters (excluding blank characters, tabulators, commentaries, comparison operators, mathematic operators, brackets).

Programming example

Creation of V.P.VAR_5 and initialisation with value 20. Thereafter a linear interpolation in X-direction is carried out with the value of this variable (X20).

:

#VAR

V.P.VAR_5

#ENDVAR

:

N10 V.P.VAR_5 = 20

N20 XV.P.VAR_5

:

or

:

#VAR

V.P.VAR_5 = 20

#ENDVAR

:

N20 XV.P.VAR_5

:

The maximum number of self defined variables that are not valid after program end is firmly given [6]-6-21. At the start of the program all names and values of those V.P.-variables are deleted.


Global, valid after part program end (V.S.)

With the code "V.S. ...", it is possible to define individual variables and to assign values to them, which can be accessed in all program levels and all following (main-) programs still under the same names. The value of the variable can be altered only by over-writing. The names of these variables could be deleted only by a restart/startup of the control.

Syntax:

V.S. <FREE_DEF> global variable, valid after program end

<FREE_DEF> whereby FREE_DEF is a name chosen arbitrarily, which consists of characters (excluding blank characters, tabulators, commentaries, comparison operators, mathematic operators, brackets).

Programming example

Creation of the array variable V.S.VAR[5] and initialisation. Thereafter a linear interpolation in X-direction is carried out with the variable V.S.VAR[4] (X20).

:

#VAR

V.S.VAR[5] = [5,10,10,15,20]

#ENDVAR

:

N20 XV.S.VAR[4]

:

The maximum number of self-defined global variables is firmly given [6]-6.22.


Local, not valid after part program end (V.L.)

With the code "V.L. ...", it is possible to define individual variables and to assign values to them. The variables are local for the current subroutine and all the called subroutines. They are deleted when the defining subroutine level is left.

Syntax:

V.L. <FREE_DEF> local variable, not valid after program end

<FREE_DEF> whereby FREE_DEF is a name chosen arbitrarily, which consists of characters (excluding blank characters, tabulators, commentaries, comparison operators, mathematic operators, brackets).

Programming example

Creation of V.L.LOC_VAR and initialisation with value 10. Thereafter a linear interpolation in X-direction is carried out with the value of this variable (X10).

:

#VAR

V.L.LOC_VAR

#ENDVAR

:

N10 V.L.LOC_VAR = 10

N20 XV.L.LOC_VAR

:

or

:

#VAR

V.L.LOC_VAR = 10

#ENDVAR

:

N20 XV.L.LOC_VAR

:

The maximum number of self-defined local variables is firmly given [6]-6.23. At the start of the program all names and values of those V.L.-variables are deleted.


External variables (V.E.)

With the command "V.E. ..." , writing can be done to external addresses or reading can be done from external addresses in the NC-program. To be able to influence the decoding of an NC-program from out of a parallel process, an external access to this variable type can be executed through a special interface.

From the NC-channel the access to the external variables is possible synchronous by the interpolator or asynchronous by the decoder.

The initialization of external variables is actuated during the start up [8].

Programming example

N100 $IF V.E.EXT1 >= 100 (Corresponding to the value of V.E.EXT1)

(branching off is done into various cases)

N110 G01 X100 Y100 F1000

N120 $ELSE

N130 G01 X100 YV.E.EXT1 F1000 (Linear interpolation in Y-direction)

(with the value from V.E.EXT1)

N140 ENDIF

N150 V.E.EXT1 = V.A.ABS.X (To the external variables the absolute)

(X-coordinates are assigned)

N160 G01 XV.E.EXT2 (Linear interpolation in X-direction)

(with the value from V.E.EXT2)


Spindle programming

TwinCAT CNC: Overview

Spindle

Spindle programming is performed in accordance with the conventional standard syntax defined in ISO resp. ISO + extensions. This is required in particular for reasons relating to compatibility and owing to certain standard functionalities such as turning, tapping and gear changing etc.

In order to comply with the requirements of new machine concepts and production technologies in flexible spindle programming, each spindle present on the channel also features the option of axis-specific programming. This syntax allows several spindles to be addressed mutually independently in multi-spindle systems in one NC-block simultaneously [1]-20, [6]-8.8. In this case, it must be noted that only one spindle can be programmed at one time, the so-called main spindle, both in the standard syntax and in the spindle-specific syntax. All other spindles can be addressed only via the spindle-specific syntax (Chapter 14.3).

The spindles and the main spindle are defined in the channel parameters list [1]-16. This configuration is available after boot-up of the control system. The main spindle can be changed in the NC-program by means of an NC-command (#MAIN SPINDLE, Chapter 14.4).

The table below shows what NC-commands must be used in conjunction with spindle programming only in the DIN syntax and what NC-commands are also allowed within the extended spindle-specific syntax.

Description | DIN-Syntax | Spindle specific Syntax
Spindle-M-Functions | M3, M4, M5, M19 | M3, M4, M5, M19
Speed | S | REV
Position | S.POS | POS
User specific M/H-Functions | Mxx/Hxx | Mxx/Hxx
Gear change (mechanical) | M40-M45 |
Thread cutting | G33 |
Tapping | G63 |
Turning | G95, G96, G97, G196 |
C-axis | #CAX |
Gear change (new data) | G112 |
Homing | G74 | G74
Override 100% | G167 | G167
Requesting of a spindle axis |  | CALLAX
Releasing of a spindle axis |  | PUTAX
Taking over new tool dynamic data |  | GET_DYNAMIC_DATA
Feedforward control |  | G135, G136, G137
Feed linking |  | FEED_LINK

Tab. 14-1: Overview of all spindle relevant commands

More:

button Configuring spindles

button Programming in DIN syntax

button Programming in spindle-specific syntax

button Change of main spindle

button Synchronous spindle operation

button Cross-block synchronization (Late Sync)

button Synchronization of the spindle M-functions

button PLCopen programming


Configuring spindles

More:

button Axis parameters

button Channel parameters


Axis parameters

Axis channel parameters lists [2] must be defined both for closed-loop-controlled spindles and for open-loop-controlled (PLC) spindles for entering the spindle-specific parameters.


Channel parameters

Further entries which are made in the channel parameters [1] are required for pro-gramming spindles in the part program.

In this case, each spindle to be addressed by this channel must be declared. For this purpose, a string (axis name) and the corresponding logical axis number are defined for each spindle. The axis names of the spindle can be freely selected but they must always start with S (e.g. S, S_MAIN, S1, SPINDEL_1).

In addition, the synchronization modes must be defined spindle-specifically for the spindle M-functions (M3, M4, M5 and M19) and for the S-word. For that, the appropriate meaning of M3, M4, M5 and M19 must be switched [1]-35.

The synchronisation method of the S function has no effect if a spindle M function has been programmed in the NC block. Synchronisation only takes place in accordance with the settings for the spindle M function. The following priorities apply:

M19 > M3/M4/M5 > S

If the spindles are to be allowed for in simulation mode production time calculation, the data required for this can also be preassigned spindle-specifically.

In order to remain compatible with standard programming, a spindle must be declared as a so-called main spindle [1]-17/-18. This main spindle can then be programmed together with specific standard functionalities (e.g. tapping and gear changing etc.) in the conventional DIN syntax. Even if there is only one spindle in the system, it must be configured as the main spindle.

Setting a flag allows the optional gear changing function to also be enabled for the main spindle [1]-19.

The configuration defined in the channel parameters [1] is the default assignment available after boot-up of the control system.

812_start

Example 1: Configuration of a single-channel system with three spindles. The spindle with axis number 6 is to be the main spindle. Gear changing of this spindle is deactivated.

Extract from channel parameters list [1]:

:

spdl_anzahl 3

:

main_spindle_ax_nr 6 -> -> ->-

main_spindle_name S |

main_spindle_gear_change 0 |

# |

spindel[0].bezeichnung S1 |

spindel[0].log_achs_nr 6 -< -< -<-

spindel[0].s_synch 0x00000001

spindel[0].m3_synch 0x00000002

spindel[0].m4_synch 0x00000004

spindel[0].m5_synch 0x00000008

spindel[0].m19_synch 0x00000001

spindel[1].bezeichnung S2

spindel[1].log_achs_nr 11

spindel[1].s_synch 0x00000001

spindel[1].m3_synch 0x00000002

spindel[1].m4_synch 0x00000004

spindel[1].m5_synch 0x00000008

spindel[1].m19_synch 0x00000001

spindel[2].bezeichnung S3

spindel[2].log_achs_nr 30

spindel[2].s_synch 0x00000001

spindel[2].m3_synch 0x00000002

spindel[2].m4_synch 0x00000004

spindel[2].m5_synch 0x00000008

spindel[2].m19_synch 0x00000001

:

q After boot-up, the spindle with the logical axis number 6 is the main spindle. It is addressed via the spindle name S and can be programmed in conventional DIN syntax or in spindle-specific syntax. Spindles S2 and S3 can be programmed only in spindle-specific syntax.

Example 2: Configuration of a single-channel system with 3 spindles. The spindle with axis number 11 is to be the main spindle. Gear changing of this spindle is deactivated.

Extract from channel parameters list [1]:

:

spdl_anzahl 3

:

main_spindle_ax_nr 11-> -> ->-

main_spindle_name S_MAIN |

main_spindle_gear_change 0 |

# |

spindel[0].bezeichnung S1 |

spindel[0].log_achs_nr 6 |

spindel[0].s_synch 0x00000001 |

spindel[0].m3_synch 0x00000002 |

spindel[0].m4_synch 0x00000004 |

spindel[0].m5_synch 0x00000008 |

spindel[0].m19_synch 0x00000001 |

spindel[1].bezeichnung S2 |

spindel[1].log_achs_nr 11-< -< -<-

spindel[1].s_synch 0x00000001

spindel[1].m3_synch 0x00000002

spindel[1].m4_synch 0x00000004

spindel[1].m5_synch 0x00000008

spindel[1].m19_synch 0x00000001

spindel[2].bezeichnung S3

spindel[2].log_achs_nr 30

spindel[2].s_synch 0x00000001

spindel[2].m3_synch 0x00000002

spindel[2].m4_synch 0x00000004

spindel[2].m5_synch 0x00000008

spindel[2].m19_synch 0x00000001

:

q After boot-up, the spindle with the logical axis number 11 is the main spindle. It is addressed via the spindle name S_MAIN and can be programmed in conventional DIN syntax or in spindle-specific syntax. Spindles S1 and S3 can be programmed only in spindle-specific syntax.

Example 3: Configuration of a two-channel system with a total of three spindles:

Channel 1: Three spindles. Spindle with axis number 11 is to be the main spindle.

Extract from channel parameters list [1]:

:

spdl_anzahl 3

:

main_spindle_ax_nr 11-> -> ->-

main_spindle_name S |

main_spindle_gear_change 0 |

# |

spindel[0].bezeichnung S1 |

spindel[0].log_achs_nr 6 |

spindel[0].s_synch 0x00000001 |

spindel[0].m3_synch 0x00000002 |

spindel[0].m4_synch 0x00000004 |

spindel[0].m5_synch 0x00000008 |

spindel[0].m19_synch 0x00000001 |

spindel[1].bezeichnung S2 |

spindel[1].log_achs_nr 11-< -< -<-

spindel[1].s_synch 0x00000001

spindel[1].m3_synch 0x00000002

spindel[1].m4_synch 0x00000004

spindel[1].m5_synch 0x00000008

spindel[1].m19_synch 0x00000001

spindel[2].bezeichnung S3

spindel[2].log_achs_nr 30

spindel[2].s_synch 0x00000001

spindel[2].m3_synch 0x00000002

spindel[2].m4_synch 0x00000004

spindel[2].m5_synch 0x00000008

spindel[2].m19_synch 0x00000001

:

Channel 2: Two spindles. Spindle with the axis number 11 is to be the main spindle.

Extract from channel parameters list [1]:

:

spdl_anzahl 2

:

main_spindle_ax_nr 11-> -> ->-

main_spindle_name S |

main_spindle_gear_change 0 |

# |

spindel[0].bezeichnung S1 |

spindel[0].log_achs_nr 6 |

spindel[0].s_synch 0x00000001 |

spindel[0].m3_synch 0x00000002 |

spindel[0].m4_synch 0x00000004 |

spindel[0].m5_synch 0x00000008 |

spindel[0].m19_synch 0x00000001 |

spindel[1].bezeichnung S2 |

spindel[1].log_achs_nr 11-< -< -<-

spindel[1].s_synch 0x00000001

spindel[1].m3_synch 0x00000002

spindel[1].m4_synch 0x00000004

spindel[1].m5_synch 0x00000008

spindel[1].m19_synch 0x00000001

q After boot-up, the spindle with the logical axis number 11 can be addressed as the main spindle via spindle name S by both channels. It can be programmed in the conventional DIN syntax or in spindle-specific syntax. Spindle S1 can also be programmed from both channels in spindle-specific syntax. Spindle S3 is available only on channel 1. This spindle is not known on channel 2.


Programming in DIN syntax

More:

button The spindle M-functions

button Spindle speed (S-word)

button Gear changing of spindles (M40 - M45)

button Turning functions

button Tapping (G63)

button C-axis machining

button Gear change (G112)

button Homing (G74)

button Override (G167)


The spindle M-functions

More:

button Move spindle (M3, M4, M5)

button Positioning spindle (M19, *.POS)


Move spindle (M3, M4, M5)

M03 | Spindle rotation clock wise (cw) | (modal)
M04 | Spindle rotation counter clock wise (ccw) | (modal)
M05 | Spindle stop | (modal)

The spindle M-functions M03, M04 and M05 define the spindle operating mode and must be used in conjunction with the S-word (Chapter 14.2.2Spindle speed (S-word)). They have a stopping action and may each be programmed only alone in the NC-block.

Spindle rotation is activated if M03 or M04 has been programmed and a valid speed has been set.

M05 stops spindle rotation. It must be noted that this spindle M-function is the default spindle mode after control boot-up and initial program start.

If no M05 is set at the end of the program, the spindle continues to rotate.

Programming example

N10 S1000 (Speed 1000 U/min. is stored, no spindle rotation)
(because M05 is default)

N20 M03 (Spindle rotation cw with 1000 U/min.)

N30 M04 (Spindle rotation ccw with 1000 U/min.)

N40 S500 (Spindle rotation ccw with 500 U/min.)

N50 M05 S300 (Spindle rotation, speed 300 U/min. is stored)

N60 M04 (Spindle rotation ccw with 300 U/min.)

N70 M05 (Spindle stops)

N80 M03 S1000 (Spindle rotation cw with 1000 U/min.)

N90 M30 (Program end

812_start

Extract from channel parameters list [1]:

The synchronization modes must be defined spindle-specifically for M3, M4 and M5. The M-function is not executed in the case of synchronization mode 0 (NO_SYNCH).

:

spindel[0].bezeichnung S1

spindel[0].log_achs_nr 6

spindel[0].s_synch 0x00000001

spindel[0].m3_synch 0x00000002

spindel[0].m4_synch 0x00000002

spindel[0].m5_synch 0x00000008

spindel[0].m19_synch 0x00000001

:


Positioning spindle (M19, *.POS)

M19 | Spindle positioning | (non-modal)
*.POS | Spindle position | (modal)

Positioning of the spindle can be represented with the following syntax:

M19 [ spindle_name.POS[ = ] <position> ] [ M03 | M04 ] [ spindle_name <speed> ]

M19 Position spindle

spindle_name Spindle name in accordance with [1] -16

<position> Mathematical expression for specifying the spindle position

<speed> Mathematical expression for specifying the spindle speed

M03/M04 or the spindle speed in the same NC-block are optional. However, a valid spindle speed (> 0) must be set.

The spindle position is modal and does not need to be specified again if M19 is programmed again. If no spindle position has been programmed before, the spindle moves to default position "zero".

If the spindle is not rotating, positioning is performed with the shortest traverse path.

Spindle positioning with M19 is allowed only for closed-loop position-controlled spindles.

Programming example

The spindle is positioned to position 180 in each case in the following examples. The "=" character is optional:

M19 S.POS180

M19 S.POS 180

M19 S.POS=180

M19 SPINDEL.POS=180

M19 S1.POS=180

812_start

812_end

The spindle does not rotate during positioning. The shortest traverse path is computed.

N10 M05 S100 (Spindle stops, speed 100 U/min. is stored)

N20 M19 S.POS180 (Positioning with 100 U/min to position 180)

(The direction of rotation results from the)
(shortest movement distance)

N30 M19 S200 S.POS90 (The direction of rotation results from the)
(shortest movement distance)

(Positioning with 200 U/min ccw to position 90)

812_start

Extract from channel parameters list [1]:

For M19, the synchronization mode must be defined spindle-specifically. The M-function is not executed in the case of synchronization mode 0 (NO_SYNCH).

:

spindel[0].bezeichnung S1

spindel[0].log_achs_nr 6

spindel[0].s_synch 0x00000001

spindel[0].m3_synch 0x00000002

spindel[0].m4_synch 0x00000002

spindel[0].m5_synch 0x00000008

spindel[0].m19_synch 0x00000001

:

812_end


Spindle speed (S-word)

<spindle_name> [ = ] <speed> (modal)

<spindle_name> Spindle name in accordance with [1]-16

<speed> Mathematical expression for specifying the spindle speed

During configuration, the main spindle can be assigned a string in the channel parameters list [1]-18. In order to avoid ambiguities, there must be an equals sign in front of the speed entry after all spindle names with more than one character.

Values can be assigned directly or by means of parameters to the S-word, and decimal numbers are also allowed (REAL64 format).

We must distinguish between the following types of use in conjunction with the spindle M-functions in the case of the S-word:

1. S-word in conjunction with M03, M04, M19:
If the S-word or the string used for it is programmed in conjunction with M03/M04 or M19, the value following the S-word is interpreted as the spindle speed and output to the spindle.

2. S-word in conjunction with M05:
The value following the S-word is accepted as the spindle speed in the work data in conjunction with M05, but it is not output to the spindle.

The S-word alone does not generate a movement in the NC-program. A spindle mode M03, M04, M19 must be known for this. Accordingly, programming M03, M04 and M19 does not cause movement until the S-word is set (> 0, analogous to G01, G02 and G03 in which traversing occurs only when the feedrate and the axes to be traversed have been specified).

In the case of a negative S-value, an error message is output.

A negative S-value is allowed only in conjunction with G63 (tapping) since it triggers reversal of the direction of rotation when withdrawing from the threaded bore.

812_start

812_end

Programming example

Programming with Spindle S:

N10 S300 (Speed 300 U/min. is stored)

N20 M04 (Spindle rotation ccw with 300 U/min.)

N30 M03 S1000 (Spindle rotation cw with 1000 U/min.)

N40 S500 (M03 active, Spindle rotation cw with 500 U/min.)

N50 M05 S100 (Spindle stops, speed 100 U/min. is stored)

N60 M04 (Spindle rotation ccw mit 100 U/min.)

N70 M05 (Spindle stops)

N80 M30 (Program end)

812_start

Extract from channel parameters list [1]:

The synchronization mode must be defined spindle-specifically for the S-word. An error message is generated in the case of synchronization mode 0 (NO_SYNCH) since an S-word may not be ignored.

:

spindel[0].bezeichnung S1

spindel[0].log_achs_nr 6

spindel[0].s_synch 0x00000001

spindel[0].m3_synch 0x00000002

spindel[0].m4_synch 0x00000002

spindel[0].m5_synch 0x00000008

spindel[0].m19_synch 0x00000001

:

812_end

Programming example

N10 M03 S100 (Spindle rotation cw with 100 U/min.)

N20 M19 S.POS90 (With 100 U/min cw to position 90)

N30 M04 (Spindle rotation ccw with 100 U/min.)

N40 M19 S200 S.POS 180 (With 200 U/min ccw to position 180)

N50 M05 S150 (Spindle stops, speed 150 U/min. is stored)

N60 M19 S.POS=135 (Positioning with 150 U/min. with shortest)
(way to position 135.)

N70 M03 S300 (Spindle rotation cw with 300 U/min.)

N80 M19 S200 S.POS270 (With 200 U/min cw to position 270)

N90 M03 S400 S.POS45 (Spindle rotation cw with 400 U/min., )
(position 45 is stored)

N100 M19 (With 400 U/min. cw to position 45)

N110 M04 S800 (Spindle rotation ccw with 800 U/min.)

N120 S1200 (Spindle rotation ccw with 1200 U/min.)

N130 M5 (Spindle stops)

N140 M03 (Spindle rotation cw with 1200 U/min.)

N150 M19 (With 1200 U/min. cw to position 45)


Gear changing of spindles (M40 - M45)

Changing of the spindle transmission is programmed with M40...M45. These M-functions define max. six gear stages.

The M-functions can be programmed together with the spindle speed and the M-function for the direction of rotation in the same NC-block. Functions M40 to M45 are used to select the gear stage and to trigger mechanical gear change.

Syntax:

M40 | M41 | M42 | M43 | M44 | M45 [ <spindle_name><expr> ] [ M03 | M04 ] (modal)

M40 to M45 Gear stages 1 to 6

<spindle_name><expr> Spindle speed consisting of spindle name in accordance with [1] and mathematical expression

Programming example

S800 M41 M03 (Speed 800 U/min, gear range 2, rotation cw)

q The decoded functions M40 to M45 are modal and are activated at the start of a block. M40 to M45 cancel each other.

q The system allows definition of max. six spindle gear stages (M40... M45). The minimum and maximum speeds are defined for each gear stage in a "table of speed ranges" in [1]-21 (unit = rpm).

q The maximum speed for the 10 V output in the case of closed-loop position-controlled spindles is defined in the case of analog drives via the Multi-Gain-factor [2]-2.

q On a system with automatic selection of the gear stage, this is determined solely by programming the speed S. M40 to M45 then do not need to be programmed.

q M40 to M45 can be programmed only in the case of the closed-loop position-controlled spindles.

q The NC-kernel always attempts to minimize gear changing (if, for instance, a new speed can be used with the current gear stage, gear change is suppressed even if this has been explicitly programmed with M40 to M45).

Extract from channel parameters list [1]:

q Definition of the M-functions M40 - M45 and definition of the synchronization modes.

m_synch[1] 0x00000001 MOS

m_synch[2] 0x00000002 MVS_SVS

:

m_synch[40] 0x00000002 MVS_SVS

m_synch[41] 0x00000002 MVS_SVS

m_synch[42] 0x00000002 MVS_SVS

m_synch[43] 0x00000002 MVS_SVS

m_synch[44] 0x00000002 MVS_SVS

m_synch[45] 0x00000002 MVS_SVS

m_synch[48] 0x00000008 MNS_SNS

m_synch[49] 0x00000002 MVS_SVS

:

q Activating gear change:

:

main_spindle_gear_change 1 0: OFF 1: ON

:

q Configuring the spindle transmission (search direction, speed ranges):

:

spindel[0].range_way 0 0:bottom up 1: top down

#

spindel[0].range_table[0].min_speed 50 (M40)

spindel[0].range_table[0].max_speed 560 (M40)

spindel[0].range_table[1].min_speed 400 (M41)

spindel[0].range_table[1].max_speed 800 (M41)

spindel[0].range_table[2].min_speed 700 (M42)

spindel[0].range_table[2].max_speed 3500 (M42)

spindel[0].range_table[3].min_speed 3501 (M43)

spindel[0].range_table[3].max_speed 4000 (M43)

spindel[0].range_table[4].min_speed 3800 (M44)

spindel[0].range_table[4].max_speed 5500 (M44)

spindel[0].range_table[5].min_speed 5400 (M45)

spindel[0].range_table[5].max_speed 7000 (M45)

#

:

Programming example

q Automatic gear stage determination: ON

:

spindel[0].autom_range 1

:

NC-program:

S650 M03 OK, M41 ⇒ SPS

S750 OK, no changing , M41 already selected

S950 OK, automatic changing , M42 ⇒ SPS

S1050 OK, no changing, M42 already selected

S750 OK, automatic changing, M41 ⇒ SPS

S500 OK, no changing, M41 already selected

S350 OK, no changing, M41 already selected

S8000 Error, speed too high

A programmed gear stage is always checked:

M41 S750 OK, " automatic" changing , M41 ⇒ SPS

..but

M40 S750 Error, wrong gear stage

Programming example

q Automatic gear stage determination: OFF

:

spindle[0].autom_range 0

:

NC-program:

M41 S650 M03 OK, M41 ⇒ SPS

M41 S750 OK, no changing , M41 already selected

M42 S950 OK, changing, M42 ⇒ SPS

M42 S1050 OK, no changing , M42 already selected

M41 S750 OK, changing , M41 ⇒ SPS

M41 S500 OK, no changing, M41 already selected

M41 S350 OK, no changing, M41 already selected

M41 S200 Error, program different gear stage (M40)

S950 Error, no gear stage (M42) programmed

812_end


Turning functions

More:

button Cutter radius compensation (G40/G41/G42)

button Diameter programming (G51/G52)

button Feedrate per revolution (G95)

button Constant cutting speed (G96, G97, G196)

button Thread cutting with endlessly rotating spindle (G33)


Cutter radius compensation (G40/G41/G42)

G40 SRK deselection (modal, default)

G41 SRK to left of contour (modal)

G42 SRK to right of contour (modal)

Tool tip radius compensation (SRK) acts in the machining plane selected using G17, G18, G19. In this plane, one of the axis must be operated in the mode face turning and the other in the mode longitudinal turning 

As tool correction values, the data sets stored under the D-words are used. For turning tools, the orientation of the cutter edge in respect to the machining plane (face-, longitudinal axis) has to be specified through an additional identification code 1...9 (see Fig. 14.1).

Fig. 14.1: Orientation of the cutter edge to the machining plane.

A typical turning tool then is characterized through the following values / parameters :

q Tool type 1 (turning tool)

q SRK-orientation 1...9

q Tool radius tool tip radius

q Tool length --

q Tool offset (see Fig. 14.2)

Fig. 14.2: Tool gauging for tool compensation.

While specifying tool axis offsets, it should be noted their mathematical sign, since, here, components of the tool shift vector in the machining plane are involved. For the example of a turning tool shown in Fig. 14.2 the offsets in the direction of the X- and Y axis both have negative (mathematical) sign.

An interchanging between turning tool and milling tool is permitted while G41 or G42 are selected. In case of absolute programming, G90, the current axis offset values of the new tool are taken into account in the next traversing block according to the type of tool.


Diameter programming (G51/G52)

G51 Selection of diameter programming (modal)

G52 Deselection of diameter programming (modal, default)

Fig. 14.3: Reference points and diameter programming for turning

When diameter programming is selected, the positional values in the traverse blocks of the face-turning axis are interpreted as diameter values in respect to the centre point of turning.

It should be noted that the programmed coordinates of the face turning axis will in fact correspond with the workpiece diameter only if the zero point of the face turning axis is located at the centre point of turning (irrespective of the fact whether offsets take effect as a diameter, see example below).

Through the machine data, parametering can be done for the axes in the mode face turning:

q Diameter programming with absolute programming (G90) [2]-3

q Diameter programming with relative programming (G91) [2]-4

q BZV and NPV in the diameter [1]-22

Diameter coordinates must not be programmed negatively or be mirrored.

G51 acts upon all the axes that are operated in the mode face turning. On selecting, however, exactly one face turning axis must be present in the machining plane (G17, G18, G19).

The coordinates of the centre point of the circle are not programmed in the diameter.

Deselection of diameter programming is done using the function G52.

Programming example

Conditions: (Facing turning axis, translatory, [2]-9)

(Diameter prog. with G90, [2]-3)

(BZV, NPV take effect as a diameter, [1]-22)

N10 G90 G01 F1000

N20 G51 X80 (Diameter 80mm)

N30 G92 X10 (BZV with 10mm as a diameter)

N40 X0 (prog. position 0 + BPV => Diameter 10mm)

N50 G91 X50 (relative 50mm, not in the diameter)

N60 G90 X-20 (Error: negative diameter)

N70 G21 X30 (Error: During diameter prog. the coordinates of the)
(face-turning axis must not be mirrored)

N75 G22 X30 (Mirroring on face-turning axis permissible)

N80 G52 (Deselection of diameter programming)

N90 M30


Feedrate per revolution (G95)

G95 Feedrate in mm/revolution (modal)

During turning with active G95 a constant chip-thickness can be fixed using the F-Word in mm/rev, irrespective of the spindle speed (rpm).

The feed of the axes, thereby, is coupled to the rotational speed (rpm) of the position-controlled spindle. It is valid only in conjunction with the G-function at which it had been programmed. In case of a change from G95 to G94 or G93, thus, the F-word, valid for G95, is not adopted.

Programming example

N10 F1000 X100 M3 S1200 (Feed 1000 mm/min (G94))

N20 G95 F1.5 (Feed 1.5 mm/rev., spindle speed 1200 1/min)

N30 G94 X50 (Feed 1000 mm/min from N10 is valid)

N40 G93 F20 X20 (Machining duration 20 s)

N50 G95 Y200 S2000 (Feed 1.5 mm/rev. from N20 valid,)

(spindle speed 2000 1/min)

N60 M30


Constant cutting speed (G96, G97, G196)

G96 Selection of constant cutting speed (modal)

G97 Deselection of constant cutting speed, selection of spindle speed (modal, default)

G196 Maximum spindle speed in the case of G96 (G196 not modal,
max. speed modal)

Using the G-functions G96, G97 and G196, the interpretation of the S-word (or S-strings) can be optionally changed:

G96 S in m/min (cutting speed )

G97 S in 1/min (spindle speed )

G196 S in 1/min (max. spindle speed during G96)

On selecting G96 the starting rpm of the spindle is given by the programmed cutting speed and the distance of the tool tip to the centre point of turning. This distance can be obtained from the last (not in the current NC-block) programmed position and the reference point offset of the face-turning axis. In the current machining plane (G17, G18, G19), exactly one face-turning axis must be present.

A cutting speed programmed for G96 using the S-word is valid only up to the deselection with G97. With G96 the activation of constant cutting speed occurs with the programming of the S-word first.

The specifying of a maximum spindle speed by G196 is optional and effective only during G96.

Close to the centre point of turning, the programmed maximum spindle speed (rpm) (G196) or the maximum spindle speed, specified in the assigned axis parameters [2]-17, determines the limits of constant cutting speed.

On deselection with G97, the lastly set spindle speed is maintained.

Traversing blocks of the face-turning axis in the rapid mode (G00) lead to an interruption of G96, thus undesired rpm-value changes while positioning the tool can be prevented. The next traversing block with G01, G02 or G03 cancels the suppression of G96.

Programming example

(X ... Face-turning axis)

N10 M03 S1000 G01 F1500 X100

N20 G196 S6000 (max. rpm. 6000 1/min)

N30 G96 S63 (Selection of const. cutting speed 63m/min,)

(Workpiece radius 100mm according to X-coordinates)

N40 X80

N50 S4 X50 (New cutting speed 4m/min; workpiece radius 80mm, at) (block end 50mm)

N60 G97 (Deselection const.cutting speed)

N70 S8000 (max. rpm. 6000 1/min here not effective!)

N80 G92 X-10 (Reference point offset in X by -10mm)

N90 G96 X60 (Cutting speed from N50 not valid: const.

(cutting speed not active, rpm-value 8000 1/min)

N100 S25 X70 (Cutting speed 25m/min, Workpiece radius 50mm (=60mm+BPV)

(Const. cuttting speed, active)

N110 G00 X450 (Rapid mode: rpm-value remains constant)

N115 X70

N120 G01 X40 (Suppression of G96 cancelled)

N110 M30


Thread cutting with endlessly rotating spindle (G33)

Syntax example for ZX-plane (longitudinal axis Z, transversal axis X):

G33 Z <expr> K <expr> [ <spindle_name>.OFFSET[ = ]<expr> ] (modal)

G33 Thread cutting with endlessly rotating spindle. The G33 function ist modal active. The next traversing block with a halting block type (G00, G01, G02, G03, spline, polynomial) deselects the thread cutting.

Z<expr> Target position ("thread length")

K<expr The thread lead is programmed under active thread cutting in the dimension mm/rev. without a mathematical sign using the letters I, J and K. These are assigned to X-, Y- and Z-axes.

The thread lead ist modal active until program end and should not be zero on selecting G33. The feed is not programmed using the F-word, but is obtained from the spindle speed and from the thread lead.

The lead of longitudinal threads or tapered threads having an angle of inclination less than 45° is specified by the address letter K, if the Z-axis is the longitudinal turning axis. In the case of transverse or tapered threads having an angle of inclination greater than or equal to 45°, the specification is done through I , if the X-axis is used as the face-turning axis, and through J if the Y-axis is used.

In Fig. 14.4 examples for specifying the thread lead using the addressing letters in the Z-X plane is shown.

<spindle_name> .OFFSET=<expr> Thread offset angle in modulo range of spindle. Optional, ist only required for multi-start threads. The offset angle ist modal active until program end. Spindle name in accordance with [1] -18. The "="-character is optional.

Fig. 14.4: Thread lead specification

Programming examples

Fig. 14. 5 : Illustration of geometry example

Cutting of a longitudinal thread (M70x1.5) with several cuts:

%L Longit_Thread

N100 G33 Z48 K1.5 Cut thread turn

N110 G00 X72 Retraction and move

N120 Z105 to start position

N130 M29 Sub program end

%G33 (thread depth 0.92 mm)

N10 G51 Selection of diameter programming

N15 T1 D1 M03 S400 Tool selection, start spindle

N20 G00 X72 Z105 Approach to starting point

N25 G01 X69.54 F1000 Positioning on 1. cutting depth

N30 LL Longit_Thread 1. cut

N35 G01 X69.08 Positioning on 2. cutting depth

N30 LL Longit_Thread 2. cut

N35 G01 X68.62 Positioning on 3. cutting depth

N30 LL Longit_Thread 3. cut

N35 G01 X68.16 Positioning on end depth

N30 LL Longit_Thread 4. cut

N35 G01 X68.16 Positioning on end depth again

N30 LL Longit_Thread Empty cut

N60 M05 X150 Z200 Moving to end position

N65 M30 Program end

Cutting of a 2-start longitudinal thread (M70x1.5):

%G33_2 (2-start thread, thread depth 0.92 mm)

N10 G51 Selection of diameter programming

N15 T1 D1 M03 S400 Tool selection, start spindle

N20 G00 X72 Z105 Approach to starting point

N25 G01 X68.16 F1000 Positioning on thread depth

N30 G33 Z48 K1.5 Cut 1. thread turn

N35 G00 X72 Retraction and move

N40 Z105 to next

N45 G01 X68.16 start position

N50 G33 Z48 K1.5 S.OFFSET=180 Cut 2. thread turn at 180°

N55 G00 X72 Retraction and move

N60 M05 X150 Z200 to end position

N65 M30 Program end


Tapping (G63)

Syntax example for XY-plane:

G63 Z<expr> F<expr> <spindle_name><expr> (modal)

G63 Tapping

Z<expr> Target position

F<expr> Feedrate

<spindle_name><expr> Spindle speed consisting of spindle name in accordance with [1] -18 and mathematical expression

For this kind of tapping (G63) the spindle is operated by the CNC in conjunction with the traverse path. In this case an exact dynamically adaptation of the spindle and the infeed motion of the axes is done. So a compensatory chuck is not necessary. The programmed feedrate must fit to the programmed spindle speed and the thread lead and is calculated to:

Feedrate F [mm/min] = Spindle speed S [rpm] * Thread lead [mm/rev]

G63 is deselected by the selection of a different modal block type (e.g. linear movement G01). A non-modal block type (e.g. dwell time with G04) does not deactivate G63.

The path feedrate (F-word) and the spindle speed (S-word) do not necessarily need to be specified in the same NC-block as G63. The last values programmed must always taken when computing the feedrate.

An error message is output if path feedrate or spindle speed are equal to zero with G63 selected.

No spindle M-functions (M03, M04, M05, M19) can be programmed during G63 for the spindle.

It must be ensured that the spindle has stopped before G63 is selected. This can be achieved by programming M05 (stop spindle) or M19 (position spindle) beforehand.

Cutting of a left-hand thread or retraction from a threaded bore are programmed with negative S-value.

Programming example 1

A thread with a lead of 1.25 mm and a depth of 50 mm is to be drilled. With a programmed spindle speed S of 200 rpm the calculated feed F is:

F = 200*1.25 = 250 mm/min

:

G63 Z-50 F250 S200 (Tapping)

Z50 S-200 (Retraction from threaded bore)

G01 F100 X100 ... (Deselection of tapping, linear arinterpolation)

:

Programming example 2

%Tapping

N05 X0 Y0 Z0

N10 G91

N20 M03

S100 X100 M19 S.POS180 Z100 (Positioning tool and spindle)

N30 G63 Z-100 F300 S200 (Tapping)

N40 Z100 S-200 (Retraction from threaded bore 1)

N50 G01 X200 F3000 M5 (Positioning tool and spindle)

N60 G63 Z-70 F300 S200 (Tapping)

N70 Z70 S-200 (Retraction from threaded bore 2)

N80 M05 G01 X300 F1000 (Deselection of tapping, linear interpol.)

N90 M30


C-axis machining

This functionality supplements the existing turning functions and enables the face and lateral surface machining of cylindrical work pieces on lathes and milling machines with revolving base. In this process, the work piece is moved by the rotatory axis or a spindle (C-axis), and the driven tool (such as a cutter) is moved by the two translatory axes X (or Y) and Z. For the C-axis machining specific settings in the parameters [1]-53, [2]-9 are necessary.

Facing and lateral surface machining can be described in cartesian coordinates.

All interpolation types (such as linear, circular, or spline interpolation) are supported on the end face and on the lateral surface. The functionality also enables path contours that run across the turning center. For lathes it is machined with automatic alignment of the C axis.

The 2.5-D tool radius compensation can be used with the familiar G commands.

With contours near the turning center, in particular, using the extended dynamic monitoring function prevents that dynamic axis characteristics are exceeded.

More:

button Machining modes

button Switching between C-axis modes


Machining modes

The main axes for all machining modes are X or Y (depending on the machine type), Z and C.

More:

button Mode 1: Inclusion of the spindle into the path compound

button Mode 2: Facing

button Mode 3: Lateral surface


Mode 1: Inclusion of the spindle into the path compound

This "basic mode" is especially necessary for the C-axis machining on lathe because in this case the position controlled spindle has to be converted into a rotary axis (e.g "C").

On milling machines and machining centers, which have rotatory workpiece fixture (e.g. revolving base), also a C-axis maching is possible. In this case the selection of mode 1 (#CAX) is not necessary.

The three physical axes X or Y, Z and C can be programmed directly. The linear axes in Cartesian coordinates and the C-axis in angle units.

Radius / diameter programming depends on G52 / G51.

The two linear axes define the main plane.

ZX (G18) or YZ (G19).

#CAX [ [ [<main_spindle_name>, ] <C-axis_name> ] ]

<main_ spindle_name> Only the main spindle name can be programmed in accordance with [1] -18. If a spindle other than the C-axis is used, this must be declared the main spindle first (see Programming example or Chapter 14.4 ). Otherwise an error message is output.

<C-axis_name> Freely definable name of the C-axis in the NC-program. If no C-axis name is programmed, the default name from [1] -23 is used.

The main plane (circular interpolation, tool radius compensation, etc.) is just the same as before when activating the C-axis.

An error will be generated if a command for this spindle (M3, M4, M5, etc.) is programmed before canceling the conversion.

The C-axis is converted again into spindle interpolator by:

#CAX OFF

Programming example

:

#CAX (Assumption: default C axis is C)

G01 G90 X50 Z10 C90 F200

#CAX OFF (Deselection C-axis mode)

...

#CAX[S, C] or #CAX[C] (Assumption: main spindle is S)

G01 G90 X50 Z10 C90 F200

#CAX OFF

...

#MAIN SPINDLE [S2] (S2 becomes the new main spindle S)

#CAX[S, C] (Selection C-axis mode)

G01 G90 X50 Z10 C90 F200

...

#CAX OFF (Deselection C-axis mode)

...

#CAX[S3, C] (Error, S3 is not a main spindle)


Mode 2: Facing

This mode is useful in lathes and machining centers. The desired contour on the face is programmed in millimeters (or inches) using a virtual cartesian coordinate system.

For programming a contour on the face, the three logical axes X, Y ( resp. C) and Z are available. The contour will be programmed in cartesian coordinates.

The following figure shows the available main planes in the face machining. Only the G17 plane is of technological importance.

#FACE [ <1.main_axis_name>, <2.main_axis_name> ]

<1.main_axis_name> Axis name of the first main axis in accordance with the current main plane.

<2.main_axis_name> Axis name of the second main axis in accordance with the current main plane (virtual cartesian axis).

The main plane (circular interpolation, tool radius compensation, etc.) is the one defined by the 1st main plane axis and 2nd main plane axis.

Additional axes can be programmed and they are not affected by the transformation.

This mode is canceled by:

#FACE OFF

The command above returns to the last active mode (e.g. mode 1). This means, the last active main plane is selected automatically and the last active axes offsets are restored.

Programming example for lathes

Example with axis name "C" for second main axis.

:

#CAX[S, C] (Assumption: main spindle is S)

#FACE[X, C] (Selection of facing)

:

G01 X40 C-30 Z50 F1000 (Pre positioning)

G01 Z30 (Infeed)

G01 X10 C40 (Move contour)

G01 Z50 (Retraction)

:

#FACE OFF

#CAX OFF

Example with axis name "Y" for second main axis.

Hint: An axis with the identical name "Y" may not already exist in NC channel:

:

#CAX[S, Y] (Assumption: main spindle is S)

#FACE[X, Y] (Selection of facing)

:

G01 X40 Y-30 Z50 F1000 (Pre positioning)

G01 Z30 (Infeed)

G01 X10 Y40 (Move contour)

G01 Z50 (Retraction)

:

#FACE OFF

#CAX OFF

Programming example for machining centers

Example: The rotary axis (tool piece axis) in channel is "C2". Programming the command #CAX is not necessary.

:

#FACE[X, C2] (Selection of facing)

:

G01 X40 C2=-30 Z50 F1000 (Pre positioning)

G01 Z30 (Infeed)

G01 X10 C2=40 (Move contour)

G01 Z50 (Retraction)

:

#FACE OFF


Mode 3: Lateral surface

This mode is useful in lathes and machining centers. The desired contour on the cylindrical surface is programmed in millimeters (or inches) using a virtual coordinate system.

For programming a contour on the lateral surface, the three logical axes X, Y, Z are available. The contour will be programmed on the developed lateral surface in Cartesian coordinates. In this mode the reference radius R of the work piece must be programmed additionally.

In the lateral surface machining the main plane will be formed by Z-C.

#CYL [ <1.main_axis_name>, <2.main_axis_name>, <3.main_axis_name><expr> ]

<1.main_axis_name> Axis name of the first main axis in accordance with the current main plane.

<2.main_axis_name> Axis name of the second main axis in accordance with the current main plane (virtual linear axis, flat projection).

<3.main_axis_name><expr> Axis name of the third main axis in accordance with the current main plane with specification of the reference radius.

The main plane (circular interpolation, tool radius compensation, etc.) is the one defined by the 1st main plane axis and 2nd main plane axis. A change of the main plane by G17, G19 is not allowed.

Additional axes can be programmed and they are not affected by the transformation.

This mode is canceled by:

#CYL OFF

The command above returns to the last active mode (e.g. mode 1). This means, the last active main plane is selected automatically and the last active axes offsets are restored.

Programming example for lathes

Example with axis name "C" for second main axis.

:

#CAX [S, C] (Selection of lateral surface machining)

G01 X60 C45 (Setting- and positioning; X:60mm C:45°)

#CYL [Z, C, X60]

G00 G90 Z0 C0 (Z: 0mm C:0mm!)

G01 C100 F500

G02 Z100 R50

G01 C0

Z0

...

...

...

#CYL OFF

#CAX OFF


Switching between C-axis modes

Deselecting of all C-axis modes is done regularly via the deselecting commands (for example via command #CYL OFF). The direct transition to the different modes without deactivation of current active mode is allowed between mode 2 and 3. So for example a typical NC-sequence for transition of C-axis modes is programmed as following:

Programming example

N10 #CAX [..] (Inclusion of the LR-spindle into the path compound)

..............

N120 #FACE [..] (Selection of facing)

..............

N230 #CYL [..] (Direct transition to lateral surface machining)

.........

N300 #CYL OFF (Deselection of lateral surface machining and)
(transition to conventional machining with physical ) (C-axis)

N400 #CAX OFF (Return of the C-axis to the position controlled)
(spindle)


Gear change (G112)

G112 <spindle_name><expr> (non-modal)

G112 Gear change

<spindle_name><expr> Gear data record consisting of the spindle name in accordance with decoder parameter list and mathematical expression

Unlike gear changing via M40-45, in which the mechanical gear change operation is also performed implicitly, programming G112 together with the S-word triggers only updating of the spindle gear data (dynamic values) of one stage.

Mechanical changing of the right gear stage must be programmed by the user explicitly, e.g. by self-defined M-functions or like mentioned above via M40-45.

The spindle has to be in standstill before changing of gear data record. This can be achieved in a previous NC block by programming a spindle stopp (M5) or a spindle positioning (M19)

Programming example

%Test_G112

N010 G112 S2 (Load dynamic data of gear range 2 for spindle S)

N020 M3 S9000

N030 M5 (Stop spindle)

N040 G112 S1 (Load dynamic data of gear range 1 for spindle S)

N050 M4 S8000

N060 M30


Homing (G74)

G74 <spindle_name><dummy_expr> (non-modal)

G74 Homing

<spindle_name><dummy_expr> Spindle name in accordance with [1] -18 with specification of a mathematical expression.

A reference search can be conducted for closed-loop position-controlled spindles. Unlike referencing of linear axes, the values programmed with the spindle name have no significance in respect of the order of referencing but are required only for representation of complete syntax.

Programming the spindle M-functions is not allowed in the same NC-block as G74.

A distinction must be made in the following cases when referencing spindles:

Programming example

1. Referencing of the spindle starts simultaneously with Y-axis referencing:

Nxx G74 X2 Y1 S1

2. As for 1.! The system continues with the next NC-block without waiting until the spindle has been referenced so that the X-axis is references quasi-simultaneously:

Nxx G74 S1

Nyy G74 X1 Y2

3. Axes X and Y are referenced first. Spindle referencing then commences:

Nxx G74 X1 Y2

Nyy G74 S1


Override (G167)

G167 <spindle_name><expr>] (non-modal)

G167 Set spindle override to 100 %

<spindle_name><expr> Spindle speed consisting of spindle name in accordance with [1] -18 and specification of a mathematical expression.

Function G167 deactivates external influencing of spindle override and implements the speed actually programmed.

Programming example

:

N10 M3 S1000 (With override 50% speed is 500 U/min.)

N20 G167 S1000 (Override influencing off, speed is 1000 U/min.)

N30 S3000 (Override influencing active again, speed is 1500 U/min.)

Nxx


Programming in spindle-specific syntax

Spindle-specific syntax affords the advantage that several spindles can be programmed mutually independently in one NC-block.

This is carried out within a bracketed expression attached to the spindle name. Only specific commands are permitted in this bracketed expression, and these commands are always handled and executed spindle-specifically. The main spindle must be programmed by the main spindle name [1]-18.

<spindle_name> [ [ M3 | M4 | M5 | M19 ] [ REV<expr> ] [ POS<expr> ] { M<expr> } { H<expr> }

[ G74 ] [ G167] [ CALLAX | PUTAX | GET_DYNAMIK_DATA ]

[ [ G135 | G137 ] [ G136 <expr> ] ] ] { <spindle_name>[ .... ] }

<spindle_name> Spindle designation acccording to [1]-16/-18

M3, M4, M5, M19 Spindle-M-Functions

REV<expr> Spindle speed

POS<expr> Spindle position

M<expr> User specific M-Functions

H<expr> User specific H-Functions

G74 Homing

G167 Spindle override 100%

CALLAX Requesting of axes

PUTAX Releasing of axes

GET_DYNAMIK_DATA Taking over of dynamik tool data

G135, G136<expr>, G137 Feedforward control

Programming example

:

N10 S[M3 REV500 M19 POS45 M18 M15 H20 ...] S2[M4 REV5000]

Nxx

:

More:

button The spindle M-functions

button Spindle speed (REV)

button User-specific M/H-functions

button Homing (G74)

button Override (G167)

button Releasing/requesting spindle axes (PUTAX/CALLAX)

button Acceptance of tool dynamic data (GET_DYNAMIC_DATA)

button Spindle specific feedforward control (G135, G136, G137)

button Spindle feed link (FEED_LINK)


The spindle M-functions

More:

button Move spindle (M3/M4/M5)

button Positioning spindle (M19, POS)


Move spindle (M3/M4/M5)

M03 | Spindle rotation clock wise (cw) | (modal)
M04 | Spindel rotation counter clock wise (ccw) | (modal)
M05 | Spindel stop | (modal)

The spindle M-functions M03 and M04 define the spindle direction of rotation and must be used in conjunction with the spindle speed (REV-word). M05 stops spindle rotation. Note that this spindle M-function is the default spindle mode after boot-up of the control system and the first time the program is started. These M-functions have a stopping action and may each be programmed only on their own within the bracketed expression.

Spindle rotation is activated if M03 or M04 has been programmed and a valid speed (REV) is set.

If no M05 is set at the end of the program, the spindle continues to rotate.

Programming example

Programming of one spindle S:

N10 S[REV1000] (Speed 1000 U/min. is stored, no spindle rotation)
(because M05 is default)

N20 S[M03] (Spindle rotation cw with 1000 U/min.)

N30 S[M04] (Spindle rotation ccw with 1000 U/min.)

N40 S[REV500] (Spindle rotation ccw with 500 U/min.)

N50 S[M05 REV300] (Spindle rotation, speed 300 U/min. is stored)

N60 S[M04] (Spindle rotation ccw with 300 U/min.)

N70 S[M05] (Spindle stops)

N80 S[M03 REV1000] (Spindle rotation cw with 1000 U/min.)

N90 M30 (Program end)

812_start

812_end

Programming example

Programming of two spindles S and S2:

N10 S[M03 REV1000] S2[M04 REV2000] (S cw 1000 U/min., S2 ccw 2000 U/min.)

N20 S[M05] S2[REV1500] (S stop, S2 ccw with 1500 U/min.)

N30 S[M04] (S ccw 1000 U/min.)

N40 S2[M05] (S2 stop)

N50 S[M05 REV300] (S stop, speed 300 U/min. is stored)

N60 S[M04] S2[M04] (S ccw 300 U/min., S2 ccw 1500 U/min.)

N70 S[M05] S2[M05] (S stop, S2 stop)

N80 M30 (Program end)

812_start

Extract from channel parameters list [1]:

The synchronization modes must be defined spindle-specifically for M3, M4, M5. The M-function is not executed in the case of synchronization mode 0 (NO_SYNCH).

:

spindel[0].bezeichnung S1

spindel[0].log_achs_nr 6

spindel[0].s_synch 0x00000001

spindel[0].m3_synch 0x00000002

spindel[0].m4_synch 0x00000002

spindel[0].m5_synch 0x00000008

spindel[0].m19_synch 0x00000001

:

812_end


Positioning spindle (M19, POS)

M19 | Spindle positioning | (non-modal)
POS | Spindle position | (modal)

The spindle M-function M19 results in spindle positioning and must be used in conjunction with the POS-word. M03/M04 resp. the spindle speed (REV) in the same NC-block are optional. However, a valid spindle speed (> 0) must be set. M19 may not be used together with M5 (spindle stop).

Spindle position POS is modal and does not need to be specified again if programming M19 again. If no spindle position has been programmed before, the motion is to default position "zero".

If the spindle is not rotating, positioning is executed with the shortest traverse path.

The spindle positioning with M19 is only allowed for position controlled spindles (closed loop).

Programming example

Programming of one spindle S:

N10 S[REV100 POS45 M19 M3] (Spindle rot. cw with 100 U/min. to pos. 45)

N20 S[M03 REV1000] (Spindle rot. cw with 1000 U/min.)

N30 S[M19 M4 REV150] (Spindle rot. ccw with 150 U/min. to pos. 45)
(->POS is modal!)

N40 S[M05] (Spindle stop)

N50 S[M19] (Move at shortest distance with 150 U/min. to)
(position 45)

N60 S[REV200 M19 POS90] (Move at shortest distance with 200 U/min. to)
(position 90)

N70 S[M03 REV1000] (Spindle rotation cw with 1000 U/min.)

N80 S[M05] (Spindle stop)

N90 M30 (Program end)

812_start

812_end

Programming example

Programming of two spindles S and S2:

(For N10: Move both spindles cw with 1000 U/min. to position 45)

N10 S[M03 REV200 M19 POS45] S2[M04 REV200 POS45 M19]

N20 S[REV1000] S2[REV1500] (S cw with 1000 U/min.,
(S2 ccw with 1500 U/min.)

N30 S[M04] (S ccw 1000 U/min.)

N40 S2[M19 POS0] (Move S2 ccw to position 0)

N50 S[M05 REV300] (S stop, 300 U/min. is stored)

(For N60: Move S cw with 300 U/min. to position 90),

(For N60: Move S2 cw with 200 U/min. to position 45)

N60 S[M03 M19 POS90] S2[M03 REV200 POS45 M19]

N80 M30 (Program end)

812_start

Extract from channel parameters list [1]:

The synchronization mode must be defined spindle-specifically for M19. The M-function is not executed in the case of synchronization mode 0 (NO_SYNCH).

:

spindel[0].bezeichnung S1

spindel[0].log_achs_nr 6

spindel[0].s_synch 0x00000001

spindel[0].m3_synch 0x00000002

spindel[0].m4_synch 0x00000002

spindel[0].m5_synch 0x00000008

spindel[0].m19_synch 0x00000001

:

812_end


Spindle speed (REV)

Values can be assigned directly or by means of parameters to the REV-word, and decimal numbers are also permitted (REAL64 format).

A distinction must be made between the following types of use in conjunction with the spindle M-functions in the case of the REV-word:

q REV-word in conjunction with M03, M04, M19:

If the REV-word is programmed in conjunction with M03/M04 or M19, the value following the REV-word is interpreted as the spindle speed and output to the spindle.

q REV-word in conjunction with M05:

Together with M05, the value following the REV-word is transferred to the working data of the spindle speed but not output to the spindle.

The REV-word on its own does not generate a movement in the NC-program. A spindle mode M03, M04, M19 must be known for this. Accordingly, programming of M03, M04 and M19 only results in a movement if the REV-word is set.

An error message is output in the case of a negative REV-value.

Programming example

Programming with spindle S1:

N10 S1[REV300] (Speed 300 U/min. is stored)

N20 S1[M04] (Spindle rotation ccw with 300 U/min.)

N30 S1[M03 REV]1000 (Spindle rotation cw with 1000 U/min.)

N40 S1[REV500] (M03 active, spindle rotation cw with 500 U/min.)

N50 S1[M05 REV100] (Spindle stop, speed 100 U/min. is stored)

N60 S1[M04] (Spindle rotation ccw with 100 U/min.)

N70 S1[M05] (Spindel stop)

N80 M30 (Program end)

812_start

Extract from channel parameters list [1]:

The synchronization mode must be defined spindle-specifically for the S-word. An error message is generated in the case of synchronization mode 0 (NO_SYNCH) since an S-word may not be ignored.

:

spindel[0].bezeichnung S1

spindel[0].log_achs_nr 6

spindel[0].s_synch 0x00000001

spindel[0].m3_synch 0x00000002

spindel[0].m4_synch 0x00000002

spindel[0].m5_synch 0x00000008

spindel[0].m19_synch 0x00000001

:


User-specific M/H-functions

All user-specific M/H-functions (technology information) programmed within the bracket expression are always handled and output spindle-specifically.

Programming example

Programming of one spindle S2 with two user specific M-functions:

N10 S2[M3 REV300 M10 M11] (S2 cw with 300 U/min.and executes M10/ M11)

N20 M30 (Program end)

Programming of two spindles S and S2:

N10 S[M10 M11] S2[REV1000 M3 M11] (S executes M10 and M11, S2 rotates cw)
(with 1000 U/min.and executes M11)

N20 M30 (Program end)

812_start

Extract from channel parameters list [1]:

The user-specific M/H-functions are defined in the decoder parameter list [1]. The M/H-function is not executed in the case of synchronization mode 0 (NO_SYNCH).

:

# Definition of the M-functions and types of synchronisations

# ======================================================

m_synch[1] 0x00000001 MOS

m_synch[2] 0x00000002 MVS_SVS

:

m_synch[10] 0x00000002 MVS_SVS

m_synch[11 0x00000008 MNS_SNS

m_synch[12] 0x00000004 MVS_SNS

m_synch[48] 0x00000008 MNS_SNS

m_synch[49] 0x00000002 MVS_SVS

:

:

# Definition of the H-functions and types of synchronisations

# =====================================================

h_synch[1] 0x00000001 MOS

h_synch[2] 0x00000001 MOS

:

812_end


Homing (G74)

Reference search can be executed spindle-specifically. Programming of the spindle M-functions is not allowed together with G74.

Programming example

Programming of two spindles S and S2:

N10 S[G74] S2[G74] (Homing of S and S2)

N20 M30 (Program end)


Override (G167)

Function G167 deactivates external influencing of spindle override spindle-specifically and implements the actually programmed speed of rotation.

Programming example

Programming of one spindle S2:

N10 S2[M3 REV1000] (With override 50% speed is 500 U/min.)

N20 S2[G167 REV1000] (Override influencing off, speed 1000 U/min.)

N30 S2[REV3000] (Override influencing active again,)
(speed 1500 U/min.)

N40 M30 (Program end)


Releasing/requesting spindle axes (PUTAX/CALLAX)

The availability of this function depends on the configuration and the concrete scope of version.

These commands allow the spindle axis to be released or fetched spindle-specifically. The commands may not be used simultaneously together with other spindle-specific commands.

Programming example 1

%s-putcallax

(Move axis as spindle)

N10 S[CALLAX]

N20 M03 S1000

N30 G04 X2

N40 M05

(Exchange axis from spindle interpolator in channel)

N50 S[PUTAX]

N60 #CALL AX[ C, 4, 3]

(Drive axis in channel)

N70 X10 Y20 Z30 C40

N80 X-10 Y-20 Z-30 C--40

(Exchange axis from channel in spindle interpolator)

N90 #PUT AX[C]

N100 S[CALLAX]

(Move axis again as spindle)

N110 M04 S1000

N120 G04 X2

N130 M05

N140 M30

Programming example 2

Programming of multiple spindles:

:

N10 S[CALLAX] S2[CALLAX] S3[PUTAX] (S, S2 request axes,)
(S3 releases their axis)

N20 S[M3 REV200] S2[G74) (S rotates cw with 200 U/min.), S2 is homing)

N30 S3[ M4 REV3000] (Error, S3 has no axis)

N40 S[PUTAX REV400) (Error, PUTAX is not programmed exclusively)

:


Acceptance of tool dynamic data (GET_DYNAMIC_DATA)

The availability of this function depends on the configuration and the concrete scope of version.

The tool dynamic data (minimum/maximum speed, max. acceleration) takes effect automatically on transition of the spindle from standstill to interpolation after programming a new tool (D-word, #TOOL DATA). Changed tool dynamic data is accepted and allowed for at constant speed of rotation by the spindle-specific command "GET_DYNAMIC_DATA". This command may not be used simultaneously together with other spindle-specific commands.

Programming example

N10 T1 D1 (Support of tool dynamic data inside the)
(standard tool data)

N15 M6 (Tool change of WZ 1)

N20 S[M3 REV2002] (S rotates 2000 U/min. with tool dynamic data)
(of D1)

N25 X100 Y100 (Movement block with tool dynamic data of D1)

N30 T99 D99 (Support of new tool dynamic data inside the
(standard tool data)

N35 X200 Y150 (Movement block with tool dynamic data of D1)

N40 S[GET_DYNAMIC_DATA] (Taking over tool dynamic data D99)

N45 X150 Y200 (Movement block with tool dynamic data of D99)

N50 X50 Y50 (Movement block with tool dynamic data of D99)

N60 S[M05] Z100 (Spindel stop)

N99 M30 (Program end)


Spindle specific feedforward control (G135, G136, G137)

The availability of this function depends on the configuration and the concrete scope of version.

This command allows the spindle specific programmimg of feedforward control. The commands may not be used simultaneously together with other spindle-specific commands.

The activation is programmed with G135. Spindle-specific, percentage weighting of the calculated feedforward control variables is done with G136. It is limited to 100%. G137 deactivates the feedforward control. It is also possible to enter the selection and weighting of the feedforward control into the same command sequence.

If the feedforward control is switched on or off during the NC-program, the weighting factors remain on the values set through G136, or if no G136 is programmed on 100%.

Programming example

S[G135] Activation of feedforward control for S

S[G136=80] Definition of weighting in percent

S[G137] Deactivation of feedforward control

S2[G135 G136=90] Activation and weighting 90% for S2

S2[G136=0] Change of weighting on 0%

S1[G135] Activation and default weighting 100% for S1


Spindle feed link (FEED_LINK)

Normally the speed of a spindle is only controlled by the program. Other possibilities of influencing the spindle speed in dependency of other parameters in general do not exist. For some special technologies (e.g. HSC-milling, edge bending in the wood machining) and for the creation of a high-qualitiy work piece surface also the influencing of the spindle speed by external variables is necessary.

With the following command the spindle specific speed can be adapted dynamically to the path feed. Especially this is necessary for some materials, which can be damaged by wrong or unsuited cutting parameters (e.g. wood or plastic).

The dynamic data of the spindle are not considered. To avoid a too large deviation between the commanded and the actual link factor during active feed linking, the user has to ensure, that either the spindle dynamic is high enough or the path dynamic is reduced corresponding to the requirements.

Programming syntax for spindle feed link:

<spindle_name> [ FEED_LINK [ ON | OFF ] [ [ [ FACT<expr> ] [ CORR<expr> ] ] | AUTO ] ]

<spindle_name> Name of the feed link spindle

FEED_LINK Identification for "spindle feed link". Must always be the first programmed keyword.

ON Selection of spindle feed link

OFF Deselection of spindle feed link

FACT<expr>Synchronized link: Predefined link factor in [0.1 %] between feed on path (F-word) and the basic spindle speed. The link factor can be changed at any time during active linking.

CORR<expr> Correction factor in [0.1 %] for the modification of the link factor. The resulting link factor then is a combination of FACT and CORR (CRES = FACT*CORR).

AUTO Link on the fly: The link factor is calculated automatically from the current speed of the spindle and the current feed on path and it remains constant until deselection of linking.

q The keyword AUTO only can be programmed in combination with ON or OFF. FACT and CORR even can be programmed again during already active feed link.

q At the moment of link selection the spindle has to be in the state endless rotation with a speed != 0. Also the feed on path has to be != 0 during automatic determination of the link factor.

q The spindle speed active at deselection of feed link stays in use as commanded spindle speed. If necessary, the spindle speed has to be redefined via the S word after deselection of feed link.

A spindle job via the S word has no effect during active feed link!

A tool with dynamic parameters should be defined and activated. In general by the minimum speed of this tool [5] -1 it can be avoided, that the spindle during milling with active feed link and feed on path = 0 comes to a stoppage and a jamming of the tool occurs.

Programming examples

Example 1: (Manually programmed link factor, the effective link factor is changed by programming of the correction factor).

N05 G00 X0 Y0 Z0

N08 G01 G90 X20 F2

N10 M03 S15

N20 G01 G90 X40

N25 S[FEED_LINK ON FACT=500]

N30 G01 G91 X5 F2

N40 S[FEED_LINK CORR=1100]

N50 X10 F2

N60 S[FEED_LINK CORR=900]

N70 X20 F2

N80 S[FEED_LINK CORR=1100]

N90 X40 F2

N100 S[FEED_LINK CORR=900]

N110 X80 F2

N120 S[FEED_LINK CORR=1100]

N130 X40 F2

N140 S[FEED_LINK CORR=900]

N150 X20 F2

N160 S[FEED_LINK CORR=1100]

N170 X5 F2

N180 S[FEED_LINK OFF]

M30

Example 2: (Coupling on the fly, link factor is generated automatically from the current spindle speed and the current feed on the trajectory).

N05 G00 X0 Y0 Z0

N08 G01 G90 X20 F1

N10 M03 S15

N20 G01 G90 X40

N25 S[FEED_LINK ON AUTO]

N30 G01 G91 X5 F1

N40 X10 F2

N50 X20 F4

N60 X40 F8

N70 X80 F16

N80 X40 F8

N90 X20 F4

N100 X10 F2

N110 X5 F1

N80 S[FEED_LINK OFF]

M30


Change of main spindle

#MAIN SPINDLE [ [ <spindle_name> | <spindle_number>] ]

<spindle_name> Default spindle name in accordance with [1] -16.

<spindle_number> Logical axis number of the spindle in accordance with [1] -16.

Command #MAIN SPINDLE can be used to change the definition of the main spindle in the NC-program. The new main spindle is selected by specifying the default name [1]-16 or the related logical axis number..

The basic state (as after boot-up) can be restored without programming a spindle name, i.e. the spindle preset in the channel parameters list [1]-17 becomes the main spindle again.

812_start

Extract from channel parameters list [1]:

Example configuration of a single-channel system with three spindles. Spindle with axis number 6 is the main spindle:

:

# Spindle data

# ============

spdl_anzahl 3

main_spindle_ax_nr 6

main_spindle_name S

:

spindel[0].bezeichnung S1

spindel[0].log_achs_nr 6

:

spindel[1].bezeichnung S2

spindel[1].log_achs_nr 11

:

spindel[2].bezeichnung S3

spindel[2].log_achs_nr 30

:

Configuration after boot-up:

S1 is the main spindle with name S.

S2 and S3 are other spindles.

812_end

Programming example

%

N10 S100 M3 S2[REV200 M3] S3[REV300 M4]

N20 #MAIN SPINDLE [S2] (S2 is new main spindle "S")

N30 S110 M3 S1[REV210 M3] S3[REV310 M4]

N40 #MAIN SPINDLE [S3] (S3 is new main spindle "S")

N50 S120 M3 S1[REV220 M3] S2[REV320 M4]

N60 #MAIN SPINDLE (Back to default state S1 -> "S")

N70 S150 M3 S2[REV250 M3] S3[REV350 M4]

N80 M5 S2[M5] S3[M5] (All spindles STOP)

N99 M30

For as long as a spindle is a main spindle, either it can be programmed with the main spindle name [1] -18 or with the default name [1] -16. It can only be addressed exclusively under its default name again after selection of another main spindle with #MAIN SPINDLE[ ].

For the example mentioned above following spindle names are valid:

Permissible names | Spindle 1 | Spindle 2 | Spindle 3
...after startup | S or S1 | S2 | S3
...after #MAIN SPINDLE [S2] | S1 | S or S2 | S3
...after #MAIN SPINDLE [S3] | S1 | S2 | S or S3
...after #MAIN SPINDLE | S or S1 | S2 | S3

As already mentioned, the main spindle can be programmed in the conventional DIN syntax. In this case, all commands in accordance with Tab. 14-1 can be used. The main spindle may, however, also be programmed in the spindle-specific syntax. In this case however, only the restricted command set then is available (see also Tab. 14-1).

Programming example

For the main spindle the following part program blocks are equally permissible:

:

N10 S1=1000 M3 or

N20 S1000 M3 or

N30 S1[REV1000 M3] or

N40 S[REV1000 M3]

:


Synchronous spindle operation

Besides synchronous operation of path axes, (definition, activation, deactivation), the LINK command can also be used to define master/slave relationships for spindle axes.

#SET AX LINK [ <expr> , <slave>= <master> {, <slave>= <master>} ]

or alternative

#AX LINK [ <expr> , <slave>= <master> {, <slave>= <master>} ]

<expr> Number of the coupling instruction.

<slave> Designation of the slave spindle of the coupling pair i

<master> Designation of the master spindle of the coupling pair i

In this case, the following rules apply in addition to Chapter Synchronous operation:

q The coupling pairs are defined by means of the spindle names known on the channel, i.e. only the spindles known on the channel can be coupled.

q In the channel parameters list [1]-13, coupling group 0 can be preset as the default group. This can be addressed directly with #ENABLE AX LINK [0] after boot-up. It cannot be redefined in the NC-program.

q The spindle names as known after boot-up in the NC-kernel must be used to define this default coupling group [1]-16/-18.

Programming example

Information in the channel parameters list [1]: S (main spindle name S1), S1, S2, S3

->The coupling pairs may be formed with spindle name S, S2 and S3. An error message is generated in the case of S1!

Programming and selection/ deselection of a spindle coupling:

N10 #SET AX LINK[1, S2=S, S3=S] (Main spindle is master for S2 and S3)

N20 #ENABLE AX LINK[1] (Activation of spindle couplings)

N30 S1000 M3 (Main spindle S and S2 and S3 are rotating cw )
(with 1000 U/min.)

N40 DISABLE AX LINK (Deactivation of spindle couplings)

N40 M30 (Program end)

q No differing axis types may be defined in a #SET AX LINK-command within a coupling pair. The coupling pairs may, however, form a coupling group with coupling pairs of another axis type.

Examples:

#SET AX LINK [1, B=S, S2=X] FALSE

#SET AX LINK [1, B=X, S2=S] ALLOWED

q During an active coupling group, a spindle present in this group may not be declared the main spindle with #MAIN SPINDLE [..] since, otherwise, this would result in inconsistencies between decoder and interpolator.

q Moreover, the programmer must be aware that using #MAIN SPINDLE [..] may, possibly, mean that already defined coupling groups can no longer be activated since the spindle names are no longer consistent.

q The technology information for M03, M04, M05 is synchronized by the NC-kernel both for the master spindle and for the slave spindle.

q External movement influencing of the master spindle with FEEDHOLD and OVERRIDE does not act on the slave spindles. Also during active coupling the slave spindles continue evaluating their own OVERRIDE and FEEDHOLD interfaces.

q Master and slave spindles move to the same absolute position in the case of M19. The position may, possibly, not be reached simultaneously if the start position or the dynamic data of the spindles differs.

q The coupling is cancelled if the program is aborted.

q If a spindle is active as master or as slave, it may be tasked only by the channel which activated the link.

812_start

Extract from channel parameters list [1]:

:

# Predefintion of possible axis links for synchronous operation

# ====================================================

#synchro_data.koppel_gruppe[0].paar[0].log_achs_nr_slave 4

#synchro_data.koppel_gruppe[0].paar[0].log_achs_nr_master 1

#synchro_data.koppel_gruppe[0].paar[0].mode 0->AX_LINK

#synchro_data.koppel_gruppe[0].paar[1].log_achs_nr_slave 11

#synchro_data.koppel_gruppe[0].paar[1].log_achs_nr_master 6

#synchro_data.koppel_gruppe[0].paar[1].mode 1 ->SPDL_LINK

:

812_end


Cross-block synchronization (Late Sync)

More:

button Implicit synchronization

button Explicite synchronization


Implicit synchronization

Acceleration and deceleration operations of the spindle may lead to substantial dead times in program execution since, frequently, in the case of machine standstill, the spindle needs to be set to the required speed first (e.g. M03 of type MVS_SVS) resp. during a positioning block with G00 (M3 of type MVS_SNS).

For M-functions, implicit synchronization provides the option of only checking the acknowledgement if switching over to a machining operation with G01/G02/G03/G151 etc. This behavior is achieved with synchronization mode MVS_SLM. The identifier can be used only exclusively with respect to the other synchronization modes [1] -3.

Programming example

:

N10 G00 M03 S1000 Z600 (M03: Synchronization mode MVS_SLM)

N20 X100 Y100

N30 Z400

N40 G01 Z200 (Check, if M03 is acknowledged)

:

In N40, the interpolator checks for acknowledgement of the M-function at the start of the braking instant. If the acknowledgement has been output, there is no halt at the end of the block. If no acknowledgement has been output, deceleration occurs and if no acknowledgement has been output by the end of the block, the system stops at the target point.

It is possible to program further channel-specific M-functions until synchronization by a motion block. Synchronization of a channel-specific M-functions is handled entirely in parallel with axis-specific synchronization.


Explicite synchronization

If G01 is used for positioning, no implicit synchronization in accordance with Chapter 14.6.1 can be performed.

Command #EXPL SYN is available for this for cross-block synchronization, and this allows explicit synchronization of M-function.

#EXPL SYN (non-modal)

An M-function which is to be synchronized via this additional command is defined with synchronization mode MVS_SLP in the channel parameters list [1]-3. The identifier can be used only exclusively with respect to other synchronization modes [1]-3.

Programming example

:

N10 G01 M03 S1000 Z200 F5000 (M03: Synchronization mode MVS_SLP)

N20 X100 Y100

N30 Z400

N40 #EXPL SYN (Check, if M03 is acknowledged)

:

At the braking instant, the path, on the basis of instruction "#EXPL SYN", checks whether the acknowledgement has arrived. A ramp-down occurs if this is not the case.

Further channel-specific and axis-specific M-functions can be processed prior to the synchronization command.


Synchronization of the spindle M-functions

Synchronization between the interpolator and the relevant spindle is performed directly, i.e. the acknowledgement of M03, M04 (speed reached) and M05 (speed zero) is performed by the spindle itself. Bit PLC_INFO which can be set in addition to the existing synchronization modes [1]-3 determines whether the PLC is also to be informed for acknowledgement. Note the following in this case:

In the case of velocity-controlled spindles, the PLC is also informed for acknowledgement automatical on a general basis in the case of each spindle M-function. It is thus not required to also set the PLC_INFO bit.

It is practical to use the PLC_INFO bit in the case of position-controlled spindles. In this case, the PLC_INFO bit can be set for each spindle M-function in addition to the synchronization mode, thus causing the PLC to be informed for acknowledgement.

812_start

Extract from channel parameters list [1]:

Spindle S1 shall be a position controlled spindle.

:

spindel[0].bezeichnung S1

spindel[0].log_achs_nr 6

spindel[0].s_synch 0x00020001 PLC_INFO, MOS

spindel[0].m3_synch 0x00020002 PLC_INFO, MVS_SVS

spindel[0].m4_synch 0x00020004 PLC_INFO, MVS_SNS

spindel[0].m5_synch 0x00020002 PLC_INFO, MVS_SVS

spindel[0].m19_synch 0x00000008 MNS_SNS

spindel[0].s_prozess_zeit 0

spindel[0].m3_prozess_zeit 0

spindel[0].m4_prozess_zeit 0

spindel[0].m5_prozess_zeit 0

spindel[0].m19_prozess_zeit 0

:

812_end


PLCopen programming

Within the scope of the Motion Control Platform (MCP) different function blocks (FB) for the motion tasks are made available. This FB's act on a single axis and are operated via the PLC. Here each axis in the system is configured as a so-called Single Axis Interpolator (SAI).

Alternatively such axes also can be controlled via the NC program, because in the system a SAI always is configured like a normal spindle. For that purpose for the following FB's special NC commands are available. These commands enable a PLCopen conformable programming in NC syntax.

Ø MC_Home Reference point travel

Ø MC_MoveAbsolute Movement of the axis to an absolute position

Ø MC_MoveAdditive Relative motion in addition to the commanded position

Ø MC_MoveRelative Relative motion in addition to the current position

Ø MC_MoveSuperImposed Relative motion in addition to a motion already active

Ø MC_MoveVelocity Endless motion at the specified speed

Ø MC_Stop Stopping of an axis motion

Ø MC_GearIn Gear coupling with a gear ratio

Ø MC_GearOut Releasing of a gear coupling

Ø MC_Phasing Phase offset of couplings

The following topology displays the basic integration of the SAI (spindle) axis in the overall system:

In part program a SAI axis is programmed in spindle specific syntax. For that reason it has to be configured by its name and further data analogous to a normal spindle in the channel parameter list. The most important settings in the channel parameters especially are:

Ø spdl_anzahl (P-CHAN-00082)  Total number of (SAI) spindles

Ø bezeichnung (P-CHAN-00007)  Name of the (SAI) spindle

Ø log_achs_nr (P-CHAN-00036)  Logical axis number of the (SAI) spindle

For more information see the documentation [1]-Chapter: Configuration of spindles- and chapter Configuring spindles .

The PLCopen functions

Ø MC_MoveSuperImposed

Ø MC_GearIn

Ø MC_GearOut

Ø MC_Phasing

require additional specific SAI characteristics of the spindle axis, which are configured in the axes parameters. The necessary settings are described in the documentation [2]-Chapter: Settings for SAI- .

In the following for each NC command the correspondig FB is displayed. The syntax of these commands and the units of the programmed values are based on the corresponding input pins (VAR_INPUT) of the assigned FB's.

General syntax of a (SAI-)NC command:

<spindle_name>[<FB name> <Input_pin1> < Input_pin2> < Input_pin n...>]

The axis name on the beginning of the NC command addresses the (SAI) spindle axis, which can be activated via the NC channel.

The description of the input pins and the units and value ranges can also be taken from the documentation [9].

The input pin "Execute" always is set implicitly by the programming of the NC command. That's why for this pin no specific keyword is available.

More:

button Command MC_Home

button Command MC_MoveAbsolute

button Command MC_MoveAdditive

button Command MC_MoveRelative

button Command MC_MoveSuperImposed

button Command MC_MoveVelocity

button Command MC_Stop

button Command MC_GearIn

button Command MC_GearOut

button Command MC_Phasing


Command MC_Home

Reference point travel of the axis is commanded with MC_Home. How an axis responds to this command essentially depends on the type of referencing operation.

NC command:

<axis_name>[ MC_Home ]

Block diagram in PLCopen:

Programming example

S[MC_Home]


Command MC_MoveAbsolute

Movement of the axis to an absolute position is commanded with MC_MoveAbsolute. The motion is always executed jerk-limited with the constant set input Jerk. This value is valid for both "acceleration" and "deceleration".

NC command:

< axis_name > [ MC_MoveAbsolute Position =<expr> Velocity =<expr> Acceleration =<expr>
 Deceleration =<expr> Jerk =<expr> Direction =<expr> ]

Block diagram in PLCopen:

Input pin | Unit
Position | [0,1µm or 10-4 °]
Velocity | [1µm/s or 10-3 °/s]
Acceleration | [1mm/s2 or 1°/s2]
Deceleration | [1mm/s2 or 1°/s2]
Jerk | [1m/s3 or 1000°/s3]
Direction | 1 positive direction 2 shortest way 3 negative direction 4 current direction

Programming example

S[MC_MoveAbsolute Position=133 Velocity=1000 Acceleration=500
Deceleration=600 Jerk=200 Direction=2]


Command MC_MoveAdditive

With MC_MoveAdditive, a relative motion is commanded, in addition to the commanded position, if the axis is in the "Discrete Motion" state. The motion is always executed jerk-limited with the constant set input "Jerk". This value is valid for both "acceleration" and "deceleration".

If the axis is in the "Continuous Motion" state and receives a command from this FB, the relative distance from the current position at the time of commanding is added.

NC command:

< axis_name > [ MC_MoveAdditive Distance =<expr> Velocity =<expr> Acceleration =<expr>
 Deceleration =<expr> Jerk =<expr> ]

Block diagram in PLCopen:

Input pin | Unit
Distance | [0,1µm or 10-4 °]
Velocity | [1µm/s or 10-3 °/s]
Acceleration | [1mm/s2 or 1°/s2]
Deceleration | [1mm/s2 or 1°/s2]
Jerk | [1m/s3 or 1000°/s3]

Programming example

S[MC_MoveAdditive Distance=277 Velocity=1100 Acceleration=550
Deceleration=660 Jerk=220]


Command MC_MoveRelative

A relative motion is commanded with MC_MoveRelative, in addition to the current position. This is regardless of whether the axis is in the "Discrete Motion" or "Continuous Motion" state. The motion is always executed jerk-limited with the constant set input "Jerk". This value is valid for both "acceleration" and "deceleration".

NC command:

< axis_name > [ MC_MoveRelative Distance =<expr> Velocity =<expr> Acceleration =<expr>
 Deceleration =<expr> Jerk =<expr> ]

Block diagram in PLCopen:

Input pin | Unit
Distance | [0,1µm or 10-4 °]
Velocity | [1µm/s or 10-3 °/s]
Acceleration | [1mm/s2 or 1°/s2]
Deceleration | [1mm/s2 or 1°/s2]
Jerk | [1m/s3 or 1000°/s3]

Programming example

S[MC_MoveRelative Distance=321 Velocity=1200 Acceleration=555
Deceleration=666 Jerk=222]


Command MC_MoveSuperImposed

A relative motion is commanded with MC_MoveSuperImposed, in addition to motion already active. The active motion is not interrupted, but is superimposed with the commanded one. The motion is always executed jerk-limited with the constant set input "jerk". This value is valid for both "acceleration" and "deceleration".

As "acceleration" values are also superimposed in the case of superimposed interpolation, corresponding axis parameters must be defined to ensure that the axis is not dynamically overtaxed.

NC command:

< axis_name > [ MC_MoveSuperImposed Distance =<expr> VelocityDiff =<expr>
 Acceleration =<expr> Deceleration =<expr> Jerk =<expr> ]

Block diagram in PLCopen:

Input pin | Unit
Distance | [0,1µm or 10-4 °]
VelocityDiff | [1µm/s or 10-3 °/s]
Acceleration | [1mm/s2 or 1°/s2]
Deceleration | [1mm/s2 or 1°/s2]
Jerk | [1m/s3 or 1000°/s3]

Programming example

S[MC_MoveSuperImposed Distance=321 VelocityDiff=783 Acceleration=811
Deceleration=922 Jerk=432]


Command MC_MoveVelocity

With MC_MoveVelocity, you command an endless motion at the specified speed. The motion is always executed jerk-limited with the constant set input "jerk. This value is valid for both "acceleration" and "deceleration".

To stop the motion, the command must be interrupted by another command that sends a new command to the axis.

In conjunction with an MC_MoveSuperImposed the output "in_velocity" remains TRUE.

NC command:

< axis_name > [ MC_MoveVelocity Velocity =<expr> Acceleration =<expr> Deceleration =<expr>
 Jerk =<expr> Direction =<expr> ]

Block diagram in PLCopen:

Input pin | Unit
Velocity | [1µm/s or 10-3 °/s]
Acceleration | [1mm/s2 or 1°/s2]
Deceleration | [1mm/s2 or 1°/s2]
Jerk | [1m/s3 or 1000°/s3]
Direction | 1 positive direction 3 negative direction 4 current direction

Programming example

S[MC_MoveVelocity Velocity=1333 Acceleration=770 Deceleration=880
Jerk=99 Direction=1]


Command MC_Stop

The MC_Stop leads to stopping of motion and takes the axis to the "Stopping state. The motion stop is always jerk-limited with the constant set input "jerk for the braking rate.

It aborts every ongoing command by other (SAI) motion commands.

NC command:

< axis_name > [ MC_Stop Deceleration =<expr> Jerk =<expr> ]

Block diagram in PLCopen:

Input pin | Unit
Deceleration | [1mm/s2 or 1°/s2]
Jerk | [1m/s3 or 1000°/s3]

Programming example

S[MC_Stop Deceleration=999 Jerk=256]


Command MC_GearOut

TwinCAT CNC: Overview

Command MC_GearIn

The MC_GearIn commands gear coupling with a gear ratio. The gear ratio defines the speed ratio between the master and slave axes. The synchronization to the velocity is jerk-limited. "Jerk" is set in the NC command.

The slave axis can be coupled either to master setpoints or to actual master values. The selection is made in the "Mode" parameter.

NC command:

< axis_name > [ MC_GearIn Master =<expr> RatioNumerator =<expr> RatioDenominator =<expr>
 Acceleration =<expr> Deceleration =<expr> Jerk =<expr> Mode =<expr> ]

Block diagram in PLCopen:

Input pin | Unit
Master | Logical axis number of the master axis
RatioNumerator | Gear ratio numerator
RatioDenominator | Gear ratio denominator
Acceleration | [1mm/s2 or 1°/s2]
Deceleration | [1mm/s2 or 1°/s2]
Jerk | [1m/s3 or 1000°/s3]
Mode | 0 | Type of coupling between master axis and slave: Coupling based on command values. Automatic phase compensation: off.
 | 128 | Type of coupling between master axis and slave: Coupling based on actual values.
 | 256 | Automatic phase compensation: on. Only for testing purposes!

Programming example

S[MC_GearIn Master=11 RatioNumerator=2 RatioDenominator=3
Acceleration=500 Deceleration=600 Jerk=200 Mode=11]


Command MC_GearOut

MC_GearOut releases coupling of the slave axis to the master axis that has been specified via a speed ratio. The current speed of the slave is retained (endless motion).

NC command:

< axis_name > [ MC_GearOut ]

Block diagram in PLCopen:

Programming example

S[MC_GearOut]


Command MC_Phasing

The MC_Phasing is used to achieve an offset of the slave axis with respect to the master axis. To this end, a phase offset of the master axis is specified from the point of view of the master axis and the slave axis tries to eliminate this offset by accelerating or decelerating. The motion is always executed jerk-limited with the constant set input "Jerk". This value is valid for both "Acceleration" and "Deceleration".

The mechanical analogy is release coupling of the master and slave axes for a limited period.

In the case of camming, this command results in a change in the "apparent" master position from the slave's point of view. In the case of gearing, a phase offset is produced between the master and slave by commanding a superimposed motion in the slave. Therefore, in the case of gearing, MC_Phasing has the same effect as MC_MoveSuperImposed (into which it is actually converted in the control system).

In the case of camming, the dynamics values "Velocity", "Acceleration" and "Deceleration" refer to the change in the "apparent" master position from the point of view of the slave whereas, in the case of gearing, they refer to the superimposed motion of the slave axis itself.

NC command:

< axis_name > [ MC_Phasing Master =<expr> PhaseShift =<expr> Velocity =<expr>
 Acceleration =<expr> Deceleration =<expr> Jerk =<expr> ]

Block diagram in PLCopen:

Input pin | Unit
Master | Logical axis number of the master axis
PhaseShift | [0,1µm or 10-4 °]
Velocity | [1µm/s or 10-3 °/s]
Acceleration | [1mm/s2 or 1°/s2]
Deceleration | [1mm/s2 or 1°/s2]
Jerk | [1m/s3 or 1000°/s3]

Programming example

S[MC_Phasing Master=11 PhaseShift=25 Velocity=1000 Acceleration=500
Deceleration=600 Jerk=200]


Symbolic character strings (Macros)

Similar to macro generation in the 'C' programming language, the 'symbolic character strings' functionality enables a symbolic name (macro name) to be allocated to an executable NC code. Arithmetic expressions and one or more complete NC command may be allocated. The allocated NC code will be executed whenever the macro name is specified. This feature makes programming compact, clear and meaningful.

More:

button Macro definition and initialization

button Nesting macros

button Utilization in arithmetic expressions

button Utilization on NC-block level

button Separating address letter and arithmetic expression


Macro definition and initialization

Symbolic character strings may be defined in the channel parameters list [1]-4 or via the NC program. The following syntax is required in the NC program:

"<Macro_name>" = "<NC_Code>"

<Macro_name> Macro name

<NC_Code> Character string to be replaced

The macro name (left-hand side of the assignment) and the text that is to be replaced (right-hand side) must both be enclosed in quotation marks. Decoding distinguishes between upper and lower case letters. It is firmly given, wether previously defined macros may be redefined or not [6]-6.39. The macro definitions are valid across programs and are retained up to the next start-up (provided that the initialization of the macro table is not explicitly programmed). The maximum number of macro definitions [6]-6.25 and their length [6]-6.37/-6.38 are firmly given.

Macro definitions and other commands may be together in the same block.

The following command must be used for initializing the macro table

#INIT MAKRO TAB

This command clears all macro definitions in the macro table that have previously been defined. The macros that have been pre-assigned via the channel parameters list [1]-4 are retained.


Nesting macros

The use of macros in combination with NC code on the right-hand side of the assignment (nesting) is permitted. The maximum nesting depth can be configured as required [6]-6.40. Nesting is shown by a '\' character that precedes the delimiting quotation marks. A macro always represents complete expressions of an NC block (NC command, arithmetic expression, term). This makes it impossible that a macro only represents the address letter of an NC command without the related arithmetic expression. This connection will be discussed in the next chapters.

"<MACRO_NAME>" = "<NC_CODE> \"<MACRO_NAME_i>\" <NC_CODE>"

A macro may not include the nested macro name of itself. Only nesting of other macro names is permitted.

Programming example

N10 "POS_1" = "X500 Y200" (Macro definition)

N20 "MOVE1" = "G01 \"POS1\" F1000 (Macro definition with nesting)

N30 "MOVE1" (Macro call

M30


Utilization in arithmetic expressions

Macro name can be allocated to arithmetic expressions and parts thereof. Recursive treatment (nesting) is possible within arithmetic expressions, too. It must be ensured that a string always combines complete levels (i.e. terms whose results are not influenced by inserting '[' at the beginning and ']' at the end).

Programming example

Correct:

N10 "STRING1" = "0.5"

N20 "STRING2" = "5 * 12"

N30 "STRING3" = "SIN[89.5 + \"STRING1\"]"

N40 X[-2 * "STRING1" + "STRING2" + "STRING3"] (Moving to X60)

M30

Incorrect:

Only complete arithmetic expressions may be combined in a string

N10 "STRING1" = "COS["

N20 "STRING2" = "90]"

N30 "STRING3" = " \"STRING1\" \"STRING2\" " Error


Utilization on NC-block level

The definition of a macro and its call in the NC program is as follows:

Programming example

:

N10 "POSITION_1" = " X200 Y200 Z300 " (Macro definition)

N20 "POSITION_2" = " X300 Y100 Z50 " (Macro definition)

:

N200 "POSITION_1" (Macro call)

:

N500 "POSITION_2" (Macro call)

:

The following example shows the programming of nested macro definitions:

Programming example

:

N10 " STRING_1 " = " 5*12 " (Macro definition)

N20 " STRING_2 " = " G \"STRING_1\" + 5 "

N30 " STRING_3 " = " M \" STRING_1\ " \" STRING_2 \" "

:

N200 " STRING_3 " (Call the nested macro)

: (Corresponds to: N200 M60 G65)


Separating address letter and arithmetic expression

It is possible that the macro only has the address letter allocated, and the arithmetic expression is programmed or defined in a second macro.

This permits macros that make reference to the primary axes to be defined in a higher-level NC program. The macro may then be used in the subroutine or in the cycle, thus providing independence from the selected processing level.

Programming example

Only the address letter is contained in the alternate text. The arithmetic expression is programmed or defined in a separate alternate text:

"1.HA" = "X" "2.HA" = "Y" (HA: primery axis)

"Ziel_1.HA" = "COS[ P3 * 100 ] / ABS[ V.G.NP_AKT.V[ 0 ] - P12 ]"

"1.HA" "Ziel_1.HA" "2.HA" 100

More:

button Limitations


Limitations

No end-of-line or end-of-string (´\0´) character may be read within a text that is to be replaced. Thus, the macro definition is limited to one line.

A macro NC code string may not contain any control block instruction ($).


Rotation tool center point (RTCP)

The use of this feature requires the licence for the extension package "Transformations". It is not included in the scope of the standard licence.

#TRAFO ON Selection RTCP (modal)

#TRAFO OFF Deselection RTCP (modal)

For compatibility reasons alternative the tool compensation in space can also be programmed by #RTCP ON / OFF.

RTCP represents a tool compensation in the space.

After RTCP has been selected, the contact point of the current tool remains stationary with respect to the work piece when the tool orientation is changed (note the assignments of the tool tip offset parameters [1]-24, [5] for the parameter value assignments of the kinematics transformation).

The RTCP function may not be selected when TLC is active (see chapter 16.2).

Fig. 16. 1 : RTCP movement control

At the left side of Fig. 16.1 the resulting movement is shown, if the rotatory machine axis is moved.

RTCP shifts the centre point of rotation into the tool tipp (center point of tool rotation). The resulting offsets in the axes X, Y, Z based on the tool movement are compensated in each cycle by corresponding opposing movements.

Only the axes X, Y, Z are output of kinematic transformation, the rotatory machine axes are programmed as usual.

Programming example 1

N10 T1 D1 (Selection of the 2½-D tool correction)

N20 #TRAFO ON (Selection of RTCP)

N30 G01 F100 B45 C30 (Programming the rotary axes modifies tool)
(orientation. Tool contact point remains sta-)
(tionary)

N40...

.

.

N100 #TRAFO OFF (Deselection of RTCP)

N200 M30

Programming example 2

:

N10 #KIN ID [1] (Selection of machine kinematic)

N20 #TRAFO ON (Selection of RTCP)

N30 G01 G18 X20 Y0 Z25 B90 F500 (Move workpiece from the right side)

N40 G91 X-8 (Move to start position)

N50 G90 G02 X-12 I-12 B-90 F2000 (Processing)

N60...

:


Tool length compensation (TLC)

The use of this feature requires the licence for the extension package "Transformations". It is not included in the scope of the standard licence.

#TLC ON [ <delta_tool_length> ] Selection TLC (modal)

#TLC OFF Deselection TLC (modal)

<delta_tool_length> Tool length difference in [mm].

TLC enables NC programs that have been created by a programming system and consider a specific tool length to be used in a machine even if the tool length has changed. It must be noted that new offsets or radii of the tools may not be corrected.

The TLC function may not be selected when RTCP is active.

Fig. 16. 2 : At change of tool length TLC in each cycle transforms ∆ L.

Programming example

N10 #TLC ON [15] (Selection of TLC with extended tool, WZL =15 mm)

N20 .

.N100 #TLC OFF (De-selection of TLC)

N200 #TLC ON [-20] (Selection of TLC with shortened tool, WZL = -20 mm)

N210 .

.

N300 #TLC OFF (De-selection of TLC)

N200 M30


Tool orientation (TOOL ORI CS)

#TOOL ORI CS Selection of tool alignment (modal)

The first motion block that follows #TOOL ORI CS aligns the tool in parallel to the 3 rd main axis of the current BKS (W0 or MKS are possible, too). Programming the rotary axes in this block overrides the positions that are valid for orientation.

Fig. 16.3: Aligning the tool perpendicularly to the machining plane (X-Y)

Programming example

N10 B10 C20 (Slanting the tool)

N20 #TOOL ORI CS (In next motion block, align tool in parallel to)

(the Z axis of the current BKS, here MKS)

N30 X0 Y0 (Motion block in the MKS, tool is aligned B=0,C=0)

N40 B25 C-80 (Slanting the tool)

N50 #TOOL ORI CS (Align tool in next motion block)

N60 #TRAFO ON (RTCP selection)

N70 #CS ON[0,0,0,-80,-30,45]

(Transition to a rotated BKS)

N80 X100 (Motion block in BKS. Tool alignm. from N50 refers)

(to the MKS, thus B=0,C=0)

N90 #TOOL ORI CS (Align tool in rotated BKS)

N100 Y150 (Tool is aligned in parallel to the Z axis of BKS)

N110 #TOOL ORI CS

N120 Z100 B45 C10 (#TOOL ORI CS is without effect in programming of)

(rotary axes)

N130 G18 (Change to the Z-X-interpolation plane)

N140 #TOOL ORI CS (Align tool in parallel to the Y axis)

N150 X0 (Tool aligned perpendicularly to the X-Z machining)

(plane)

M30


Machine kinematics (KIN ID)

The use of this feature requires the licence for the extension package "Transformations". It is not included in the scope of the standard licence.

The following instruction is used for defining the machine/tool head kinematics:

#KIN ID [ [<expr>] ] Definition Machine-/Tool head kinematic (modal)

<expr> The kinematics ID is used for identifying the machine- and/or tool-head-related kinematics types. Their default setting after system start-up results from the assignment of the kinematik_id element in the channel parameters list [1]-25.

By programming #KIN ID without parameters the default kinematics-ID will be set.

In addition, by allocation of the kin_id element in the tool data, a kinematics change can be carried out automatically with the tool change.

An unknown kinematics ID causes an error message to be output and decoding to be stopped on selection of RTCP TLC, or TOOL ORI CS.

Changing kinematics with #KIN ID... is not allowed when RTCP or TLC is active.

Programming example

N10 #TOOL ORI CS (Aligning tool; default kinematics from [1]-25 valid)

N20 T1 D1 (Tool selection)

N30 #TRAFO ON (RTCP selection, default kinematics from [1]-25 valid)

.

.

N40 #TRAFO OFF (RTCP de-selection)

N50 #KIN ID[2] (Selection of the kinematics that is stored in the

(internal library under the ID '2').

N60 #TRAFO ON (RTCP selection, kinematics 2)

.

.

N70 #TRAFO OFF (RTCP de-selection)

N80 M30


Positioning without compensation motion (PTP)

The use of this feature requires the licence for the extension package "Transformations". It is not included in the scope of the standard licence.

#PTP ON Selection of PTP motion control during active transformation (modal)

#PTP OFF Deselection of PTP motion control during active transformation

A tool positioning and orientation after selection of kinematic transformation causes a compensation motion in the machine axes, because the tool center point (TCP) is moved on the path. If this compensation motions are unwanted, with the above listed command a more time optimized motion can be executed.

For 5 axes machines the motion is based on the reference point of the tool head, - in contrast to the TCP the reference point is moving on a straight line with the programmed feed (F word) or rapid feed (see Fig. 16.4).

For non cartesian machine structures (e.g. robots, tripods) neither the TCP nor the reference point is moving on a straight line. The programmed feed (F word) or rapid feed is acting on the machine axes.

But at the end of the motion it is ensured, that the TCP is on the programmed PCS target position.

The programming of the motion is identical to the PCS programming, the conversion of the PCS coordinates into MCS coordinates is executed by the control. The including of offsets and tool data is executed in the same manner like during active kinematic transformation. This is the main difference to the use of the command #WCS TO MCS.

Fig. 16.4: Trafo PTP movement control

During active PTP motion control the selection/deselection of additional coordinate transformations (#(A)CS ON/OFF, #MCS ON/OFFetc.) is not allowed!

Programming examples

Example to Fig. 16.4:

N10 T1 D1 (Tool selection)

N20 G00 X-200 Y0 Z0 A90 (MCS start position)

N30 #TRAFO ON (RTCP selection, default kinematic)
(from [1]-25 is valid)

N40 #PTP ON (Trafo PTP motion ON)

N50 G00 X200 Y0 Z0 A-90 (PCS target position)

...

N180 #PTP OFF (Trafo PTP motion OFF)

N185 G01 X100 Y150 F5000

...

N500 #TRAFO OFF (RTCP deselection)

N999 M30

Example with automatic tool orientation:

N10 T1 D1 (Tool selection)

N20 #TRAFO ON (RTCP selection, default kinematic)
(from [1] -25 is valid)

N30 #TOOL ORI CS (Orientate tool, default kinematic)

(from [1]-25 is valid)

N40 #PTP ON (Trafo PTP motion ON)

N50.G00 X0 Y0 Z100 G90 (PCS start position)

...

N180 #PTP OFF (Trafo PTP motion OFF)

N185 G01 X100 Y150 F5000

...

N500 #TRAFO OFF (RTCP deselection)

N999 M30


Coordinate systems

More:

button Definition of a machining coordinate system (CS)

button Definition of a coordinate system for fixture adaptation (ACS)

button Linkage of coordinate systems

button Effector coordinate system (ECS)

button Temporary transition to the machine axes coordinate system (MCS)


Definition of a machining coordinate system (CS)

Definition and storage of a CS:

#CS DEF [ [<CS-ID>] ] [<v1>,<v2>,<v3>,<ϕ1>,<ϕ2>,<ϕ3>] (modal)

Definition and storage with simultaneous activation:

#CS ON [ [<CS-ID>] ] [<v1>,<v2>,<v3>,<ϕ1>,<ϕ2>,<ϕ3>] (modal)

#CS ON [ <CS-ID> ] Selection of a stored CS (modal)

#CS ON Selection of the CS last defined (modal)

#CS OFF Deselection of the CS last activated (modal)

Parameter CS-ID may not be programmed here since only deselection of the CS last activated is allowed.

<CS-ID> Coordinate system ID. The CS-ID is assigned the default value 1 on program start. If at #CS DEF respectively #CS ON the CS-ID is not programmed, the next free CS-ID is calculated automatically. CS programmed in this way are not available again after deselection with #CS OFF!

<vi> Components of the translatory shift vector. (These refer to the main axes in the sequence in the case of G17).

< ϕ i> Angle of rotation.

A CS is characterized by the relative offset (V2 in Fig. 16.5) and the rotation with respect to the current work piece coordinate system (WKS). Current zero offset, clamp position offset, and coordinate preset (V1 in Fig. 16.5) determine the position of the BKS with respect to the machine coordinate system (MKS).

Fig. 16.5: Machining at an inclined plane

The rotations ϕ1, ϕ2 and ϕ3 are performed in mathematical positive direction (Fig. 16.6) in the following sequence:

1st rotation at angle ϕ3 around the 3rd axis (for example z)

2nd rotation at angle ϕ2 around the new 2nd axis (for example y´)

3rd rotation at angle ϕ1 around the new 1st axis (for example x´´)

(The stated sequence of the axes thereby always corresponds to the sequence of the main axes at G17 respectively), independent of currently selected G17/G18/G19.

Fig. 16.6: Definition of a machining coordinate system (CS) by one shift and three rotations

The position (with respect to the current WKS) of a CS that has been defined via #CS DEF <[CS-ID]> [...] or CS ON <[CS-ID]> [...] is stored and can be re-selected via #CS ON without a specification of parameters. If the overall shift in the MKS has been modified in the meantime, the CS will have a new position with respect to the MKS however.

Zero offset and coordinate preset may be programmed during machining in the CS. These values are only valid until the CS is de-selected; they will not be saved.

The axis designations are retained in the CS.

Programming example 1

N005 P1 = 2

N010 #CS DEF [1][P1,15,5,20,30,45] (Definition and activation of a CS)
(under ID 1:)

(Relative shifts: X2, Y15, Z5)

(Rotations: 45°around Z, 30°around Y')
(20°around X'')

N020 #CS ON[1] (Activation of CS with ID 1)

:

:

N100 #CS OFF (De-activation of CS with ID 1)

:

:

N200 P1=10

N210 #CS ON [P1,15,5,2,3,60] (Definition and activation of a CS)

(under the automatically defined ID 2)

:

:

N300 #CS OFF (Deselection of the latest activated CS (ID2))

(After that the CS with ID2 is deleted!)

:

N400 M30

Programming example 2

N5 P1 = 2

N10 #CS DEF [3][P1,15,5,2,3,4.5] (Definition and storage of a CS (ID 3))

N20 #CS DEF [2][P1,15,5,2,3,4.5] (Definition and storage of a CS (ID 2))

N30 #CS DEF [5][0,1,2,0,30,30] (Definition and storage of a CS (ID 5))

N30 #CS ON (Activation of a CS with the lastly) (programmed ID 5)

.

N50 #CS OFF

N60 #CS ON [3] (Activation of the CS with ID 3)

.

N80 #CS OFF

N90 #CS DEF [3][1,1.2,1.3,0,0,33] (Redefinition of the CS with ID 3)

.

M30

Programming example 3

If several coordinate systems were selected one after the other for example with CS ON [...] (without CS_ID), they form a chained new total CS. This has to be deselected step by step by corresponding #CS OFF.

The combined CS selection with and without CS id's is allowed, but it is not recommended for the reason of NC program clarity.

Example for a multiple programming of CS (without CS_ID):

N010 #CS ON [0,0,0,0,0,20] (Definition and activation of a CS under)
(the automatically defined ID 1)

(No shifts, only rotation 20°around Z)

:

:

N050 #CS ON [0,0,0,0,0,30] (Definition and activation of a CS under)
(the automatically defined ID 2)

(No shifts, only rotation 30° around Z)

->(The result is a CS with a total rotation of 50° around Z)

:

N100 #CS OFF (Deselection of CS with ID 2, after that the CS)

(with ID 2 is deleted!)

->(CS with ID 1 with a rotation of 20° around Z remains active)

:

:

N200 #CS OFF (Deselection of CS with ID 1, after that the CS)

(with ID 1 is deleted and all CS are deselected!)

:

:

N400 M30


Definition of a coordinate system for fixture adaptation (ACS)

The fixture adaptive coordinate system (ACS) serves for compensation of a sloping position of the work piece or work piece-palette. Its definition, selection and de-selection is performed analogously to that of the machining CS.

Definition and storage of an ACS:

#ACS DEF [ [<ACS-ID>] ] [<v1>,<v2>,<v3>,<ϕ1>,<ϕ2>,<ϕ3>] (modal)

Definition and storage with simultaneous activation:

#ACS ON [ [<ACS-ID>] ] [<v1>,<v2>,<v3>,<ϕ1>,<ϕ2>,<ϕ3>] (modal)

#ACS ON [ <ACS-ID> ] Selection of a stored ACS (modal)

#ACS ON Selection of the ACS last defined (modal)

#ACS OFF Deselection of the ACS last activated (modal)

Parameter ACS-ID may not be programmed here since only the deselection of the ACS last activated is allowed.

<CS-ID> Coordinate system ID. The ACS-ID is assigned the default value 1 on program start If at #ACS DEF respectively #ACS ON the ACS-ID is not programmed, the next free ACS-ID is calculated automatically. ACS programmed in this way are not available again after deselection with #ACS OFF!

<vi> Components of the translatory shift vector. (These refer to the main axes in the sequence in the case of G17).

< ϕ i> Angle of rotation.

The ACS is modal effective and may be activated and deactivated independent of a CS.

In the ACS zero offset and coordinate preset may be programmed. However these are valid only until the deactivation of the ACS and will not be stored.

Programming example 1

N005 P1 = 2

N010 #ACS DEF [1][P1,15,5,20,30,45] (Definition and activation of an ACS)
(under ID 1:)

(Relative shifts: X2, Y15, Z5)

(Rotations: 45°around Z, 30°around Y')
(20°around X'')

N020 #ACS ON[1] (Activation of ACS with ID 1)

:

:

N100 #ACS OFF (De-activation of ACS with ID 1)

:

:

N200 P1=10

N210 #ACS ON [P1,15,5,2,3,60] (Definition and activation of a ACS)

(under the automatic defined ID 2)

:

:

N300 #ACS OFF (Deselection of the latest activated ACS (ID2))

(After that the ACS with ID2 is deleted!)

:

N400 M30

Programming example 2

N10 #ACS DEF [1][10,15,5,2,3,4.5] (Definition and storage of an ACS (ID 1))

N20 #ACS DEF [3][0,15,5,2,3,4.5] (Definition and storage of an ACS (ID 3))

N30 #ACS DEF [P1+3][2*P1,1,2,0,30,30] (Definition and storage of ACS (ID 5))

N30 #ACS ON (Activation of the ACS with the lastly)
(programmed ID 5)

.

N50 #ACS OFF

N60 #ACS ON [3] (Activation of the ACS with ID 3)

.

N80 #ACS OFF

N90 #ACS DEF [3][0,1.2,1.3,0,0,3] (Redefinition of the ACS with ID 3)

.

M30

Programming example 3

If several coordinate systems were selected one after the other for example with ACS ON [...] (without ACS_ID), they form a chained new total ACS. This has to be deselected step by step by corresponding #ACS OFF.

The combined ACS selection with and without ACS id's is allowed, but it is not recommended for the reason of NC program clarity.

Example for a multiple programming of ACS (without ACS_ID):

N010 #ACS ON [0,0,0,0,0,20] (Definition and activation of a ACS under)
(the automatically defined ID 1)

(No shifts, only rotation 20°around Z)

:

:

N050 #ACS ON [0,0,0,0,0,30] (Definition and activation of a ACS under)
(the automatically defined ID 2)

(No shifts, only rotation 30° around Z)

->(The result is a ACS with a total rotation of 50° around Z)

:

N100 #ACS OFF (Deselection of ACS with ID 2, after that the ACS)

(with ID 2 is deleted!)

->(ACS with ID 1 with a rotation of 20° around Z remains active)

:

:

N200 #ACS OFF (Deselection of ACS with ID 1, after that the ACS)

(with ID 1 is deleted and all ACS are deselected!)

:

:

N400 M30


Linkage of coordinate systems

By combination of ACS and CS new coordinate transformations may be built.

Fig. 16.7: The combination of ACS and CS allows machining at an inclined plane with a work piece slantingly clamped

Several ACS and CS will be linked separately in the sequence of their activation. The resulting ACS will be linked with the resulting CS to the overall transformation than. The linkage takes place independent of the programming always beginning with the ACS (the maximum number of ACS and CS to be linked will be stated application specific [6]-5.7).

The deactivation of the single ACS takes place contrariwise, compared with the activation. The same applies to the CS. To simplify this, #(A)CS OFF is programmed without an ID-parameter (see Fig. 16.5, Fig. 16.6).

Programming example

%Linkage

.

N100 #CS ON [1] ( CS[1])

N110 #ACS ON [2] (ACS[2] o CS[1])

N120 #ACS ON [1] (ACS[2] o ACS[1] o CS[1])

N130 #CS ON [2] (ACS[2] o ACS[1] o CS[1] o CS[2])

N140 #ACS OFF (ACS[2] o CS[1] o CS[2])

N140 #CS OFF (ACS[2] o CS[1])

N150 #ACS OFF ( CS[1])

N160 #CS OFF

M30

Fig. 16.8: Activation or modification of the ACS without deactivating the CS that is already active

It has to be noted that the relative linkage of ACS or CS may have a different result dependent on the sequence of activation (see Fig. 16.9).

Fig. 16.9: Result of a CS-linkage dependent on the sequence of activation (CS[1] - CS[2] or CS[2] - CS[1] res.).

The CS (or ACS) with the same ID may also be activated plurally and linked with itself.

Programming example

N10 #CS DEF[1][0,0,0,0,0,20]

N20 LL TEILEPRG (contour in system X-Y)

N30 #CS ON[1]

N40 LL TEILEPRG (X'-Y')

N50 #CS ON[1]

N60 LL TEILEPRG (X''-Y'')

N70 #CS OFF

N80 #CS OFF

M30

By the following NC-commands the currently active overall transformation may be stored:

#CS DEF ACT [ <CS_ID> ]

#ACS DEF ACT [ <ACS_ID> ]

Contrary to sequential deactivation of the (A)CS by (A)CS OFF, with the following NC-commands the partial transformations, descendent from a linkage of CS or ACS, may be deactivated directly.

#CS OFF ALL Deselection of all CS

#ACS OFF ALL Deselection of all ACS

Programming example

N10 #CS ON[3]

N20 #CS ON[4]

N30 #CS DEF ACT[5] (Storage of CS[3] o CS[4] under CS[5])

N31 #CS OFF ALL (Deactivation of all CS)

N32 #ACS ON[3]

N33 #ACS ON[4]

N34 #ACS DEF ACT[5] (Storage of ACS[3] o ACS[4] under CS[5])

N35 #ACS OFF ALL (Deactivation of all ACS)

N36 X0 Y0 Z0

N360 #CS ON [5]

N370 #ACS ON[5]

N380 #CS DEF ACT[1] (Storage of ACS[5] o CS[5] under CS[1])

N390 #ACS OFF ALL

N400 #CS OFF ALL

N500 #CS ON (Activation of CS[1])

N510 #CS OFF

M30


Effector coordinate system (ECS)

In combination with kinematic transformations the use of this feature requires the licence for the extension package "Transformations".

The Effector-CS is used mainly to perform a withdrawal-strategy in case of tool fracture, NC-reset or abortion of NC-program while machining with the tool oriented arbitrarily. Determination of the ECS is the inversion of the command TOOL ORI CS (Chap. 16.3), i.e. instead of aligning the tool to the machining plane here a machining plane perpendicular to the current tool axis will be determined.

#ECS ON Selection of ECS (modal)

#ECS OFF Deselection of ECS (modal)

On activation of the ECS any other CS must not be active.

Out of the positions of the orientation axes the ECS will thus be determined, that its z-axis is in parallel to the current tool axis. Thereby the location of the X- and Y-axis is undefined (arbitrary) and must therefore be predefined internally. The origin of the ECS may generally be located outside of the tool tip or tool axis, i.e. a collision free withdrawal is only guaranteed by incremental traversing along the effector z-axis direction.

Fig. 16.10: Machining in an inclined drilling

Programming example

N05 #CS ON[1.5,0,32,14.5,0,45] (Activation of a CS)

N10 #TOOL ORI CS

N15 X0 Y0 Z0

N20 LL TEILEPRG (Subroutine call for machining)

...

(Tool fracture, NC-reset)

(Withdrawal strategy)

N05 #ECS ON (Determination of the cartesian transformation)
(according to the positions of the orientation)
(axes)

N10 G91 G01 F200

N20 Z62 (Withdrawal movement along the tool- or ECS-Z-axis res.)

...

N400 M30


Temporary transition to the machine axes coordinate system (MCS)

In combination with kinematic transformations the use of this feature requires the licence for the extension package "Transformations".

By the functionality MCS, the active kinematics and / or cartesian transformation as well as all offsets included in the axes may be temporarily deactivated, so that the machine axes may be positioned directly. After leaving the MCS, the state being present before activation will be restored.

Tool change, e.g., mostly requires the approach of a definite tool change position with coordinates well known in respect to the machine origin. In a CS the approach of such a machine axes position may become complicated because in the NC-program the CS axes are positioned.

With the following instructions the temporary transition to the machine axes coordinate system will be activated and deactivated

#MCS ON [ EX TOOL ] Activation temporary transition in MCS (modal)

#MCS OFF Deactivation temporary transition in MCS (modal)

EX TOOL On tool change in the MCS the tool offsets will not be included. This takes place with #MCS OFF

In the MCS there are no restrictions concerning the usage of NC-functionality, the activation of RTCP / TLC , CS, ACS and ECS is not possible however.

Programmed offsets in the MCS are also valid only until its deactivation and will not be stored.

While changing the axes configuration by external axis exchange (e.g #CALL AX..) in the MCS, it has to be noted that for reactivating of the kinematics and / or cartesian transformation a definite axes configuration is absolutely necessary.

Programming example

N10 #RTCP ON

N20 #CS ON[1.5,0,32,14.5,0,45] (Activation of a CS)

N30 G01 G90 F5000

N40 X0 Y0 Z0

N50 #MCS ON EX TOOL (Transition to the machine-CS with the option)
(EX TOOL (Tool will be included with MCS OFF)

N60 LL TOOLCHANGE (Subroutine call for tool change)

...

N70 #MCS OFF (Deactivation of the MCS, RTCP and CS will be)
(reactivated again)

N100 #RTCP OFF

N110 #CS OFF

N400 M30

Programming example

Work piece: Cube 100x100x50

UNTERPRG1 (parts program 1) (Face milling of the current machining)

(plane)

N10 G01 G90 X0 Y-10 Z5 F250

N20 Z0 F2000 (Start-up motion )

N30 G91

N40 $FOR P1=0, 5, 1 (P1: Number of infeed motions)

N50 $FOR P2=0, 7, 1

N60 Y90

N70 X3

N70 Y-90

N80 X3

N90 Y90

N100 X-42 Y-80

N110 $ENDFOR

N120 Z-2 (Approach)

N130 $ENDFOR

N140 G90 Z50 (Return motion )

N150 M29

%L UNTERPRG2 (parts program 2) (Circle with centre boring)

N10 X0 Y0 Z10 F1000 (Linear and absolute approach motion)

N20 X0 Y0 Z5

N30 Z0

N40 LL UNTERPRG3 (Circular motion)

N50 Y35.34 (Approach bore location)

N60 X15

N70 Z0

N80 LL UNTERPRG4 (Bore cycle)

N90 M29

%L UNTERPRG3 (parts program 3) (Circular motion)

N10 X7.5 Y35.34 (Approach circle start point)

N20 G91 Z-4

N30 G90 G02 X7.5 Y35.34 I7.5 J0

N40 G01 Z20

N50 M29

%L UNTERPRG4 (parts program 4) (Bore cycle)

N10 G91 Z-5 (Relative bore motion)

N20 Z2

N30 Z-5

N40 Z2

N50 Z-5

N60 G90 Z20 (Lift-off motion)

N70 M29

N55 #TOOL ORI CS (Tool orientation)

N60 LL UNTERPRG1 (Contour machining)

N70 LL UNTERPRG2 (Contour machining)

N80 #CS OFF (De-selection machining coordinate system)

% Main program

N05 #KIN ID[1] (Machine kinematics 1)

N10 G74 Z1 X2 Y3 B4 C5 (Reference point return)

N20 T1 D1 (Tool selection)

N40 #RTCP ON (RTCP selection)

N50 #CS ON[0,-50,51,0,30,-45] (Selection of rot., shifted coord. syst.)

N52 G00 X0 Y0 Z5 (Positioning in new origin)

N55 #TOOL ORI CS (Tool orientation)

N60 LL UNTERPRG1 (Contour machining)

N70 LL UNTERPRG2 (Contour machining)

N80 #CS OFF (De-selection machining coordinate system)

N90 #CS ON[-50,0,51,0,30,-135] (Selection of rot., shifted coord. syst.)

N92 G00 X0 Y0 Z5 (Positioning in new origin)

N95 #TOOL ORI CS (Tool orientation)

N100 LL UNTERPRG1 (Contour machining)

N110 LL UNTERPRG2 (Contour machining)

N120 #CS OFF (De-selection machining coordinate system)

N130 #CS ON[0,50,51,0,30,-225] (Selection of rot., shifted coord. sys.)

N132 G00 X0 Y0 Z5 (Positioning in new origin)

N135 #TOOL ORI CS (Tool orientation)

N140 LL UNTERPRG1 (Contour machining)

N150 LL UNTERPRG2 (Contour machining)

N160 #CS OFF (De-selection machining coordinate system)

N170 #CS ON[50,0,51,0,30,-315] (Selection of rot., shifted coord. syst.)

N172 G00 X0 Y0 Z5 (Positioning in new origin)

N175 #TOOL ORI CS (Tool orientation)

N180 LL UNTERPRG1 (Contour machining)

N190 LL UNTERPRG2 (Contour machining)

N200 #CS OFF (De-selection machining coordinate system)

N210 #RTCP OFF (RTCP de-selection )

N220 Z120 (Return motion)

N230 #TOOL ORI CS (Tool orientation)

N240 X0 Y0 (Motion block because of tool orientation)

N250 X0 Y0 Z120 B0 C0 (Motion in machine co-ordinate system)

N260 M30 (End of program)


Auxiliary functions for coordinate transformations

TwinCAT CNC: Overview

Auxiliary functions for coordinate transformation s

The use of this feature requires the licence for the extension package "Transformations". It is not included in the scope of the standard licence.

For 5-axis machines and machines with non cartesian structure (e.g. Hexapods) two typical variants for the definition of movements are used.

In the first case the contour in the space is programmed by the user with circles, straight lines or polynomials and the tool tip (TCP) is moved according to the programmed contour on the path.

In the second case the user programs the target point in space or work piece coordinates (WCS), which are mapped to machine coordinates (MCS). Corresponding to the maximum possible velocities in the axes the TCP moves on a non predictable curve (PTP). Due to the loss of the TCP movement along a curve in space the PTP movement in general is faster than the TCP path movement.

In NC program the above mentioned mapping of programmed WCS target points to MCS target points (backward transformation) can be executed by the following NC commands. The moving blocks to the calculated MCS target points have to be programmed by the user explicitly in absolute dimensions.

This method for example can be used, to move sequentially each single axis out of a collision area.

This commands only can be used with inactive transformation and inactive self-defined coordinate systems.

Calculation of machine coordinates (MCS) from work piece coordinates (WCS):

#WCS TO MCS [ [CS<ID_expr>] [KIN] ] (non-modal)

CS <ID_expr> Calculation of the target points under consideration of a cartesian transformation with a specific valid ID.

KIN Calculation of the target points under consideration of the currently valid kinematic transformation.

For the declaration of the WCS target points and the storage of the calculated MCS target points the following axis specific variables are available. This variables allow write and read access:

V.A. WCS.* Access on the axis specific auxiliary variable "work piece coordinate" (WCS). During active transformation this value in general do not correspond to the programmed work piece coordinates.

V.A. MCS.* Access on the axis specific auxiliary variable "machine coordinate" (MCS). During inactive transformation this value do not correspond to the programmed machine coordinates.

Programming example

From some specific WCS points the NC calculates via cartersian and kinematic backward transformations the MCS target points. With the special variables mentioned before in NC program the user has access on this calculated MCS positions. Dependent on the programmed keywords and the related CS-ID the user defines the executed transformation.

N02 #CS DEF[1][0,0,0,0,0,45]

N00 #KIN ID [1]

N10 V.A.WCS.X=10

N20 V.A.WCS.Y=10

N30 V.A.WCS.Z=100

N40 #WCS TO MCS[CS 1, KIN] (Transformation of WCS into MCS)

N50 G00 Z=V.A.MCS.Z (Moving of single axes on MCS-target points..)

N60 G00 X=V.A.MCS.X

N70 G00 Y=V.A.MCS.Y

N

:

Incorrect use:

N05 #CS DEF[1][0,0,0,0,0,45]

N10 #CS ON[1]

N20 V.A.WCS.X=100

N30 V.A.WCS.Y = 0

N40 V.A.WCS.Z = 0

N50 #WCS TO MCS [CS 1] <- not allowed because a CS is active

N05 #KIN ID[12]

N10 #TRAFO ON

N20 V.A.WCS.X=100

N30 V.A.WCS.Y = 0

N40 V.A.WCS.Z = 0

N50 #WCS TO MCS [KIN] <- not allowed because a trafo is active

Calculation of work piece coordinates (WCS) from machine coordinates (MCS):

The inverse mapping of MCS target points to WCS target points (forward transformation) is executed with the following command. This method for example can be used for the mapping of measured values to a WCS.

#MCS TO WCS [ [CS<ID_expr>] [KIN] ] (non-modal)

CS <ID_expr> Calculation of the target points under consideration of a cartesian transformation with a specific valid ID.

KIN Calculation of the target points under consideration of the currently valid kinematic transformation.


Auxiliary function for the calculation of motion limits within a workpeace coordinate system

With the following command the limits of a motion in the current workpeace coordinate system (WCS) are calculated in the direction of a programmed motion vector with the components VC1, VC2, VC3. The vector components have not be programmed in standardized form. The axes specific software limit switches are basis for the traverse limiting. Based on this values the control calculates the motion limits in the current coordinate system.

        #GET WCS POSLIMIT
[VC1=<Vectorcomp.1>
VC2=<Vectorcomp. 2>
VC3=<Vectorcomp.3>]

With the following global variables the result of the calculation can be read out for the first three axes of the coordinate system.

V.G.WCS_POSLIMIT_1 Motion limit in the first main axis in WCS

V.G.WCS_POSLIMIT_2 Motion limit in the second main axis in WCS

V.G.WCS_POSLIMIT_3 Motion limit in the third main axis in WCS

The programmed motion direction has absolutely to be kept during the real executed motion, otherwise the calculated motion limits are wrong!

During active kinematic transformation (#RTCP) no rotary axes may be programmed!

Programming example

N05...

N10 G98 X-100 Y-100 Z-100 (Shifting of negative software limits)

N20 G99 X200 Y200 Z300 (Shifting of positive software limits)

N30 #ECS ON (Selection of effector coordinate system)

N40 #GET WCS POSLIMIT [VC1=0 VC2=0 VC3=1] (Calculation of WCS limit)

N50 G01 G90 Z=V.G.WCS_POSLIMIT_3 F2000 (Move to WCS limit in Z)

N60 #ECS OFF (Deselection of effector coordinate system)

N70...

Example for correct use of the command

N05...

N10 #CS ON[0,0,0,0,0,45]

N20 #GET WCS POSLIMIT [VC1=1 VC2=1 VC3=0]

N25 G01 G90 F2000

      N30 X=V.G.WCS_POSLIMIT_1
Y=V.G.WCS_POSLIMIT_2
Z=V.G.WCS_POSLIMIT_3

N40 #CS OFF

N50...

Wrong, resulting motion direction not corresponding to setting:

N05...

N10 #CS ON[0,0,0,0,0,45]

N20 #GET WCS POSLIMIT [VC1=1 VC2=1 VC3=0]

N25 G01 G90 F2000

N30 X=V.G.WCS_POSLIMIT_1 Y=V.G.WCS_POSLIMIT_2

N40 Z=V.G.WCS_POSLIMIT_3

N50...

Fig. 16.11: Example for motion limits in ZX plane in the current WCS


Modified programming of modulo axis

This programming manual describes an extended modulo programming. This additional syntax supports the programming of the direction of rotation, the limiting to maximum one revolution in absolute dimensions and new variables for the check of actual modulo adjustments (Chapter 17.1).

<axis_name> [ [+] | - ] <expr>

<axis_name> Designation of modulo axis **.

<expr> The sign of the coordinate value describes the direction of rotation:

= - means rotation clock wise (cc)
+ means rotation counter clock wise (ccw)
no sign means rotation in direction of shortest way

The unit of the axis position is [Grad] or [mm]

**

Long axis designations are not supported (e.g. "C_MODULO").

Programming example

G90 G1 C+560 ó G90 G1 C+200 (Movement to reach pos. 200 in + direction,)

(Hypothesis : 360 deg. Modulo)

G90 G1 C-P1 (Go to position P1 (with implicit modulo) in  direction)

Programming in absolute dimensions (G90):

q The value assigned to the axes is the position of the end point with reference to the program origin. (value between 0 and n degrees or mm, maximum one revolution).

q The value may be a numerical expression like : [3*2+5] , P1 , [P1+P2-3] , [-30].

q If programmed position = current position, no movement.

q The travel of a modulo axis is not limited by software stops.

Programming in incremental dimensions (G91)

q The value assigned to the axis indicates the amplitude of rotation of the axis with reference to the previous position. The sign of the value indicates the movement direction. A movement of more than one revolution is allowed.

q If the value is greater than the modulo value, the number of revolution is taken into account.

More:

button Variables

button Modulo programming in absolute coordinates

button Modulo programming in relative coordinates


Variables

NC-program variables to read modulo information:

V.A.MODE[i] delivers the axis mode according to axis table.
E.g. 4 if the axis is of type modulo.
-> is used to read axes declared as modulo

V.A.MODULO_VALUE[i] is used to read the value of the modulo range
E.g. 360 if the modulo range is 0-360°.
(if the axis is a no modulo axis this value is not relevant).


Modulo programming in absolute coordinates

Programming examples

G90 G1 C+350 ó Go to the position 350 in + direction

P1 =+10

G90 G1 C+P1 ó G1 C+10 ó Go to the position 10 in +direction

P1= -350

G90 G1 C-P1 ó G1 C-(-350) ó G1 C-10 ó Go to position 10 in - direction

G90 G1 C+450 ó G1 C+(450 mod 360) ó Go to position 90 in + directionj

Examples for correct programming:

C+200 Rotate in positive direction to position 200

C-200 Rotate in negative direction to position 200

C+-200 Rotate in positive direction to position -200 (= +160)

C+[-200] Rotate in positive direction to position -200 (= +160)

C--200 Rotate in negative direction to position -200 (= +160)

C-[-200] Rotate in negative direction to position -200 (= +160)

C200 Rotate in shortest way to position 200

C[+200] Rotate in shortest way to position 200

C[-200] Rotate in shortest way to position -200

Examples for incorrect programming:

None, because the first sign after the axis name determines the direction of rotation and every additional sign belongs to the position expression.

The programming of two signs (direction and position) is only allowed, if the mode of the axis is "Modulo" (P-AXIS-00015) [2] -9. The positioning in shortest way is done, if no sign is programmed directly after the axis name.


Modulo programming in relative coordinates

G91 G1 C+30

G91 G1 C-30

Example for correct programming:

C+200 Rotate in positive direction to current position plus 200

C-200 Rotate in negative direction to current position minus 200.

C200 Rotate in positive direction to current position plus 200

Example for wrong programming:

C+-200 Error: Negative motion path during rel. programming not allowed.

C--200 Error: Negative motion path during rel. programming not allowed.

P1=-1

C-[P1] Error: Negative motion path during rel. programming not allowed.


Description of function

More:

button Tool-ID

button Tool life monitoring


Tool-ID

Within the scope of the extended tool programming the CNC provides the tool management area (WZM) with new tool-related communication objects. These are the enhanced tool descriptions (WZ) and tool service life variables.

In today's standard programming, single-element numbers are used for identifying the tools in the NC program. According to DIN 66025, this numerical ID is programmed together with the D word that is used for including new data (computational tool change). In conjunction with the T language command, the ID defines the next tool that shall physically be changed in.

To include new data, this data must be requested from today's external tool management. The tool management function possesses specific manufacturer-related algorithms that are used for determining the tool that must be changed in on the basis of the tool identification. It must be taken into account that the transferred tool ID only defines the tool type, and that the tool magazine may contain several tools of the same type (alternate tools) that are ready to be used. Thus, a specific tool cannot clearly be identified in the NC program.

In first instance, the T number is used as a technological information. This means that it reaches the PLC via the NC channel. According to DIN 66025, M06 is used for triggering the physical insertion of the new tool into the working spindle. The separate specification of the two commands "T with tool number" and M06 may be used for performing preparatory measures (in the tool magazine, for example) after the T command and before M06 actually inserts the tool into the working spindle.

In the extended tool management, tool data is defined by a three-digit number. Below, we refer to this number as the "tool ID".

Tool ID = base tool number + alternate tool number + modification number

The base tool number describes the tool type, and the alternate tool number describes a tool unit of this type. The modification number has a purely data-related significance. It permits different data records to be used for a tool.


Tool life monitoring

In the acquisition of the tool life values, the contact time (service life) and the distance covered during the contact (service distance) of a tool must be calculated. The determined values are sent to the tool management.

Only the movement of motion blocks shall be taken into account here. Rapid traverse positioning shall not have an effect on the life count variables.

The interpolator displays the data (Tool-ID, contact time, contact distance) after the tool has been exchanged.

The service life is recorded in ms, the service distance is recorded in mm.

A possibility of weighting the tool life variables shall be provided in the NC program. The factor that is to be introduced is used for adapting the acquisition of the tool life variables to the tool utilization.

Example:

A tool that is always in contact should be weighted with a factor of 100%. If, however, material is only removed at half the motion distance, a weighting factor of 0.5 can be used in the calculation.

The default value of the service time and service distance weighting factors is 1.0.


Programming commands and variables

The tool-ID is programmed with plain text commands. A request for new tool data with #TOOL DATA corresponds to the D-command; the preparatory technology command for the physical tool change with #TOOL PREP corresponds to the T-command.

#TOOL DATA [ <basic> [,<sister> [,<variant> ] ] ] (Requesting of new tool data)

#TOOL PREP [ <basic> [,<sister> [,<variant> ] ] ] (Announcement of a tool change)

The number of the basic, sister and variant parameters can be configured [6]-9.18. Expedient values are between 1 and 3. If two parameters are expected, these will be the base tool number and the alternate tool number.

Specifying the base tool number (basic) is mandatory. If the number of parameters is 3, sister for the alternate tool number and variant for the modification may optionally be programmed. Zero is inserted instead if sister or variant have not been programmed (a comma follows a comma or a closing bracket follows a closing bracket.

Programming example

#TOOL DATA [ P10, SISTER, 0 ] ⇔ #TOOL DATA [ P10, SISTER, ]

and

#TOOL PREP [P10, 0, VARIANT] ⇔ #TOOL PREP [P10, , VARIANT]

The arithmetic expressions in the specification of the D and T command must be interpreted as a base tool number. Thus, the tool management keeps the same degree of freedom for the selection of the tool data record as it had before.

T <basic> respectively D<basic>

Decoder variables are used for implementing the access to the elements of the tool identification. The current software version already provides the possibility of interrogating the number of the last requested tool from the external tool management via V.G.T_AKT. In parallel to the newly introduced syntax, it always represents the base tool number.

V.TOOL.BASIC (Read access to the last programmed base tool number

V.TOOL.SISTER (Read access to the last programmed alternate tool number)

V.TOOL.VARIANT (Read access to the last programmed modification number)

Programming example

#TOOL DATA [ P10, SISTER, 3 ]

.....

#TOOL PREP [V.TOOL.BASIC, V.TOOL.SISTER, V.TOOL.VARIANT]

More:

button Weighting factors for service life and service distance

button Reading and deleting of tool life data

button Refreshing of tool data


Weighting factors for service life and service distance

In the case of every tool change announced with the T-command, the complete tool ID, the service life and the service distance are sent to the tool management area (WZM). All quantities are then zeroed and service variable detection for the newly substituted tool isenabled.

Two decoder variables are introduced for programming the weighting factors of the service life and the service distance (access is not synchronous to real time):

V.TLM.TIME_FACT (Weigthing of service life)

V.TLM.DIST_FACT (Weigthing of service distance)

The variables can be read and written. Both factors are 100% when the program is started. Both variables may be written in an NC block.

Acquisition Conditions :

q Rapid traverse blocks are not included in the tool life monitoring.

q Tool life monitoring is stopped at a feed rate of zero.

q With the exception of rapid traverse interpolation, all motion types are included in the acquisition. For example, G01, G02, G03, spline interpolation and G63 are included.

q The weighting factors are included in the calculation.

q Distinction between main axes and slave axes is not made for the axes that participate in the movement. The path feed rate is always used for summing up the distance. In the case of slave axes that are programmed on their own in the block, the distance covered by the slave axis is added to the service distance. If this is not wanted, the programmer can correct it by specifying the weighting factors V.TLM.TIME_FACT/DIST_FACT = 0..

q Active master/slave arrangements are not taken into account.

q In the case of a reset or program abort, the last current values are also saved to the database of the WZM.

q If only substitution occurs, i.e. no tool was in the workspindle as yet and the current T number is zero, no data is sent.

q The tool data is sent only if there actually is a WZM [1]-10.


Reading and deleting of tool life data

For the access to the tool life data before the next tool change special commands are available. They are e.g. necessary for the determination of tool life data for a tool of a slave axis during synchronous operation, because these data, like mentioned in chapter 18.2.1 are not recorded. With the following command always the tool life data of the active tool in the current channel is read and sent for any programmed tool (e.g. tool of a slave axis) to the tool management area (WZM).

#TOOL LIFE READ [ <basic> [,<sister> [,<variant> ] ] ] (Read current tool life data and assign it)

(to any tool)

For the programming of the ToolID the same rules are valid as e.g. for the command #TOOL PREP (Chapter 18.2). According to the HÜEMNOS-convention a Tool-ID can include 1,2, or 3 tool parameters. Specifying one parameter is mandatory. This parameter is always understood as the base tool number (basic). The parameters of the Tool-ID can be any mathematical expression, e.g. V.G.T_AKT, V.TOOL.BASIC, Pxx, V.L.xxx and so on.

After sending of the current tool life data to the WZM the internal tool life recording is not resetted but continued.

The following command deletes the internal tool life recording of the active tool in the current channel without sending of the data to the WZM.

#TOOL LIFE REMOVE (Delete current tool life data)

Programming example

....

:

.... Standard operation

:

#TOOL LIFE READ [V.G.T_AKT] (Read tool life data of current tool)

#TOOL LIFE REMOVE ( Reset tool life data for separate)
(recording of tool life data during syn-)
(chronous operation)

Selection of synchronous operation

:

.... Synchronous operation

:

De-selection of synchronous operation

#TOOL LIFE READ [T10] (Hypothesis: T10 is active tool of a slave axis)

(during synchronous operation --> Send tool)

(life data of current master axis-tool to WZM )

(for T10)

:

.... Standard operation

:


Refreshing of tool data

Following command is useful for the repeated inclusion of tool data of the active tool e.g. into additional new channel axes after an axis exchange command:

#TOOL REFRESH (Refresh data of the active tool)

The command results in an immediate inclusion of the already available data of the active tool. Neither tool data are taken over from an internal tool data list [5] nor requested from an external tool management. The repeated programming of the D word can be cancelled.


Positioning axes

Positioning axes are translatory or rotatory axes, which can be interpolated independent of the path axes compound in the same NC-channel. Each positioning axis has its own axis interpolator and can be moved with its own feedrate.

Restrictions:

The programming of an positioning axis movement is not allowed, if:

q This axis is a clamping axis

q This axis is currently active in synchronous operation

q A kinematic or cartesian transformation is active and some specific conditions are not active (siehe Kapitel 19.3)

q Block search is active

q Simulation modes (Online-Simulation, Contour visualisation, Production time calculation) are active

q Spline interpolation is active

q Polynom contouring is active

q Turning functions are active

More:

button Independent axes

button Oscillating axes

button Cartesian / kinematic transformation and positioning axes


Independent axes

For programming of independent axes two different operation modes are available:

q Synchronisation of path axes and independent axes at block end.

q Synchronisation of path axes and independent axes over several blocks.

Fig. 19.1: Movement diagram of path axes/independent axes

For independent axes no offsets are considered.

Additive manual mode (G201/G202) with an independent axis is posssible.

Programming syntax for independent axes:

<axis_name> [ INDP_SYN | INDP_ASYNG90 | G91G00 | G01FEED<expr> | TIME<expr> |

FEED_MAX_WEIGHT <expr> POS <expr> [SLOPE_PROFIL<expr>]

{M<expr>} {H<expr>} ]

<axis_name> Axis designation of independent axis

INDP_SYN Identification for synchronous (block wise) independent axis movements. The transition to the next block is only done, if all axes have reached their end position. Must always be the first programmed keyword.

INDP_ASYN Identification for asynchronous (multi block) independent axis movements. There is no synchronization on end positions. Synchronization is done with a special NC-command (#WAIT INDP) or with programming of the independent axis as conventional path axis. Must always be the first programmed keyword.

G90 / G91 Absolute / relative values

G00 / G01 Rapid traverse / linear interpolation

FEED<expr> Axis specific feed in path units/min

TIME<expr> Axis specific movement time in s

FEED_MAX_WEIGHT <expr> Weighting factor in % with reference to the maximum axis specific feed [2]-17. Only weighting factors less than 100% are allowed (according to G194, chapter 4.25)

POS<expr> Axis position

SLOPE_PROFIL<expr> Profile types of slope (0, 1, 2) (according to #SET SLOPE PROFIL, chapter 11.14.1 ) If no slope type is programmed, as default the type of the channel parameters [1] -26 is used.

M<expr> Axis specific M-function

H<expr> Axis specific H-function

Axis specific M/H-functions can also be outputted to an independent axis without programming any movement. You must only add the identification INDP_SYN respectively INDP_ASYN.

<axis_name> [ INDP_SYN | INDP_ASYNM<expr> {M<expr>} H<expr> {H<expr>} ]

<axis_name> Axis designation of independent axis

INDP_SYN/INDP_ASYN Identification for a independent axis

M<expr> Axis specific M-function

H<expr> Axis specific H-function

Synchronization of special asynchronous axes movements (INDP_ASYN) can be enforced with the NC-command:

#WAIT INDP [ <axis_name> { ,<axis_name> } ]

<axis_name> Axis designation of independent axis

If an asynchronous axis is programmed again before or without a corresponding #WAIT INDP [ ], synchronization is done in the interpolator implicitly.

Synchronization of all present active asynchronous axes movements (INDP_ASYN) can be enforced with the NC-command:

#WAIT INDP ALL

Programming example

:

N10 X10 Y11 Z[INDP_SYN POS50 G01 FEED100 G90] (N10 is finished, if X,)
(Y and the independent)
(synchr. Z-axis have)
(finished their movements)

N20 X20 Y22 (N20 is executed after all movements of N10 are)
(finished)

N30 X5 Y10 Z[INDP_ASYN POS500 G01 FEED200 G90] (N30 is finished, if X)
(and Y have finished)
(their movements; the)
(independent asynchr.)
(Z-axis goes on with)
(its movement)

N40 X20 Y30 (N40 is interpolated; the asynchronous independent)
(Z-axis is still moving)

N50 #WAIT INDP[Z] (Synchronization of Z-movement of N30)

N60 X30 Y40 Z60 (X, Y, Z are interpolated together in the path)
(compound, after Z-axis was synchronized in N50)

N70 Z[INDP_SYN M50 ] (Output of M50 for the independent Z-axis)

N80

Programming example

N10 X10 Y11 Z[INDP_ASYN POS500 G01 FEED200 G90] (N10 is interpolated,)
(the independent asyn-)
(chronous Z-axis still)
(moves)

N20 X20 Y22 (N20 is interpolated, the independent asynchronous)
(Z-axis still moves)

N30 Z550 (Implicit synchronization of Z-movement of N10, before)
(movement Z550 is started)

N40 X20 Y30 Z60 (N40 is interpolated)

N50

If in the same block an independent axis is programmed together with an axis specific M-/H-function [1] -7/-8 for the same axis, then an error message is output.

Example: M10 is a X-axis specific M-function ( m_default_outp_ax_name[10] X ):

N10 M10X [ INDP_SYN G01 G90 POS10 FEED1000 M7]

|_____| ← Error!


Oscillating axes

The availability of this function depends on the configuration and the concrete scope of version.

For specific machining technologies such as grinding, an oscillating axis movement is necessary which is executed largely independently of a contouring motion.

This motion referred to below as an "oscillating motion" is executed by the tool periodically reversing over the workpiece.

An oscillating axis during grinding is presented below as an example. The workpiece is machined by superposition of the oscillating X motion with positioning motions in the Y and Z axes.

Fig. 19.2: Grinding with an oscillating axis

The essential characteristics of the oscillating motion result from the oscillating motion between two absolute positions and the feed rate

The oscillating motion is started and stopped, and its parameters defined, via the NC program

Any definition of the oscillating axis within the scope of the configured axes is allowed. The oscillating motion is asynchronous to the contouring motion.

Deactivation of the oscillating motion is done:

q directly by an NC command

q or implicitly at the transition of the programmed oscillating axis to the contouring motion

q or implicitly when axes positions for the synchronization of decoding and interpolation are requested

q or implicitly at the end of the NC program

By setting the slope type in the channel parameter [1]-26 (linear/non-linear slope) for the oscillating motion the nature of the speed profile in the dynamic phase can be defined.

The programming syntax is based on the axis-specific programming of independent axes. After the axis identifier, the parameters of the oscillating motion are defined via key words and, if applicable, an associated value:

<axis_name> [ OSC ON | OFFFEED<expr> | FREQ<expr> | TIME<expr>

[1ST_POS<expr>2ND_POS<expr>] | [ ZERO_POS<expr>EXCUR<expr>]

[1ST_DELT<expr>2ND_DELT<expr>] [NBR_OSC<expr>] ]

<axis_name> Name of the oscillating axis

OSC Identification for "Oscillating". Must always be the first programmed keyword.

ON Oscillation on. Before the oscillating motion is started, first of all an active contouring motion is stopped at block end.

OFF Oscillation off. After that, the oscillating axis can be moved in normal contouring motion. Implicit deactivation of the oscillating motion when a new command is executed without previous cancellation.

FEED<expr> Feed rate of oscillating motion in path units/min

FREQ<expr> Frequency of oscillating motion in Hz

TIME<expr> Period of oscillating motion in s

1ST_POS<expr> First reversal position in mm

2ND_POS<expr> Second reversal position in mm

ZERO_POS<expr> Zero point of oscillating motion in mm

EXCUR<expr> Excursion in mm

1ST_DELT<expr> Waiting time at first reversal position in s

2ND_DELT<expr> Waiting time at second reversal position in s

NBR_OSC<expr> Number of oscillations

The characteristic of the oscillating motion is determined by the locations of the reversing positions and the axis feed rate. The reversing positions can either be specified directly or, as an alternative, are determined automatically via the zero position and the excursion.

q The oscillating positions are always absolut positions.

q After deactivation of the oscillating motion, stopping always takes place at oscillating position 2!

As an alternative, the oscillating speed can be determined via the feed rate, the frequency or the period.

If no restriction occurs due to the dynamic characteristic axis quantities, the frequency and the period are kept to exactly when using the linear slope, and approximately when using the non-linear slope.

Fig. 19.3: Positioning during the oscillating motion

Programming examples

Specifying the oscillation travel distance via reversal positions

N10 X[OSC ON 1ST_POS=-100 2ND_POS=100 FEED=1000]

Specifying the oscillation travel distance via the zero position and the excursion, 10 oscillations

N20 X[OSC ON ZERO_POS=0 EXCUR=100 FEED=1000 NBR_OSC=10]

Specifying 1 Hertz oscillation frequency

N30 X[OSC ON ZERO_POS=0 EXCUR=100 FREQ=1]

Specifying a 4s period

N40 X[OSC ON ZERO_POS=0 EXCUR=100 TIME=4]

Oscillating motion with feed motion of a contouring axis

N50 X[OSC ON 1ST_POS=111 2ND_POS=222 FREQ=1]

N60 G01 G90 Y500 F200

Oscillating with waiting times of 0.5 s each at the reversal positions

N70 X[OSC ON 1ST_POS-100 1ST_DELT0.5 2ND_POS200 2ND_DELT0.5 FEED1000]

Cancelling oscillation

Oscillation is stoped with reaching of reversal position 2:

N80 X[OSC OFF]

Fast stop of oscillation

If an OFF is programmed in combination with FEED, the oscillation motion is stopped at once (feedhold for oscillation axis) and the reversal position 2 is directly moved with the new feed.

N90 X[OSC OFF FEED=5000]

Specifying the equal sign between the key word and the value is optional.


Cartesian / kinematic transformation and positioning axes

More:

button Positioning and shifts

button Restrictions


Positioning and shifts

For conventional operation and in CS mode (#CS, #ACS) with active independent axis or oscillation axis the user has to program absolute positions for this axes. This means, if a tool change has been executed, possibly the tool length has to take into consideration during programming of this axis. Zero offsets (G54..G59) or coordinate presets (G92) programmed before are not effective.

During active kinematic transformation (#TRAFO) the tool offsets are considered directly in the transformation. This means, they are also considered for active independent axes or oscillation axes. Here also zero offsets (G54..G59) or coordinate presets (G92) programmed before are not effective.


Restrictions

An oscillation or independent movement has to be deselected before activation of a cartesian or kinematic transformation.

A positioning axis may only be programmed:

q for cartesian kinematics, and

q only for the third main axis (generally Z axis) for tools perpendicular on the XY machine base (e.g. A axis on 0 degree at CA head kinematic).

Programming examples

Programming of independent axes:

N10 #KIN ID[9]

N20 #TRAFO ON

N30 Z[INDP_ASYN G01 G90 POS20 F0.01 SLOPE_PROFIL 0]

N40 Z[INDP_ASYN G01 G90 POS-20 F0.01 SLOPE_PROFIL 0]

N50 G01 G90 X100 F0.1

N60 #TRAFO OFF

N100 M30

N10 G00 X0 Y0 Z0 C0

N20 #CS ON[0,0,0,0,0,45]

N30 Z[INDP_ASYN G01 G90 POS20 F0.01 SLOPE_PROFIL 0]

N40 Z[INDP_ASYN G01 G90 POS-20 F0.01 SLOPE_PROFIL 0]

N50 G01 G90 X100 F0.1

N60 #CS OFF

N100 M30

N10 #KIN ID[9]

N20 #TRAFO ON

N30 #CS ON[0,0,0,0,0,45]

N40 Z[INDP_ASYN G01 G90 POS20 F0.01 SLOPE_PROFIL 0]

N50 Z[INDP_ASYN G01 G90 POS-20 F0.01 SLOPE_PROFIL 0]

N60 G01 G90 X100 F0.1

N70 #CS OFF

N80 #TRAFO OFF

N100 M30

Programming examples

Programming of oscillation axes:

N10 G00 X0 Y0 Z0 C0

N20 #KIN ID[9]

N30 #TRAFO ON

N40 Z[OSC ON 1ST_POS=10 2ND_POS=20 FEED=1.00]

N50 G01 G90 X100 Y100 F0.1

N60 Z[OSC OFF FEED=2.00]

N70 #TRAFO OFF

N100 M30

N10 G00 X0 Y0 Z0 C0

N20 #CS ON[0,0,0,0,0,45]

N30 Z[OSC ON 1ST_POS=10 2ND_POS=20 FEED=1.00]

N40 G01 G90 X100 Y100 F0.1

N50 Z[OSC OFF FEED=2.00]

N60 #CS OFF

N100 M30

N10 G00 X0 Y0 Z0 C0

N20 #KIN ID[9]

N30 #TRAFO ON

N40 #CS ON[0,0,60,0,0,45]

N50 Z[OSC ON 1ST_POS=10 2ND_POS=20 FEED=1.00]

N60 G01 G90 X100 Y100 F0.1

N70 Z[OSC OFF FEED=2.00]

N80 #CS OFF

N90 #TRAFO OFF

N100 M30

Programming example

The following part programm shows an invalid nesting of CS, kinematic transformation and oscillation:

N10 #KIN ID[9]

N20 #TRAFO ON

N30 Z[OSC ON 1ST_POS=10 2ND_POS=20 FEED=1.00]

N40 G01 G90 X100 Y100 F0.1

N50 #CS ON[0,0,0,0,0,45]

N60 G01 G90 X100 F0.1

N70 #CS OFF

N80 #TRAFO OFF

N90 Z[OSC OFF FEED=2.00]

N100 M30


Axis specific programming

The programming syntax is based on the axis-specific programming of positioning axes. After the axis identifier, the parameters defined via key words and, if applicable, an associated value.

More:

button Selection/deselection of axis compensations in NC program

button Distance controlled axes

button Programmable axis override

button Programmable acceleration overload


Selection/deselection of axis compensations in NC program

TwinCat CNC: from V263.1501

Others: from V260

The several axis compensations [FCT-C5] also can be selected and deselected directly by a command in the NC program. Axis specifically in one NC block for several axes different axis compensations can be activated or deactivated at the same time.

<axis_name> [ COMP [ [ON | OFF [ CROSS | PLANE | LEAD | TEMP ] ] | OFF_ALL] ]

<axis_name> Name of the axis

COMP Identification for selection/deselection of axis specific compensations. Must always be the first programmed keyword.

ON Switch on the programmed compensation(s)

OFF Switch off the programmed compensation(s)

CROSS Keyword for cross compensation

PLANE Keyword for plane compensation

LEAD Keyword for spindle leadscrew error compensation

TEMP Keyword for temperature compensation

OFF_ALL Switch off all active compensations. After the keyword no further compensations keywords may be programmed.

Programming examples

N10 X[COMP OFF CROSS PLANE] Switch off cross-and plane compensation in X axis

N50 X[COMP OFF CROSS] Y[COMP ON LEAD TEMP] Compensation programming of multiple axes in one common NC block

N100 Z[COMP OFF_ALL] Switch off all compensations in Z axis


Distance controlled axes

The availability of this function depends on the configuration and the concrete scope of version.

If the tool supporting axis (spindel axis) is equiped with the necessary hardware, with help of this function the distance of the tool to an uneven workpiece surface can be predefined and controlled. The distance is seized by a measurement system and is tracked by the NC to the uneven surface.

The distance control for a spindle with touch probe is enabled with the parameter [2]-27. The activation is done with the following NC command.

<axis_name> [DIST_CTRL [ON | OFF] |CHECK_POS | FREEZE | REFSET_POS<exp>
VAL1<expr> -VAL5<expr> ]

<axis_name> Name of the tool supporting axis

DIST_CTRL Identification for "Distance controlled spindles". Must always be the first programmed keyword.

ON Distance control on.

OFF Distance control off.

CHECK_POS Check, if position is in tolerance window.

FREEZE Freeze the controlled distance above the workpiece. The axis position is hold; no tracking operation.

REF Referencing of the measurement system (only necessary if no absolute measurement system is present)

SET_POS<expr> Actual distance value above the workpiece [mm] (absolute position).

VAL1<expr>-VAL5<expr> Free usable values (5)

The keywords ON/OFF, FREEZE, CHECK_POS and REF are excluding keywords in the the same command sequence. The keywords SET_POS and VAL1-VAL5 always can be programmed in combination with the other keywords. If the function on program end is still active, it is deselected automatically (implicite "OFF").

Programming example

%DIST_1

N10 Z[DIST_CTRL SET_POS=30] Set position

N20 Z[DIST_CTRL ON] Selection

N20 Z[DIST_CTRL CHECK_POS VAL1=10 VAL2=45] Check position

:

Nxx Z[DIST_CTRL OFF] Deselection

N999 M30

%DIST_2

N10 Z[DIST_CTRL ON SET_POS=30] Selection+set position

:

Nxx Z[DIST_CTRL FREEZE] Hold position

:

Nxx Z[DIST_CTRL OFF] Deselection

N999 M30


Programmable axis override

This command allows for the axis feed, if required the different influencing of feed and rapid feed blocks in the NC program. The axis specific programmed override during path motions is active, if the assigned axis is moving. Therefrom the real time influencing of the feed by the PLC is not affected

As a second function also a programmable path override is available.

For several moved axes in the same NC block with different axis specific override values always the smallest override takes effect. If additionally also a path override is defined, the effective override results from the multiplication of the both override values.

The function G166 suppresses the effect of programmed override values.

<Axis_name> [ OVERRIDE FEED_FACT <expr> RAPID_FACT <expr> ]

< Axis_name > Name of the axis.

OVERRIDE Identification for the axis specific override programming. Must always be the first programmed keyword.

FEED_FACT<expr> Override factor for feed blocks [0,1% - 200%].

RAPID_FACT<expr> Override factor for rapid feed blocks [0,1% - 200%].

Programming example

%ax_override

N10 G01 X100 Y100 Z100 F1000

N40 X[OVERRIDE FEED_FACT=20 RAPID_FACT=60] Axis override X G01 20%, G00 60%

N50 Y[OVERRIDE FEED_FACT=30 RAPID_FACT=70] Axis override Y G01 30%, G00 70%

N60 Z[OVERRIDE FEED_FACT=40 RAPID_FACT=80] Axis override Z G01 40%, G00 80%

N50 G00 X0 G00 motion with 60% override

N60 Y0 G00 motion with 70% override

N70 Z0 G00 motion with 80% override

N80 G01 X100 F2000 G01 motion with 20% override

N90 Y100 G01 motion with 30% override

N100 Z100 G01 motion with 40% override

N110 X200 Y200 G01 motion with 20% override

N120 X300 Y300 Z200 G01 motion with 20% override

M30


Programmable acceleration overload

For technological reasons in connection with contour affecting processes it can be necessary to exceed the given dynamic limit values of the drive in order e.g. to ensure a constant path speed on polynomial contours.

The following axis specific command combined with the assigned parameter P-AXIS-00394 allows the weighting of the dynamic of the axis in percent exceeding the permissible maximum acceleration P-AXIS-00008. P-AXIS-00394 represent the permissible upper limit for the acceleration weighting factor of the axis in per mill. The weighting factor refers to the feed dynamic limit values of the corresponding active slope profile.

At the moment the function for the weighting of the acceleration only can be used in conjunction with contouring mode 6.

<Axis_name > [ DYNAMIC DIST_SOFT | ACC_FACT<expr>]

< Axis_name > Name of the axis.

DYNAMIC Identification for the dynamic weightinh of the axis. Must always be the first programmed keyword.

DIST_SOFT Identification for the polynomial contourig mode 6.

ACC_FACT<expr> Axis specific weighting factor in %

The minimum weighting value is 100% !

The maximum weighting value is limited on P-AXIS-00394 .

Programming example

%dynamic

N10 #SET SLOPE PROFIL[0]

N20 #CONTOUR MODE[DIST_SOFT SYM_DIST=35 ACC_MAX=100 ]

N30 C[DYNAMIC DIST_SOFT ACC_FACT=200]

(* Acceleration overload factor for C axis 200% *)

N30 G1 G91 G261

N40 X59.485 F10000

N50 X105.172 C26.992

N60 X113.189 C46.171

N70 X100.348 C-46.171

N80 X99.179 C-26.992

N90 G260 X138.799

N100 G261

M30


Overview of commands

More:

button G-functions

button M-functions

button Functions reserved according to DIN and ISG-extensions

button Control block statements

button Additional functions

button Additional axis specific functions

button PLC-Open functions

button Variables programming

button Miscellaneous functions


G-functions

G00 | Rapid traverse
G01 | Linear interpolation
G02 | Circular interpolation, clockwise (cw.)
G03 | Circular interpolation, counter-clockwise (ccw.)

812_start

G02/03

Helical interpolation

812_end

G04

Dwell

G08 | Acceleration at block begin
G09 | Deceleration at block end

G10 | Feedrate constant
G11 | Feedrate adapted

812_start

G12 | Deselection of corner feed reduction
G13 | Selection of corner feed reduction

812_end

G17 | X-Y-plane
G18 | Z-X-plane
G19 | Y-Z-plane

G20 | Deselection of mirroring
G21 | Mirroring of programmed path on the Y-axis
G22 | Mirroring of programmed path on the X-axis
G23 | Superimposing of G21 and G22

812_start

G33

Thread cutting, uniform lead

G51 | Selection of diameter programming
G52 | Deselection of diameter programming

812_end

G53 | Deselection of zero offsets
G54 G59 | Selection of zero offsets

G60

Exact stop

G61

Polynom contouring

G63

Tapping

G70 | Inch data input
G71 | Metric data input

G80  G89

Implicite subprogram calls

G90 | Absolute dimensioning
G91 | Incremental dimension (relative)

G92

Coordinate preset

G93 | F-word for specifying machining time
G94 | F-word for specifying the feedrate

812_start

G95

Feedrate in millimeter per revolution

G96 | Constant cutting speed
G97 | Specification of spindle speed in 1/min

812_end

G98 | Set negative software limit switch
G99 | Set positive software limit switch

G100 | Measuring functions (Typ 1- 7)
G101 | Inclusion of measuring offsets in shifts
G102 | Extracting measuring offsets from shifts
G106 | Measurement with movement to target point
G107 | Deselection of block global edge banding
G108 | Edge banding

G115 | General influencing of look-ahead
G116 | Manipulate look-ahead
G117 | Switch on look-ahead (default)
G129 | Weighting of rapid traverse velocity
G130 | Axis-specific weighting of acceleration
G131 | Axis group-specific weighting of acceleration
G132 | Axis-specific weighting of ramp time
G133 | Axis group-specific weighting of ramp time
G134 | Axis group-specific weighting of geometrical ramp time
G159 | Extended zero offsets

812_start

G160

Axis specific activation of zero offsets

812_end

G161* | Circle center point, absolute
G162** | Circle center point, relative
G163 | Radius programming
G164 | Circle center point offset off
G165 | Circle center point offset on

G166 | Override 100%
G193 | Path related feed adaptation
G194 | Weighting of maximum feed velocity

812_start

G196

Maximum spindle speed for G96

812_end

G200 | Selection of manual mode without parallel interpolation
G201 | Selection of manual mode with parallel interpolation
G202 | Deselection of manual mode with parallel interpolation

G239 | Direct selection/deselection of TRC without a block
G260 | Deselection of polynom contouring
G261 | Selection of polynom contouring
G293 | Time related feed adaptation
G301 | Inserting of chamfers
G302 | Inserting of rounding

812_start

G310

Interruptible block (Measurement typ 5 - 6)

812_end

G351 | Mirroring with axis information
G359 | Deselection of exact stop
G360 | Selection of exact stop
G800  G819 | Additional implicite subprogram calls
G900 | Switching to deceleration after block end
G901 | Deceleration after block end

*If G162 is active:

I Relative position of the circle center point in X-direction

J Relative position of the circle center point in Y-direction

K Relative position of the circle center point in Z-direction

**If G161 is active:

I Absolute position of the circle center point in X-direction

J Absolute position of the circle center point in Y-direction

K Absolute position of the circle center point in Z-direction


M-functions

M00 | Programmed stop
M01 | Optional stop
M02 | Program end

M17 | End of subroutine

M29 | End of subroutine
M30 | Program end

M40 - 45

Selection of spindle gear ranges


Functions reserved according to DIN and ISG-extensions

D | Tool geometry compensation
E* | Feedrate at block end
F | Feedrate at block start
H | Technological information to PLC
L | Subroutine call (global)
L CYCLE | Cycle call
LL | Subroutine call (local)
N | Block number
P | Parameter calculation
R | Radius programming
S | Spindle speed
S.POS | Spindle position
T | Tool selection
/ | Skipping of NC-blocks


Control block statements

BREAK- statement ($BREAK) | 219
CONTINUE- statement ($CONTINUE) | 220
DO- loop ($DO, $ENDDO) | 218
REPEAT- loop ($REPEAT, $UNTIL) | 218
FOR- loop ($FOR, $ENDFOR) | 216
GOTO- statement ($GOTO) | 213
IF- ELSE- branching ($IF, $ELSE, $ELSEIF, $ENDIF) | 207
SWITCH- branch ($SWITCH, $CASE, $DEFAULT, $ENDSWITCH) | 209
WHILE- loop ($WHILE, $ENDWHILE) | 217


Additional functions

#ACHSE | Programming of axes for manual operation
#ACS ON / OFF | Definition/activation of a fixture adaptive coordinate system
#ADD | Additional information at block end
#AX DEF | Definition of an axes configuration (extended syntax)
#AX DEF DEFAULT | Loading of default axes configuration (extended syntax)
#AX REQUEST | Requesting of axes (extended syntax)
#AX RELEASE | Releasing of axes (extended syntax)
#AX RELEASE ALL | Releasing of all axes (extended syntax)

812_start

#BACKWARD STORAGE CLEAR

Clearing of backward storage

812_end

#BLOCKSEARCH LOCKED / RELEASED | Locking of program areas for block search
#CALL AX | Requesting of axes
#CAX | Requesting of a spindle axis for C-axis operation
#CAX OFF | Conversion of C-axis into spindle
#CAXTRACK ON/OFF | Automatic axis tracking
#CLEAR CONFIG | Deleting of a saved configuration
#COMMENT BEGIN / END | Inter-block valid comments
#CONTOUR MODE | Parametering of polynomial contouring
#CONTROL AREA START / END | Definition of control areas
#CONTROL AREA ON / OFF | Selection/deselection of control areas
#CONTROL AREA CLEAR | Deleting of control areas
#CS ON/ OFF | Definition/activation of a machining coordinate system
#CYL | Selection of lateral surface machining
#CYL OFF | Deselection of lateral surface machining
#DELETE | Deleting of self-defined variables or parameters
#DRIVE WR SYN / WAIT SYN | Switching of drive functions
#ECS ON / OFF | Selection/deselection of effector coordinate system
#ENABLE AX LINK / #DISABLE AX LINK | Selection of coupling instruction
#ERROR | User-defined error output
#EXPL SYN | Explicite synchronisation
#FACE | Selection of facing
#FACE OFF | Deselection of facing
#FGROUP | Definition of a feed group
#FGROUP ROT | Feed axes for rotary workpieces
#FGROUP WAXIS | Weakest axis becomes feed axes
#FILENAME | Definition of file names
#FILTER | Filter programming
#FLUSH | Flushing CNC-channel with interruption of movement
#FLUSH CONTINUE | Flushing CNC-channel without stopping of movement
#FLUSH WAIT | Synchronization of decoding and interpolation
#FREE TOOL CHANGE ON / OFF | Tool change during active synchronous operation
#GET IPO OFFSET | Acceptance of current offsets
#GET WCS POSLIMIT | Motion limits within a workpeace coordinate system
#HSC ON / OFF | Free form surface programming
#IDENT WR / RD / SYN | Writing/Reading of SERCOS- parameters
#IF / ELSE / ENDIF | Conditional interpretation
#INIT MAKRO TAB | Initialization of macro table
#KIN ID | Machine kinematics
#LOAD CONFIG | Loading of a saved configuration
#MACHINE DATA | Writing of machine data
#MAIN SPINDLE | Switching of main spindle
#MCS ON / OFF | Temporary transition to the machine axes coordinate system
#MCS TO WCS | Transformation of machine coordinate into workpiece coordinate
#MEAS MODE | Switching of measurement type
#MEAS | Extended measurement options
#MSG | Messages from the NC-program
#MSG INFO | Message information
#MSG SAVE | Writing messages into a file

812_start

#OPTIONAL
EXECUTION ON / OFF

Omitting of program parts during forward/backward on path

812_end

#OVERRIDE | Programmable path override
#PSET / #PRESET | Selection/deselection of programming position preset
#PTP ON / OFF | Positioning without compensation motion
#PUT AX | Releasing of axes
#PUT AX ALL | Releasing of all axes
#ROTATION ON / OFF | Contour rotation
#RTCP ON/ OFF | Selection/deselection of rotation tool center point (old syntax)
#SAVE CONFIG | Saving of a configuration
#SET ASPLINE MODE | Specification of the type of transition
#SET ASPLINE STARTTANG | Definition of start tangent
#SET ASPLINE ZIELTANG | Definition of target tangent
#SET AX | Definition of an axes configuration
#SET AX LINK | Programming coupling instruction

812_start

Parametering of corner feed reduction

812_end

#SET DEC LR SOLL | Acceptance of current command positions of all axis
#SET HR | Parametering handwheel operation mode
#SET IPO SOLLPOS | Acceptance of current set position of one axes
#SET JOG | Parametering incremental jog mode
#SET OFFSET | Presetting of offset limits
#SET SLOPE PROFIL | Parametering of the acceleration profile
#SET SPLINETYPE AKIMA | Selection of Akima-Spline

812_start

#SET SPLINETYPE BSPLINE | Selection of B-Spline
#SET TANGFEED RMIN | Minimum radius for tangential feedrate adaptation

812_end

#SET TIP | Parametering continuous jog mode
#SIGNAL | Sending of signals
#SIGNAL REMOVE | Deleting of broadcast signals
#SUPPRESS OFFSETS | Suppression of offsets
#TIME | Dwell time
#TIMER | Time measurement
#TLC ON/ OFF | Selection/deselection of tool length compensation
#TOOL DATA | Demand of tool data
#TOOL LIFE READ / REMOVE | Read/delete tool life data
#TOOL ORI CS | Tool alignment
#TOOL PREP | Preparation of tool change
#TOOL REFRESH | Refreshing of tool data
#TRAFO ON/ OFF | Selection/deselection of rotation tool center point
#TRANSVELMIN ON / OFF | Minimum block transition velocity

812_start

TRC additional options

812_end

#VECTORACC ON / OFF | Adaption of the path dynamic limits (acceleration)
#VECTORVEL ON / OFF | Adaption of the path dynamic limits (velocity)
#VECTOR LIMIT ON / OFF | Adaption of the path dynamic limits
#WAIT | Waiting for signals
#WAIT FOR | Waiting for an event
#WAIT INDP | Wait for asynchronous independent axis
#WAIT INDP ALL | Wait for all asynchronous independent axes
#WCS TO MCS | Transformation of workpiece coordinate into machine coordinate


Additional axis specific functions

INDP_SYN | Synchronous (block wise) independent axis movement
INDP_ASYN | Asynchronous (multi block) independent axis movement
OSC | Oscillating axes
COMP | Selection/deselection of axis compensations
DIST_CTRL | Distance controlled axes
OVERRIDE | Programmable axis override
DYNAMIC | Programmable acceleration overload


PLC-Open functions

MC_Home | Reference pointtravel
MC_MoveAbsolute | Movement of the axis to an absolute position
MC_MoveAdditive | Relative motion in addition to the commanded position
MC_MoveRelative | Relative motion in addition to the current
MC_MoveSuperImposed | Relative motion in addition to a motion already active
MC_MoveVelocity | Endless motion at the specified speed
MC_Stop | Stopping of an axis motion
MC_GearIn | Gear coupling with a gear ratio
MC_GearOut | Releasing of a gear coupling
MC_Phasing | Phase offset of couplings


Variables programming

V.A. ... | Axis-specific variables | 227
V.SPDL. | Spindle-specific variables | 227
V.G. | Global variables | 227
V.P. | Self-defined variables, program global | 227
V.S. | Self-defined variables, global | 227
V.L. ... | Self-defined variables, program local | 227
V.E. | External variables | 227
V.TOOL. | Tool identification variables | 227
V.TLM. | Tool life variables | 227


Miscellaneous functions

For the programming of mathematical expressions and string processing several calculation operations and functions are available.