Online tool compensation (C20)

1.1 IntroductionPAGEREF _Toc307389869 \h2

1.2 Description 3

1.2.1 Syntax of the command 3

1.2.2 Wear compensation of tool radius 5

1.2.3 Wear compensation of tool length 6

1.2.3.1 Inclination of grinding wheel 7

1.2.4 Special settings in tool data 8

1.2.5 Connection to PLC 9

1.2.5.1 Commissioning  Wear radius 9

1.2.5.2 Commissioning  Wear in orientation of axis 9

1.2.6 Special V.G.WZ_AKT variables 10

1.2.7 Connection to external tool management 11

1.3 Parameter 13

1.3.1 Overview 13

1.3.2 Description 13

More:

button Introduction

button Description

button Parameter


Introduction

Task

In some special processes like grinding it is necessary to correct permanently the length or the radius of the tool to compensate the wear.

The compensation of the wear depends on the moved distance. Additional is it possible to correct the wear of the tool by PLC.

The wear compensation is activated and deactivated from the NC program. The parameterisation of the wear constant is possible both from the NC program and over preset parameters in the tool list. [TOOL]

Rapid movement blocks are assumed without wear.

It is presumed that the whole width of the lateral surface of the grinding disc is in contact.

Figure 1-1: Grinding of a contour


Description

Tool type

Processing types

Modes

For the wear compensation the new tool type 2 (grinding tool) is introduced.

The online wear compensation can be used for two different types of processing and in three different modes each.

1. Radius compensation (only in combination with active TRC) for processing of contours in the plane

2. Length compensation for processing of surfaces (surface grinding)

1. Continuous (dependent on the moved path)

2. Discrete (discrete wear corrections via PLC)

3. Automatic, combination of discrete and continuous

Additional wear values, which are assigned over the PLC, are adjusted over several cycles.

More:

button Syntax of the command

button Wear compensation of tool radius

button Wear compensation of tool length

button Special settings in tool data

button Connection to PLC

button Special V.G.WZ_AKT variables

button Connection to external tool management


Syntax of the command

Programming the online tool compensation in NC program the following NC command is available:

Activation/ deactivation and parameterization(optional):

#OTC ON | OFF [ [RADIUS | LENGTHDISC | CONT | AUTO

WEAR_CONST <expr> | WEAR_CONST_TOOL] ]

RADIUS | Processing type radius compensation
LENGTH | Processing type length compensation (default)
DISC | Mode - Discrete : input over PLC, external presetting
CONT | Mode - Continuous: presetting of the values only from calculation of moved path and wear constant, internal calculation
AUTO | Mode - Automatic: addition of external presetting and internal calculation (default)
WEAR_CONST<expr> | User specific definition of the wear constant; It acts modal, this means with #OTC ON the programed wear constant will be used and not the wear constant from the current tool data. The definition of the valid wear constant is optional.
WEAR_CONST_TOOL | Switch to the default wear constant of the current tool; It acts modal, this means with #OTC ON the default wear constant of the current tool data is used and not the defined user specific wear constant.(default).


Wear compensation of tool radius

Contour grinding

In particular the wear compensation of the tool radius (radius compensation) is used if a contour with active tool radius compensation shall be processed.

The wear of the grinding wheel in the direction of the disk radius can be compensated continuously or discretely.

For the processing type radius compensation the wear is only considered with active tool radius compensation (TRC).

The following figure shows the wear of tool radius:

Figure 1-2: Wear compensation of tool radius

The starting movement to the equidistant path after selection of TRC (G41/G42) is assumed without wear.

The movement after deselection of TRC (G40) is also without wear.

The selection/ deselection of TRC has to be programmed during active radius compensation.

Programming example

...

N10 F10000

N20 D1 (Data selection of grinding wheel)

N30 G0 X0 Y0 Z0

N40 #OTC[RADIUS, AUTO] (OTC processing type + mode)

