Axis compensations (C5)

1.1 Compensation value listsPAGEREF _Toc307299026 \h3

1.2 Cross compensation 6

1.2.1 Example for a compensation list 7

1.3 Plane compensation 12

1.3.1 Example for a compensation list 13

1.3.2 Error messages 14

1.4 Leadscrew error compensation 19

1.4.1 Example - Non-equidistant, bilateral SSFK 19

1.5 Temperature compensation 21

1.5.1 General 21

1.5.2 Parametering 24

1.5.3 Example 25

1.6 Selection/deselection of axis compensations in NC program 26

More:

button Compensation value lists

button Cross compensation

button Plane compensation

button Leadscrew error compensation

button Temperature compensation

button Selection/deselection of axis compensations in NC program


Compensation value lists

Storing of
compensation values

The data for the compensation processes

q Cross compensation,

q Plane compensation and

q Leadscrew error compensation

are stored in so called compensation lists for each axis. This lists are interpreted during start up of the control or they can be updated at a later point of time.

It is possible, to activate for one axis all compensation processes (cross, plane, leadscrew error and temperature compensation) at the same time.

Provision of the compensation tab le

The following entries must be present in the startup description in order to announce the compensation table to the control system:

Variable name | Type | Significance
zahl_kw | UNS16 | Number of compensation value lists
achs_kw[i] | String | Name of the data file
achs_kw_log_ax_nr[i] | UNS16 | Logical axis number of the axis to which the compensation value list is to apply

with i as list index.

If the compensation value list is configured by the TwinCAT System Manager, these entries are made automatically in the startup list.

Example

Excerpt from startup list hochlauf.lis:

:

zahl_kw 3

#

achs_kw_log_ax_nr[0] 1

achs_kw[0] tc_...\achskw1.lis

#

achs_kw_log_ax_nr[1] 2

achs_kw[1] tc_...\achskw2.lis

#

achs_kw_log_ax_nr[2] 6

achs_kw[2] tc_...\achskw6.lis

:

Structure of the compensati on table

The compensation value list consists of a list header in which general data is entered and the list body in which the compensation algorithm is programmed and which contains the actual compensation table.

List header

The list header is identified in the list by the variable name kopf. It contains the following elements :

Variable name | Type | Significance
kopf.achs_nr | UNS16 | Logical axis number of the compensation value list
kopf.log_achs_name | String | Axis name of the axis; is used only for diagnostic purposes.

If the compensation value list is configured by the TwinCAT System Manager, these entries are made automatically in the compensation list.

List body

The list body contains general data and the compensation table. The entries of the list body are identified by structure variable kw.*. For the specific compensation processes it contains the following sub structures:

Variable name | Significance
kw.crosscomp | Data structure for cross compensation
kw.crosscomp2 | Data structure for plane compensation (2-dimensional cross compensation)
kw.ssfk | Data structure for leadscrew error compensation

Updating the compensation table

The compensation table can be updated with the control system in operation. The updated compensation table takes effect immediately provided the conditions for action are met.

With reference to the axes positions the NC channel has to be synchronized after start-up respectively actualization or reinitialization of a compensation.

The subsequent instruction of a fast program start or an axis exchange without requesting of axes positions ("FAST") is not allowed.


Cross compensation

Compensation
process

The cross compensation enables the correction of an axis position in dependence on the actual position of an other axis.

The axis, which has to be corrected, is named slave axis. The axis, which actual position influences the correction value, is named master axis.

A master axis can also be slave axis of an other master axis.

The data for the cross compensation have to be defined in the correction list of the slave axis.

Figure 1- 1 : Example for usage of cross compensation (Y: master, Z: slave).

Characteristics

A master axis corrects one or many slave axis.

A slave axis is only corrected by one master axis.

A compensation value can be defined for each interpolation point.

Linear interpolation of the compensation values between the given points in the table.

The cross compensation is realized for ± 10Volt drives, for simulation drives with relative measurement system and for SEROCS drives.

The corrections are only visible in the positionvalues directly passed to the drive. The normal display data does not include the compensation values, because the compensation is done out of normal calculation.

Action

The cross compensation acts under the following preconditions:

