Overview of all compensation parameters

Parameters in italics at the moment are not used or are not available.

ID | Structure | Parameter | Functionality
P-COMP-00001 |  | kopf. | achs_nr | List header
P-COMP-00002 | kopf. | log_achs_name | List header
P-COMP-00003 | kw.crosscomp. | unit | Cross compensation
P-COMP-00004 | kw.crosscomp. | last_index | Cross compensation
P-COMP-00005 | kw.crosscomp. | master_ax_nr | Cross compensation
P-COMP-00006 |  | kw.crosscomp.table[i]. | setpoint | Cross compensation
P-COMP-00007 | kw.crosscomp.table[i]. | correction | Cross compensation
P-COMP-00008 | kw.crosscomp2. | unit | Plane compensation
P-COMP-00009 | kw.crosscomp2. | interval | Plane compensation
P-COMP-00010 | kw.crosscomp2. | last_index_master1 | Plane compensation
P-COMP-00011 | kw.crosscomp2. | last_index_master2 | Plane compensation
P-COMP-00012 |  | kw.crosscomp2. | start_position_master1 | Plane compensation
P-COMP-00013 | kw.crosscomp2. | start_position_master2 | Plane compensation
P-COMP-00014 | kw.crosscomp2. | master1_ax_nr | Plane compensation
P-COMP-00015 | kw.crosscomp2. | master2_ax_nr | Plane compensation
P-COMP-00016 | kw.crosscomp2.table[i][j]. | correction | Plane compensation
P-COMP-00017 | kw.ssfk. | unit | Leadscrew error compensation
P-COMP-00018 | kw.ssfk. | interval | Leadscrew error compensation
P-COMP-00019 |  | kw.ssfk. | kw_startpos | Leadscrew error compensation
P-COMP-00020 | kw.ssfk. | kw_nr_max | Leadscrew error compensation
P-COMP-00021 | kw.ssfk. | bilateral | Leadscrew error compensation
P-COMP-00022 | kw.ssfk. | modulo | Leadscrew error compensation
P-COMP-00023 | kw.ssfk.table[i]. | pos | Leadscrew error compensation
P-COMP-00024 | kw.ssfk.table[i]. | neg | Leadscrew error compensation
P-COMP-00025 | kw.ssfk.table[i]. | setpoint | Leadscrew error compensation
P-COMP-00026 | kw.crosscomp. | n_cycles | Cross compensation
P-COMP-00027 | kw.crosscomp2. | n_cycles | Plane compensation


Classification of compensation data

The data for the compensation processes

q Cross compensation,

q Plane compensation and

q Leadscrew error compensation

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

Some specific entries must be present in the startup description in order to announce the compensation table to the control system [STUP].

Figure 1-1: Assignment of compensation data to the logical axes

In the moment only axis configurations with one axis group are possible [CHAN]. Therefore "dec_achs_nr" = "achsen_idx".

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.

The basic axes configuration of the NC-channel is defined in the channel parameter list [CHAN].

The activation of a compensation is set in the corresponding axis parameter list [AXIS] (P-AXIS-00047, P-AXIS-00174, P-AXIS-00175).


Syntax, interpretation and testing of compensation data-ASCII files

The compensation data are defined in an ASCII-file and interpreted by an ASCII interpreter and stored in the appropriate structures.

After that plausibility tests are carried out for the compensation data.

This document defines the content and the syntax of the ASCII-Files (for example "achskw1.lis") as well as the elements of the compensation data.

For compensation data of data type BOOLEAN, the following agreement is used:

Value | Significance
0 | Definition of FALSE
1 | Definition of TRUE


Comments in the compensation data ASCII file

Comments can be whole-lined or can be added at the end of a line.

In the case of whole-lined comments, at the beginning of the line the comment character “#” must be added followed by a space character.