N50 #OTC ON (OTC-selection)

N60 G41 G01 X50 (TRC-selection, movement without wear)

N70 X1000

N80 G40 X50 (TRC-deselection)

N90 #OTC OFF (OTC- deselection)

N100 G00 X50

...


Wear compensation of tool length

Grinding of surface

While compensation of tool length (length compensation) the wear will be compensated in direction of the 3rd main axis. This can happen both continuously and discretely.

This procedure is particularly in use while processing of surfaces (surface grinding).

Figure 1-3: Wear compensation of tool length.

Programming example

...

N30 D1 (Data selection of grinding wheel)

N40 G00 X0 Y0 Z0

N50 #OTC ON [LENGTH] (OTC-selection and processing type)

N60 G1 X1000 F10000

N70 #OTC OFF (OTC-deselection)

...

More:

button Inclination of grinding wheel


Inclination of grinding wheel

Inclined grinding

Inclining of the grinding wheel caused by the corresponding entry in the tool list (P-TOOL-00032) is useful only for grinding of inclined surfaces. Here the complete lateral surface of the grinding disc also is in contact.

The following figure shows the orientation of the tilt angle in the G17 plane.

Figure 1-4: Inclination of grinding disc.

With the tilt angle tool orientation is determined.

Over this tool orientation the occured wear is then portioned proportionately on the main axis.


Special settings in tool data

Definition of the tool typeand the wear parameters:

wz[1].gueltig 1

wz[1].typ 2 grinding tool

wz[1].mass_einheit 0

wz[1].laenge 500000

wz[1].radius 300000

wz[1].ax_versatz[0] 0

wz[1].ax_versatz[1] 0

wz[1].ax_versatz[2] 0

...

# wear constant : unit 0.1µm/m

wz[1].grinding_wear_const 100000

# Maximal discrete infeed via PLC, unit: 0.1µm

wz[1].grinding_max_infeed 200000

# tilt angle, unit: 0.0001 degree

wz[1].grinding_disc_tilt_angle 0


Connection to PLC

More:

button Commissioning - Wear radius

button Commissioning - Wear in orientation of axis


Commissioning - Wear radius

TwinCAT CNC:Overview

Commissioning Wear radius

OTC radius offset
Description | The tool radius can be adapted by setting the wear offset according to the wear. Unit: 0.1µm
Data type | MCControlSGN32Unit
Characteristics | Assigned offsets are adjusted over several cycles.
Access | PLC reads Request + State and writes Command + Enable
ST-Path | pMC[channel_idx]^.addr^.McControlIpo.MCControlSGN32Unit_OTCRadiusOffset
Commanded, requested and return value
ST-Element | .X_Command .X_Request . X_State
Data type | DINT
Value range | [- P-TOOL-00031 , P-TOOL-00031 ]
Redirection
ST-Element | . X_Enable


Commissioning - Wear in orientation of axis

TwinCAT CNC:Overview

Commissioning Wear in orientation of axis

OTC offset
Description | Using this wear offset the wear in orientation of this axis could be corrected. Unit: 0.1µm
Data type | MCControlSGN32Unit
Characteristics | Assigned offsets are adjusted over several cycles.
Access | PLC reads Request + State and writes Command + Enable
ST-Path | pAC[axis_idx]^.addr^.McControlIpo.MCControlSGN32Unit_OTCOffset
Commanded, requested and return values
ST-Element | . X_Command .X_Request .X_State
Data type | DINT
Value range | [-P-TOOL-00031, P-TOOL-00031]
Redirection
ST-Element | .X_Enable


Special V.G.WZ_AKT variables

The wear of the current tool can be read after processing with the following variables.

With processing type radius compensation:

V.G.WZ_AKT.WEAR_RADIUS (wear of radius)

With processing type length compensation:

V.G.WZ_AKT.WEAR[<i>] (wear of axis <i>)