q The function is activated for the slave axis.

q A compensation table must be provided to the control system for the axis.

q Master- and slave axes are translatory axes. From CNC version v263.1504 onwards it is also possible to use the cross compensation with rotatory axes or spindles.

q The master axis has been referenced. A homing of the slave axis is not required.

Activation

The cross compensation is activated for the specified axis with P-AXIS-00047 in the axis parameter list [AXIS] of the slave axis:

Variable name | Type | Significance
lr_param.crosscomp | BOOLEAN | 0: no cross compensation 1: Cross compensation active

Example

Excerpt from axis parameter list:

:

lr_param.crosscomp 1

:

The cross compensation also can be used for gantry axes. In this case each gantry axis has its individual compensation table. The tables need not to be identical.

Coupling/Decoupling | The cross compensation (ON, if: Master is referenced and compensation is active) can be coupled or decoupled at anytime, if the slave axis is in standstill. During this, the monitored command positions of the slave axis are allocated with the compensation values.
Filter | During referencing of the master axis for a moved slave axis in the run of the compensation values discontinuities can occur. They can be smoothed with a sin2-filter. The filter order and its activation can be influenced by the parameter P-COMP-00026 (n_cycles).

General data of cross compensation table

The general data of the list body are entered into the structure kw.crosscomp .* It contains following elements:

Elements of
general data

Variable name | Type | Significance
unit | SGN32 | Unit of the position entries 0: Encoder increments 1: Metric (in 0.1 μ m)
last_index | SGN32 | Index of last valid value in the correction table of the slave axis (Maximum 1000 values). The table always starts with index 0.
master_ax_nr | UNS16 | Logical number of the master axis which command position is used to calculate the correction values.
n_cycles | UNS16 | Number of cycles of the sin2-filter.

Compensation values of cross compensation

For each interpolation point in the table kw.crosscomp.table[i].* the corresponding compensation value of the slave axis is entered. The compensation table is valid for the positive and negative moving direction.

Compensation t able

Variable name | Type | Significance
table[i].setpoint | SGN32 | Absolute command position of the master axis on which the slave axis has to be corrected.
table[i].correction | SGN32 | Relative compensation value for the slave axis at interpolation point i.

Special feature for rotatory master axis

From CNC version v263.1504 onwards, it is possible to use the cross compensation with rotatory axes or spindles. For these axis types the position controller performs a modulo calculation of the axis position.

If the master axis of the cross compensation is a modulo axis, a "modulo transition" also occurs in the compensation table at the modulo transition of the master axis position. Therefore the correction values at the modulo transition must be the same in order to prevent a jump in the correction values of the slave axis at this position.

More:

button Example for a compensation list


Example for a compensation list

# ****************************************

# Axis compensation data of Z-axis

# ****************************************

kopf.achs_nr 3

kopf.log_achs_name Z

kw.crosscomp.last_index 99 /*Last valid index of the table*/

kw.crosscomp.master_ax_nr 1 /*Log. ax. number of the master axis*/

kw.crosscomp.unit 1 /*0:Incr. 1:Metric in 0.1 µm*/

kw.crosscomp.n_cycles 20

#

kw.crosscomp.table[0].setpoint 10735

kw.crosscomp.table[0].correction 3

kw.crosscomp.table[1].setpoint 11523

kw.crosscomp.table[1].correction 5

:

:

kw.crosscomp.table[99].setpoint 10000000 /*at 1000 mm of axis 3*/

kw.crosscomp.table[99].correction 1000 /*corr. of 0,1 mm for axis 1*/


Plane compensation

Compensation
process

The plane compensation enables the correction of an axis position in dependence on the actual positions of two other axes.

The axis, which has to be corrected, is named slave axis. The both axes, which actual positions influences the correction value, are named master axes.

One of the master axis can also be slave axis itself.

The data for the plane compensation has to be defined in the correction list of the slave axis.

Figure 1- 2 : Calculation of the compensation value based on the actual positions of the master axes.

Characteristics

The both master axes create a two-axes coordinate system, in the most simple case it is the X-Y-plane (master axis 1 = X-axis, master axis 2 = Y-axis).

The coordinate system is divided in squares like a chess board.