If at the end of a line a comment is to be added, then in front of the comment, at least one space character must be there. If, however, in the line a string is defined, then the comment character “(“ must precede the comment.

Blank lines are also possible.

Example:

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

# Data

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

#

# Listing

dummy[1] 1 Comment

dummy[2] 1 # Comment

dummy[3] 1 ( Comment

dummy[4] 1 /* Comment

...

...

example[0].name STRING_2 (Comment, here comment brackets necessary !)


The compensation list header (kopf.*)

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

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

More:

button Logical axis number (P-COMP-00001)

button Axis name (P-COMP-00002)


Logical axis number (P-COMP-00001)

The logical axis number is a system-wide distinctive, identification characteristic for every axis. With P-COMP-00001 the assigment of the compensation list to the responding logial axis is done.

Variable name | Type | Permissible range | Axis type | Dimension
achs_nr | UNS16 | 0 < achs_nr < MAX(UNS16) | T, R | ----

It is not allowed to use the same logical axis number more than once. The logical number "0" is not permitted.


Axis name (P-COMP-00002)

This string is the axis name of the axis; is used only for diagnostic purposes.

Variable name | Type | Permissible range | Dimension
log_achs_name | ACHS_NAME | String | ----

Variable name | Type | Index | Dimension
zeichen[m] | SGN08 | m = 0 ... [ACHS_NAME_LAENGE - 1] | ----

Value ACHS_NAME_LAENGE | Significance
application-dependent | Maximum length of axis designation


General compensation data (kw.*)

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.

More:

button Cross compensation (kw.crosscomp.*)

button Plane compensation (kw.crosscomp2.*)

button Leadscrew error compensation (kw.ssfk.*)


Cross compensation (kw.crosscomp.*)

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

The data for the cross compensation have to be defined in the correction list of the master axis. The general data of the list body are entered into the structure kw.crosscomp.*. It contains following elements.

More:

button Unit of the position entries (P-COMP-00003)

button Last index of compensation table (P-COMP-00004)

button Logical axis number of the master axis (P-COMP-00005)

button Number of cycles for smooth switching (P-COMP-00026)

button Table of the compensation values (kw.crosscomp.table[i].*)

button Example for a compensation list


Unit of the position entries (P-COMP-00003)

The parameter "kw.crosscomp.unit" defines the unit of the position entries of the compensation values.

Variable name | Type | Permissible range | Axis type | Dimension
unit | BOOLEAN | 0 = Encoder increments 1 = Metric (in 0,1 µm) | T | ----


Last index of compensation table (P-COMP-00004)

With "kw.crosscomp.last_index" the last valid index in the correction table of the master axis (maximum 1000 values) is determined. The table always starts with index 0.

Variable name | Type | Permissible range | Axis type | Dimension
last_index | SGN32 | 0 < last_index < 1000 | T | ----


Logical axis number of the master axis (P-COMP-00005)

The parameter "kw.crosscomp.master_ax_nr" determines the logical number of the master axis which command position is used to calculate the correction values for the slave axis.

Variable name | Type | Permissible range | Axis type | Dimension
master_ax_nr | UNS16 | 1 < master _ax_nr < MAX (UNS16) | T | ----


Number of cycles for smooth switching (P-COMP-00026)

The parameter "kw.crosscomp.n_cycles" determines the number of cycles, over which the cross compensation shall be turned on / off in a smooth way.

Variable name | Type | Permissible range | Axis type | Dimension
n_cycles | UNS16 | 0 < n_cycles < MAX_CROSSCOMP_CYC | T | ----

Value MAX_CROSSCOMP_CYC | Significance
application-dependend | Maximum number of cycles, over which the cross compensation shall be turned on / off


Table of the compensation values (kw.crosscomp.table[i].*)

For each interpolation point (maximum 1000 values) 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. It contains following elements.

More:

button Interpolation point of the master axis (P-COMP-00006)

button Compensation values for the slave axis (P-COMP-00007)


Interpolation point of the master axis (P-COMP-00006)

The parameter "kw.crosscomp.table[i].setpoint" determines the absolute command positions of the master axis on which the slave axis has to be corrected.

Variable name | Type | Permissible range | Axis type | Dimension
setpoint | SGN32 | MIN(SGN32) < setpoint < MAX(SGN32) | T | 0,1µm or increments


Compensation values for the slave axis (P-COMP-00007)

The parameter "kw.crosscomp.table[i].correction" determines the relative compensation value for the slave axis at interpolation point i.

Variable name | Type | Permissible range | Axis type | Dimension
correction | SGN32 | MIN(SGN32) < correction < MAX(SGN32) | T | 0,1µm or increments


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 10

#

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 (kw.crosscomp2.*)

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.

The data for the plane compensation has to be defined in the correction list of the slave axis. The general data of the list body are entered into the structure kw.crosscomp2.*. It contains following elements.

More:

button Unit of the length/position entries (P-COMP-00008)

button Distance between interpolation points (P-COMP-00009)

button Last index of master axis 1 (P-COMP-00010)

button Last index of master axis 2 (P-COMP-00011)

button Start position of master axis 1 (P-COMP-00012)

button Start position of master axis 2 (P-COMP-00013)

button Logical axis number of master axis 1 (P-COMP-00014)

button Logical axis number of master axis 2 (P-COMP-00015)

button Number of cycles for smooth switching (P-COMP-00027)

button Table of the compensation values (kw.crosscomp2.table[j][i].*)

button Example for a compensation list


Unit of the length/position entries (P-COMP-00008)

The parameter "kw.crosscomp2.unit" defines the unit of the length/ position entries of the compensation values.

Variable name | Type | Permissible range | Axis type | Dimension
unit | BOOLEAN | 0 = Encoder increments 1 = Metric (in 0,1 µm) | T | ----


Distance between interpolation points (P-COMP-00009)

With "kw.crosscomp2.interval" the distance between two interpolation points is defined.

Variable name | Type | Permissible range | Axis type | Dimension
interval | UNS32 | 0 < interval < MAX(UNS32) | T | 0,1µm or increments


Last index of master axis 1 (P-COMP-00010)

The parameter "kw.crosscomp2.last_index_master1" determines the last valid index in the table of master axis 1 (maximum value is 100). The table starts with index 0.

Variable name | Type | Permissible range | Axis type | Dimension
last_index_master1 | SGN32 | 0 < last_index_master1 < 100 | T | ----


Last index of master axis 2 (P-COMP-00011)

The parameter "kw.crosscomp2.last_index_master2" determines the last valid index in the table of master axis 2 (maximum value is 100). The table starts with index 0.

Variable name | Type | Permissible range | Axis type | Dimension
last_index_master2 | SGN32 | 0 < last_index_master2 < 100 | T | ----


Start position of master axis 1 (P-COMP-00012)

The parameter "kw.crosscomp2.start_position_master1" determines the start position in the compensation table for master axis 1.

Variable name | Type | Permissible range | Axis type | Dimension
start_position_master1 | SGN32 | MIN(SGN32) < start_position_master1< MAX(SGN32) | T | 0,1µm or incr.


Start position of master axis 2 (P-COMP-00013)

The parameter "kw.crosscomp2.start_position_master2" determines the start position in the compensation table for master axis 2.

Variable name | Type | Permissible range | Axis type | Dimension
start_position_master2 | SGN32 | MIN(SGN32) < start_position_master2< MAX(SGN32) | T | 0,1µm or incr.


Logical axis number of master axis 1 (P-COMP-00014)

With "kw.crosscomp2.master1_ax_nr" the logical axis number of master axis 1 is determined.

Variable name | Type |  | Permissible range | Axis type | Dimension
master1_ax_nr |  | UNS16 | 1 < master1_ax_nr < MAX (UNS16) | T | ----


Logical axis number of master axis 2 (P-COMP-00015)

With "kw.crosscomp2.master2_ax_nr" the logical axis number of master axis 2 is determined.

Variable name | Type |  | Permissible range | Axis type | Dimension
master2_ax_nr |  | UNS16 | 1 < master2_ax_nr < MAX (UNS16) | T | ----


Number of cycles for smooth switching (P-COMP-00027)

The parameter "kw.crosscomp2.n_cycles" determines the number of cycles, over which the plane compensation is turned on / off in a smooth way.

Variable name | Type | Permissible range | Axis type | Dimension
n_cycles | UNS16 | 0 < n_cycles < MAX_CROSSCOMP2_CYC | T | ----

Value MAX_CROSSCOMP2_CYC | Significance
application-dependend | Maximum number of cycles, over which the cross compensation is turned on / off.


Table of the compensation values (kw.crosscomp2.table[j][i].*)

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

More:

button Compensation values for the slave axis (P-COMP-00016)


Compensation values for the slave axis (P-COMP-00016)

With the parameter "kw.crosscomp2.table[j][i].correction" the compensation value of the slave axis at interpolation point [j][i] is defined. In the indexing of the interpolation points in the compensation list, the first index j refers to the second master axis.

Variable name | Type | Permissible range | Axis type | Dimension
correction | SGN32 | MIN(SGN32) < correction < MAX(SGN32) | T | 0,1µm or increments


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.n_cycles 10

kw.crosscomp2.master1_ax_nr 1

kw.crosscomp2.master2_ax_nr 2

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[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


Leadscrew error compensation (kw.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 SSFK data are stored in the corresponding compensation value list for each axis.

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

More:

button Unit of the length/position entries (P-COMP-00017)

button Distance between interpolation points (P-COMP-00018)

button Start position of compensation values (P-COMP-00019)

button Number of compensation values (P-COMP-00020)

button Mode of compensation (P-COMP-00021)

button Compensation of a modulo axis (P-COMP-00022)

button Table of the compensation values (kw.ssfk.table[i].*)

button Example for a compensation list


Unit of the length/position entries (P-COMP-00017)

The parameter "kw.ssfk.unit" defines the unit of the length/ position entries of the compensation values.

Variable name | Type | Permissible range | Axis type | Dimension
unit | BOOLEAN | 0 = Encoder increments 1 = Metric (in 0,1 µm) | T | ----


Distance between interpolation points (P-COMP-00018)

With "kw.ssfk.interval" the spacing between interpolation points of the compensation table if using equidistant interpolation points is defined. If this parameter is = 0, the position of each interpolation point must be specified separately.

Variable name | Type | Permissible range | Axis type | Dimension
interval | SGN32 | 0 < interval < MAX(SGN32) | T | 0,1µm or increments


Start position of compensation values (P-COMP-00019)

The parameter "kw.ssfk.kw_startpos" determines the start position of the compensation table.

Variable name | Type | Permissible range | Axis type | Dimension
kw_startpos | SGN32 | MIN(SGN32) < kw_startpos < MAX(SGN32) | T | 0,1µm or incr.


Number of compensation values (P-COMP-00020)

With "kw.ssfk.kw_nr_max" the number of entries in the compensation table is defined.

Variable name | Type | Permissible range | Axis type | Dimension
kw_nr_max | SGN32 | 0 < kw_nr_max < MAX(SGN32) | T | ----


Mode of compensation (P-COMP-00021)

The parameter "kw.ssfk.bilateral" defines, if the compensation effects unilateral or bilateral.

Variable name | Type | Permissible range | Axis type | Dimension
bilateral | BOOLEAN | 0 = unilateral c ompensation 1 = bilateral c ompensation | T | ----


Compensation of a modulo axis (P-COMP-00022)

With "kw.ssfk.modulo" the compensation table for a modulo axis is defined. Here a "modulo transition" also occurs in the compensation table at the modulo transition of the axis position.

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.

Variable name | Type | Permissible range | Axis type | Dimension
modulo | BOOLEAN | 0 = C ompensation without modulo handling 1 = Compensation for a modulo axis | T | ----


Table of the compensation values (kw.ssfk.table[i].*)

The compensation values are specified in the table "kw.ssfk.table[i].*".The field index i may assume a number defined by P-COMP-00020 of values. The compensation values are specified as absolute position errors in the unit specified in P-COMP-00017.

The table of the compensation values contains the following elements.

More:

button Compensation value in positive direction (P-COMP-00023)

button Compensation value in negative direction (P-COMP-00024)

button Interpolation points of the axis (P-COMP-00025)


Compensation value in positive direction (P-COMP-00023)

The parameter "kw.ssfk.table[i].pos" defines a compensation value in case of movement in positive direction at interpolation point i.

Variable name | Type | Permissible range | Axis type | Dimension
pos | SGN16 | MIN(SGN16) < pos < MAX(SGN16) | T | 0,1µm or incr.


Compensation value in negative direction (P-COMP-00024)

The parameter "kw.ssfk.table[i].neg" defines a compensation value in case of movement in negative direction at interpolation point i.

Variable name | Type | Permissible range | Axis type | Dimension
neg | SGN16 | MIN(SGN16) < neg < MAX(SGN16) | T | 0,1µm or incr.


Interpolation points of the axis (P-COMP-00025)

The parameter "kw.ssfk.table[i].setpoint " determines the interpolation points of the axis on which the axis has to be corrected.

Variable name | Type | Permissible range | Axis type | Dimension
setpoint | SGN32 | MIN(SGN32) < setpoint < MAX(SGN32) | T | 0,1µm or incr.


Example for a compensation list

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.log_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