The current wear value is available after the deselection of OTC. It is about the wear which occured between selection and deselection of OTC.

For repeated selection and deselection of OTC in the same NC program the variables above contain the accumulated wear!

During active OTC the V.G.WZ_AKT wear values are not up to date. They are only updated after deselection of OTC (#OTC OFF)!


Connection to external tool management

Tool data

For the CNC the external tool management has to set the following data when providing a grinding tool:

· type: tool type 2 for grinding disc

· wear_const: wear constant

· disc_tilt_angle: tilt angle of the grinding disc

· ext_discret_limit: maximal discrete input by the PLC

After deselection of the grinding tool the wear data is communicated to the external tool management by the CNC. It is the total tool wear generated since the selection of the tool.

These values are taken over by the external tool management and are used internally for the recalculation of the geometric data of the tool (radius, length).


Parameter

More:

button Overview

button Description


Overview

ID | Parameter | Beschreibung
P-TOOL-00001 | typ | Tool type
P-TOOL-00030 | grinding_wear_const | Wear constant
P-TOOL-00031 | grinding_max_infeed | Maximum discrete input
P-TOOL-00032 | grinding_tilt_angle | Tilt angle of grinding disc

P-TOOL-00033 | grinding_disc_min_radius | Minimal radius of grinding disc
P-TOOL-00034 | grinding_disc_min_width | Minimal width of grinding disc

The parameters P-TOOL-00033 and P-TOOL-00034 for monitoring the grinding disc are not used at the moment.


Description

P-TOOL-00001 | Tool type
Parameter | typ
Description | To differentiate between milling , turning and grinding tools, the parameter "wz[i].typ" is allocated. 0  Milling tool 1  Turning tool 2  Grinding tool
Data type | UNS16
Data range | 0 ≤ P-TOOL-00001 ≤ 2
Dimension | translatory:- | rotatory:-
Default | 0
Remarks | -

P-TOOL-00030 | Wear constant
Parameter | grinding_wear_const
Description | The wear constant is used for the calculation of continuous wear. It can also be programmed alternatively in the NC program.
Data type | REAL64
Data range | 0 ≤ P-TOOL-00030
Dimension | translatory: 0,1µm /m | rotatory:-
Default | 0
Remarks | The wear constant should contain small values. There is no special dynamical consideration based on the generated wear.

P-TOOL-00031 | Maximum discrete infeed
Parameter | grinding_max_infeed
Description | The maximum discrete input is the greatest relative modification which can be assigned through the PLC.
Data type | REAL64
Data range | MIN(SGN32) ≤ P-TOOL-00031 ≤ MAX(SGN32)
Dimension | translatory: 0.1 µm | rotatory: -
Default | 0
Remarks | -

P-TOOL-00032 | Tilt angle of the grinding disc
Parameter | grinding_tilt_angle
Description | Angle between the centre line of the grinding disc and the 3rd main axis.
Data type | REAL64
Data range | -45°≤ P-TOOL-00032 ≤ 45°
Dimension | translatory:- | rotatory:0,0001°
Default | 0
Remarks | -

P-TOOL-00033 | Minimal radius of grinding disc
Parameter | grinding_disc_min_radius
Description | Minimal radius of grinding disc. This parameter is used for monitoring the grinding disc radius.
Data type | REAL64
Data range | 0 < grinding_disc_min_radius ≤ MAX(SGN32)
Dimension | translatory: 0,1µm | rotatory:0,0001°
Default | 0
Remarks | This parameter is not used at the moment.

P-TOOL-00034 | Minimal width of grinding disc
Parameter | grinding_disc_min_width
Description | Minimal width of ginding disc. This parameter is used for monitoring the grinding disc width.
Data type | REAL64
Data range | 0 < grinding_disc_min_width ≤ MAX(SGN32)
Dimension | translatory: 0,1µm | rotatory:0,0001°
Default | 0
Remarks | This parameter is not used at the moment.