The length of the square can be defined.

The edges of the squares are the interpolation points of the table ( Figure 1-3 )

For each interpolation point a compensation value can be defined.

Between two interpolation points linear interpolation is active ( Figure 1-4 ).

Outside the table the compensation values of the table margin keep valid.

Figure 1- 3 : Definition of the compensation values at the interpolation points

Figure 1-4: Linear interpolation between 4 interpolation points of a square

Action

The plane compensation acts under the following preconditions:

q The function is activated for the slave axis.

q A compensation table must be provided to the control system for the axis.

q Master- and slave axes are translatory axes. From CNC version v263.1504 onwards it is also possible to use the plane compensation with rotatory axes or spindles.

q Master- and slave axes have absolute measuring systems or they have been referenced.

Activation

The plane compensation is activated with P-AXIS-00174 in the axis parameter list [AXIS] of the slave axis:

Variable name | Type | Significance
lr_param.crosscomp2 | BOOLEAN | 0: No plane compensation 1: Plane compensation is active

Example

Excerpt from axis parameter list:

:

lr_param.crosscomp2 1

:

Coupling/Decoupling

The plane compensation (ON, if: Master axes are referenced and compensation is active) can be coupled or decoupled at anytime, if the slave axis is in standstill. During this, the monitored command positions of the slave axis are allocated with the compensation values.

Filter

During referencing of the master axis for a moved slave axis in the run of the compensation values discontinuities can occur. They can be smoothed with a sin2-filter. The filter order and its activation can be influenced by the parameter P-COMP-00027 (n_cycles).

Special feature for rotatory master axes

From CNC version v263.1504 onwards, it is possible to use the plane compensation with rotatory axes or spindles. For these axis types the position controller performs a modulo calculation of the axis position.

If a master axis of the plane compensation is a modulo axis, a "modulo transition" also occurs in the compensation table at the modulo transition of the master axis position. Therefore the correction values at the modulo transition must be the same in order to prevent a jump in the correction values of the slave axis at this position.

General data of plane compensation

In the general data of the list body the required axes, the limits of the compensation area and so on are defined. The general data of the list body are entered into the structure kw.crosscomp2 .* It contains following elements:

Elements of
general data

Variable name | Type | Significance
unit | BOOLEAN | Unit of the position entries 0: Encoder increments 1: Metric (in 0.1 μ m)
interval | UNS32 | Distance between two interpolation points 0,1 µm (unit=1), respect. i ncrements (unit=0)
last_index_master1 | SGN32 | Last valid index in the table of master axis 1 (maximum value is 100). Table starts with index 0
last_index_master2 | SGN32 | Last valid index in the table of master axis 2 (maximum value is 100).
start_position_master1 | SGN32 | Start position in the compensation table for master axis 1
start_position_master2 | SGN32 | Start position in the compensation table for master axis 2
master1_ax_nr | UNS16 | Log. axis number of master axis 1
master2_ax_nr | UNS16 | Log. axis number of master axis 2
n_cycles | UNS16 | Number of cycles of the sin2-filter.

Compensation values of plane compensation

For each interpolation point in the table kw.crosscomp2.table[j][i].* the corresponding compensation value of the slave axis is entered.

Compensation t able

Variable name | Type | Significance
table[j][i].correction | SGN32 | Compensation value of the slave axis at interpolation point [j][i], see figure1.5

In the indexing of the interpolation points in the compensation table, the first index j refers to the second master axis. (see following figure).

Index j -> Master axis 2

Index i -> Master axis 1

Figure 1- 5 : Parameters of compensation table

More:

button Example for a compensation list

button Error messages


Example for a compensation list

# ****************************************

# Axis compensation data for Z-axis

# ****************************************

kopf.achs_nr 1

kopf.log_achs_name X

kw.crosscomp2.interval 100000 /* 10 mm */

kw.crosscomp2.last_index_master1 100

kw.crosscomp2.last_index_master2 100

kw.crosscomp2.start_position_master1 -400000 /* -40 mm */

kw.crosscomp2.start_position_master2 -700000 /* -70 mm */

kw.crosscomp2.unit 1 /* 0,1 my */

