Instance data of the compensation

Working data of the compensation

Implementation of the compensation can provide any parameters as working data. The compensation is always invoked cyclically in the position controller as long as the compensation is enabled.

The data provided by the CNC in cyclic operation are the axis positions and the software limit switches of the axes.

TcMcComBase – structure to transfer error information

In the event of an error this structure can be filled to output compensation error information via the CNC.

It forms the basis for the structures

TcMcComExtCompParameter

and

TcMcComCmdParameter:

The data provided by the CNC in cyclic operation are the axis positions and the software limit switches of the axes.

struct TcMcComBase

{

double ret_value1; // out: additional error value

double ret_value2; // out: additional error value

char ret_text[24]; // out: additional error text, max. 24 bytes

};

TcMcComExtCompParameter – structure for cyclic exchange

Axis positions are provided in the array cyclic_i of length dim_cyclic_i in unit 10^-8 mm or °. The calculated offset is expected in the array cyclic_o in the same unit.

The array parameter contains the software limit switches of all axes. The order is then [A1 swe pos, A1 swe neg, A2 swe pos, …].

struct TcMcComExtCompParameter : public TcMcComBase

{

eMcComExtCompParameter type;

signed __int64* cyclic_i;

long dim_cyclic_i;

signed __int64* cyclic_o;

long dim_cyclic_o;

signed __int64* parameters;

long dim_parameters;

};

TcMcComCmdParameter – structure to transfer NC messages

The NC command #EXTCOMP ON/OFF [ID<0> STRING=<string> VALUE= <value>] sends a string consisting of 24 characters and a double value to the compensation.

struct TcMcComCmdParameter : public TcMcComBase

{

char para_string[24];

double para_value;

};