kw.crosscomp2.master1_ax_nr 1

kw.crosscomp2.master2_ax_nr 2

kw.crosscomp2.n_cycles 20

kw.crosscomp2.table[ 0][ 0].correction -3

kw.crosscomp2.table[ 0][ 1].correction -1

kw.crosscomp2.table[ 0][ 2].correction 4

kw.crosscomp2.table[ 0][ 3].correction 9

kw.crosscomp2.table[ 0][ 4].correction 13

kw.crosscomp2.table[ 0][ 5].correction 17

kw.crosscomp2.table[ 0][ 6].correction 42

kw.crosscomp2.table[ 0][ 7].correction 53

kw.crosscomp2.table[ 0][ 8].correction 33

kw.crosscomp2.table[ 0][ 9].correction 42

kw.crosscomp2.table[ 0][ 10].correction 19

kw.crosscomp2.table[ 0][ 11].correction 7

kw.crosscomp2.table[ 0][ 12].correction 2

kw.crosscomp2.table[ 0][ 13].correction 0

kw.crosscomp2.table[ 0][ 14].correction 5

kw.crosscomp2.table[ 0][ 15].correction -3

kw.crosscomp2.table[ 0][ 16].correction -7

kw.crosscomp2.table[ 0][ 17].correction -11

kw.crosscomp2.table[ 0][ 18].correction -13

kw.crosscomp2.table[ 0][ 19].correction -22

kw.crosscomp2.table[ 0][ 20].correction -34

kw.crosscomp2.table[ 0][ 21].correction -29

kw.crosscomp2.table[ 0][ 22].correction -99

...

kw.crosscomp2.table[100][ 71].correction 45

kw.crosscomp2.table[100][ 72].correction 68

kw.crosscomp2.table[100][ 73].correction 71

kw.crosscomp2.table[100][ 74].correction 90

kw.crosscomp2.table[100][ 75].correction 111

kw.crosscomp2.table[100][ 76].correction 123

kw.crosscomp2.table[100][ 77].correction 134

kw.crosscomp2.table[100][ 78].correction 147

kw.crosscomp2.table[100][ 79].correction 156

kw.crosscomp2.table[100][ 80].correction 176

kw.crosscomp2.table[100][ 81].correction 167

kw.crosscomp2.table[100][ 82].correction 148

kw.crosscomp2.table[100][ 83].correction 132

kw.crosscomp2.table[100][ 84].correction 123

kw.crosscomp2.table[100][ 85].correction 111

kw.crosscomp2.table[100][ 86].correction 101

kw.crosscomp2.table[100][ 87].correction 97

kw.crosscomp2.table[100][ 88].correction 88

kw.crosscomp2.table[100][ 89].correction 83

kw.crosscomp2.table[100][ 90].correction 82

kw.crosscomp2.table[100][ 91].correction 77

kw.crosscomp2.table[100][ 92].correction 68

kw.crosscomp2.table[100][ 93].correction 63

kw.crosscomp2.table[100][ 94].correction 61

kw.crosscomp2.table[100][ 95].correction 59

kw.crosscomp2.table[100][ 96].correction 57

kw.crosscomp2.table[100][ 97].correction 52

kw.crosscomp2.table[100][ 98].correction 56

kw.crosscomp2.table[100][ 99].correction 58

kw.crosscomp2.table[100][100].correction 49

#

End


Error messages

Errors in the configuration of plane compensation causes the deselection of the function for the concerned axis and the output of an error message (Warning).

Following error messages are possible:

Error-ID | 70182
Error text | Logical axis number for plane compensation is invalid.
Cause | The logical axis number of a master axis entered in the compensation table does not exist.
Parameter | Wert_1: the logical axis number of the compensation list (slave axis) Wert_2: the logical axis number of the master axis 1 Wert_3: the logical axis number of the master axis 2
Correction | Enter the correct axis number of the master axis in the compensation list.

Error-ID | 70183
Error text | Compensation list for plane compensation does not exist.
Cause | An axis parameter list has the entry for the activation of plane compensation, but for this axis no compensation list has been loaded.
Parameter | Wert_1: the logical axis number of the compensation list (slave axis)
Correction | Enter in startup list the missing compensation list.

Error-ID | 70184
Error text | Axis type of a master axis for plane compensation is invalid.
Cause | A master axis has not the required axis type translatory.
Parameter | Wert_1: the logical axis number of the master axis Wert_2: the expected value for axis type translatory (1) Wert_3: the invalid value for axis type translatory
Correction | Use the master axis as translatory axis, this means enter achs_typ=1 in the axis parameter list of the master axis

Error-ID | 70185
Error text | Axis type of the slave axis for plane compensation is invalid.
Cause | A slave axis has not the required axis type translatory.
Parameter | Wert_1: the logical axis number of the slave axis Wert_2: the expected value for axis type translatory (1) Wert_3: : the invalid value for axis type translatory
Correction | Use the slave axis as translatory axis, this means enter achs_typ=1 in the axis parameter list of the slave axis


Leadscrew error compensation

Compensation
process

Compensation table

Bilateral/ unilateral SSFK

Leadscrew error compensation (referred to below as SSFK) is an axial correction. The position setpoint of the compensated axis is changed by a compensation value on the basis of position controller timing, in order, for instance, to compensate for leadscrew errors. This correction is cancelled by computation again for the measured actual position values so that the correction performed does not appear in the display data of the control system.

The compensation values are taken from a table in which the characteristic of the compensation curve as a function of the axis position is saved. The axis positions entered in the table are designated as interpolation points and the related values of the compensation curve are referred to as compensation values. The compensation value is subject to linear interpolation for axis positions lying between interpolation points. The table of compensation values is referred to below as compensation table.

It is possible to state a separate compensation table for each movement direction of an axis. This method of compensation is referred to as bilateral compensation. If a table is used for both directions of movement of one axis, we speak of unilateral compensation.

The compensation tables are saved axis-specifically in a file (compensation value list).

The axis dynamics are ignored on output of the compensation values.

The diagram below shows a compensation value curve by way of example. The significance of the parameters used in the diagram is explained later.

Figure 1- 6 : Compensation table with equidistant interpolation point grid and unilateral compensation

Characteristics

This functionality features the following characteristics:

q The same interpolation point positions must be used for both value tables if using bilateral compensation.

q It is possible to define a compensation table only for a part-traversing range of an axis. The value at the relevant end of the table is reused for axis positions outside the compensation table.

q There may be any compensation value not equal to zero at the reference point.

q The spacing between interpolation points in the value tables may be selected as either equidistant or as non-equidistant.

Action

SSFK acts under the following preconditions.

q SSFK has been activated for the axis.

q A compensation table must be provided to the control system for the axis.

q The axis has been referenced or used as an absolute measuring system.

Activation

The SSFK is activated for the specified axis with P-AXIS-00175 in the axis parameter list [AXIS]:

Variable name | Type | Significance
lr_param.ssfk | BOOLEAN | 0: no SSFK 1: SSFK active

Example

Excerpt from axis parameter list:

:

lr_param.ssfk 1

:

General data of
SSFK-table

The general data of the list body is used to program the mode of operation of compensation, e.g. unilateral or bilateral. Adding ssfk turns the general data into kw.ssfk.* It contains following elements:

Elements of
general data

Variable name | Type | Significance
unit | BOOLEAN | Unit of the position entries 0: Encoder increments 1: Metric (in 0.1 μ m)
interval | SGN32 | Spacing between interpolation points of the compensation table if using equidistant interpolation points. If this parameter is = 0, the position of each interpolation point must be specified separately
kw_startpos | SGN32 | Start position of the compensation table
kw_nr_max | SGN32 | Number of entries in the compensation table.
bilateral | BOOLEAN | 0: Unilateral compensation 1: Bilateral compensation
modulo | BOOLEAN | Compensation is performed for a modulo axis.

Compensation values of SSFK

The compensation values are specified in the table kw.ssfk.table[i].* .

The field index i may assume values 0 to kw.ssfk.kw_nr_max  1.

The compensation values are specified as absolute position errors in the unit specified in kw.ssfk. (metric in 0.1 µm or incremental).

where : ith compensation value

ith setpoint (interpolation point in the compensation table)

ith actual value (measured with reference gauging device)

The table contains the following elements:

Compensation table

Variable name | Type | Significance
pos | SGN16 | Compensation value in the case of movement in positive direction respectively kompensation value for unilateral compensation.
neg | SGN16 | Compensation value in the case of movement in negative direction, not used for unilateral compensation.
setpoint | SGN32 | Setpoint of the axis (programmed value). Only for non-equidistant interpolation points.

If using bilateral compensation, the position errors in the case of movement in positive direction must be entered in entry pos. The specification of the interpolation points applies to both directions.

If using unilateral compensation, the position errors must also be entered in entry pos and there is no neg entry.

By contrast with specification of individual interpolation points for the compensation table, it is also possible to use a system of fixed increments. In this case, specification of the interpolation points in variable setpoint can be omitted.

In order to use a fixed interpolation point increment system, the increment of the interpolation point increment system must be specified in variable kw.ssfk.intervall. The interpolation points are then computed internally from the start position (kw.ssfk.kw_startpos) and the increment.

Special features applicable to modulo axes

If a compensation table is configured for a modulo axis (kw.ssfk.modulo = 1) , a "modulo transition" also occurs in the compensation table at the modulo transition of the axis position.

This can be used in order to compensate for position errors caused by gears or transmissions for instance.

The following special aspects must be noted:

q The position values of the first and last entry in the compensation list must be the same.

q The number of compensation values is equal to the number of entries in the compensation value table here as well.

More:

button Example - Non-equidistant, bilateral SSFK


Example - Non-equidistant, bilateral SSFK

The diagram below shows a compensation table with the characteristics:

q Non-equidistant interpolation points (kw.ssfk.interval = 0)

q Bilateral compensation table (kw.ssfk.bilateral = 1)

q Position specifications in metric system (kw.ssfk.unit = 1)

q Compensation value table with 140 entries (kw.ssfk.kw_nr_max = 140). The index of the position and setpoint entries goes from 0 to 139.

q The following values were measured at the third gauged position (table[2]).

Programmed position [image] ith setpoint | Pos measured value [image] ith actual value (pos direction) | Neg measured value [image] ith actual value (neg direction) | Computed pos compensation value | Computed neg compensation value
19866,7 μ m | 19856,5 μ m | 19874,7 μ m | -102 x 0,1 μ m | 80 x 0,1 μ m

kopf.achs_nr 2

kopf.log_achs_name Y-ACHSE

kw.ssfk.interval 0

kw.ssfk.kw_startpos -200000

kw.ssfk.kw_nr_max 140

kw.ssfk.unit 1

kw.ssfk.bilateral 1

kw.ssfk.table[0].setpoint -200000

kw.ssfk.table[1].setpoint -199306

kw.ssfk.table[2].setpoint -198667

kw.ssfk.table[3].setpoint -198001

...

kw.ssfk.table[138].setpoint 334488

kw.ssfk.table[139].setpoint 335591

kw.ssfk.table[0].pos 0

kw.ssfk.table[1].pos 24

kw.ssfk.table[2].pos -102

...

kw.ssfk.table[139].pos -55

kw.ssfk.table[0].neg 0

kw.ssfk.table[1].neg 67

kw.ssfk.table[2].neg 80

...

kw.ssfk.table[139].neg 114


Temperature compensation

More:

button General

button Parametering

button Example


General

Deformation

The change of temperature causes expansions or reductions of machine parts.

Effect

The deformation results in a shifting of axes positions. These shiftings are not detected by the installed position measuring system of the machine and they lead to inaccuracy of the manufactured work pieces.

Figure 1-7: Temperature dependend falsification of axis position

Compensation

The temperature compensation is a method to correct the reference variable of the axis dependent on the current temperature and axis position.

The correction values are calculated with following relation:

with:

Current position of the axis

Current reference temperature

Reference position of the axis

Temperature-dependent deviation at the reference position

Temperature-dependent ratio of deviation and the distance to the reference position

Figure 1-8: Parameter of the temperature compensation for a temperature T


Parametering

Activation

The temperature compensation can be switched on in the axis parameter list [AXIS] of the related axis by P-AXIS-00271:

kopf.achs_nr 1

#

# temperature compensation on/off

lr_param.temp_comp 1

Beside this for TwinCAT the compensation also can be selected via ADS-write access in the GEO task (Port 551).

TEMPC::is_active IGrp = 0x20300, IOffs = 0x10041

Effectiveness

The temperature compensation is enabled, if:

q it is activated for an axis and

q the axis is referenced.

Reference measuring

To be able to define the parameters of the temperature compensation at first a reference measuring with an external position measuring system has to be done. During this process for varying temperatures the deviations of the axis positions between internal and external measuring system are determined.

Figure 1-9: Reference measuring at varying temperatures

Determination of
parameters

The parameters reference position, shift and coefficient can be taken from the measuring curve. Out of this later on the values at a given temperature can be determined. From the measured temperature curves non-measured temperatures can be defined via inter- or extrapolation.

If the selected reference position is the virtual intersection point of the approximated linear curve, the shift depends on the temperature. In this case for the varying temperatures only the coefficient has to be adjusted new.

Influence of
temperature

The individual parameters can be adjusted by the PLC in dependence from the current temperature. For this a specific temperature signal (sensor) is transmitted to the PLC.

From this signal the PLC derives the parameters.

Changing of
parameters

Via download of the axis parameter list the individual parameters can be changed.

kopf.achs_nr 1

#

# temperature compensation on/off

lr_param.temp_comp 1

# reference position

lr_param.temp_comp_position_0 100 [0.1µm]

# reference offset

lr_param.temp_comp_offset_0 40 [0.1µm]

lr_param.temp_comp_coefficient 4000 [µm/m]

#

Beside the download there also exist a read/ write manipulation for parameters via direct ADS access in the GEO task (Port 551). For example, the first axis can be adressed via following index group and index offset:

TEMPC::is_active IGrp = 0x20300, IOffs = 0x10041

TEMPC::coefficient IGrp = 0x20300, IOffs = 0x10043

TEMPC::offset_0 IGrp = 0x20300, IOffs = 0x10044

TEMPC::position_0 IGrp = 0x20300, IOffs = 0x10045

Figure 1-10: ADS access via browser on parameters of temperature compensation

Monitoring

Distribution of
compensation values

For every interpolation cycle the compensation values are re-calculated. If the change per cycle exceeds the given maximum axis acceleration, this change can be output via a filter in several cycles.

For this in the axis paramer list the number of cycles of the sin²- filter can be set. Per default the value is one cycle.

kopf.achs_nr 1

#

# Number of cycles of the sin²-filter

lr_param.temp_comp_n_cycles 20

Figure 1-11: Distribution of the compensation values over 20 cycles with a sin²- filter during a short deselection of the temperature compensation

Display of
compensation

Beside the download there also exist a read/ write manipulation for parameters via direct ADS access in the GEO task (Port 551). For example, the first axis can be adressed via following index group and index offset:

TEMPC::is_active IGrp = 0x20300, IOffs = 0x10041

TEMPC::actual_offset IGrp = 0x20300, Ioffs = 0x10042

Display of
axis position

During active temperature compensation the normal command positions and current positions of the axis are displayed without any manipulation.

The compansations are considered first before the output on the drive bus. So they can be checked in the position values of the drive bus (dig_cmd_pos, dig_act_pos).


Example

Initialization

The compensation for the X-axis is activated by the following settings:

lr_param.temp_comp 1

lr_param.temp_comp_position_0 100 [0.1µm]

lr_param.temp_comp_offset_0 40 [0.1µm]

lr_param.temp_comp_coefficient 4000 [µm/m]

lr_param.temp_comp_n_cycles 20

NC program

For the test the following NC program was used:

N10: G90 G01 X0 F1000

G04 1

N10 X100

G04 1

N10 X80

G04 1

N10 X50

G04 1

N20 X-200

G04 1

$GOTO N10

M30

Figure 1-12: Recorded compensation values in dependence on the axis position.


Selection/deselection of axis compensations in NC program

TwinCat CNC: from V263.1501

Others: from V260

Selection/deselection
in NC program

The several axis compensations also can be selected and deselected directly by a command in the NC program. Following the axis specific syntax of positioning axis 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