# Error message

Administration errors | If an error occurs, the CNC issues an error message and current execution of the CNC channel is cancelled.
292019 | Programmed transformation is not loaded, i.e. possibly not configured in TwinCAT
292020 | Not enough memory for transformation (system error)
292021 | Transfer unknown channel number internally (system error)
292022 | Programmed transformation is unknown internally (loaded), i.e. possibly not configured correctly in TwinCAT
292023 | The backward transformation is not inverse to the forward transformation.
292030 | Error on request of configuration data of kinematic transformation (see GetDimension())
292031 | Error on initialisation of kinematic transformation (see TrafoSupported()).
292032 | Error of the kinematic forward-transformation (see Forward()).
292033 | Error of the kinematic backward-transformation (see Backward()).
292034 | Current MCS-input position of the kinematic forward-transformation.
292035 | Current WPCS-output position of the kinematic forward-transformation.
292036 | Current WPCS-input position of the kinematic backward-transformation.
292037 | Current MCS-output position of the kinematic forward-transformation.
292044 | The transformation interface of the CNC is too old and does not match the TcCOM object.
292045 | The orientation type selected is not supported by the transformation.

## Example

Example of default error: Logging in diagnostic data

(Date/Time): 07.09.2012 / 11:37:38

Version: V3.00.3012.04 Module: DECU_TRF.C Cycle: 3108

------------------------------------------------------------

ERRTXT: Backward transformation after forward transformation results in different position.

------------------------------------------------------------

Error ID : 292023 BF type : 9 Channel ID : 1

Multiple ID : 1 Line : 2213 Commu ID : 42

Recovery class: 2 Reaction class: 2 Body type: 1

NC file : log. path no. 65535 -> D:\TwinCAT3\test.nc

NC program: trafo65test

NC prog. info:

Block number : 20 File offset: 55 Block offset: 14

--------------------- NC_block ------------------------------

Output not possible! log_pfad_nr not in assignment table.

Value_1: Current value is 65 [-]

Value_2: Error value is 1005 [-]

------------- end of error message -----------------------

## User-specific transformation errors

Besides the standard transformation errors, you can issue user-defined errors by using the function return value (0 = OK) with several methods (see italics, bold error IDs).

HRESULT CTrafo::Forward(PTcNcTrafoParameter p)

{

if (…)

return 123; // raise error

…

return S_OK;

}

## Error messages in TcCncUsersEvents.xml

In the event of an error (bold, italic IDs), the user-defined return value of the method can be transferred to the error message evaluation via the PLC (ChannelError()-Manager). The error texts are supplemented accordingly in the XML error text file for each language (C:\TwinCAT\3.1\Target\Resource):

<Event>

<Id>123</Id>

<Message LcId="1033">Kinematic transformation reports error 123</Message>

<Message LcId="1031">Kinematic transformation reports error 123</Message>

</Event>

The error is output by the Event Logger.

## Extended error return values

If the extended transformation parameter TcNcTrafoParameterExtCnc is used, additional error values may be returned in the event of an error. These values are displayed in the error message.

double ret_value1; // out: error value

double ret_value2; // out: error value

char ret_text[24]; // out: additional error info

## Example

User-specific errors

<<----------------------------------------------------------------

20.06.2013 16:31:06:019 (11862) Version: V3.00.3017.00

------------------------------------------------------------------

Error : 292033 - Error on kinematic backward transformation

------------------------------------------------------------------

Program : trafo65test

Path : D:\TwinCAT3\ (No: 65535)

File : _trafo65-error-test.nc

Block no: N60 Fileoffset: 151

Line : N060 Y42 ; util_error_Id = -12

------------------------------------------------------------------

Channel : (No.: 1)

Value : 65

Class : ERROR (5) Reaction : PROGRAM_ABORT (2)

==================================================================

Value 1 : Actual value : 65

Value 2 : Actual value : 0

Value 3 : Actual value :

------------------------------------------------------------------

Utility : Error 123 - …

Module : Line : 0

------------------------------------------------------------------

Config : ONE_CHANNEL_CONFIGURATION / ...

Module : BAVO_5AX.C Line : 6438

BF-Type : BAVO (5) Commu: BAVO_1 (44) Multiple ID: 0

Content : NC_PROGRAM (1)

------------------------------------------------------------------

<<----------------------------------------------------------------20.06.2013 16:31:06:019 (11862) Version: V3.00.3017.00

------------------------------------------------------------------

Error : 292036 - Current WPCS output position of the kinematic forward transformation.

------------------------------------------------------------------

Program : trafo65test

Path : D:\TwinCAT3\ (No: 65535)

File : _trafo65-error-test.nc

Block no: N60 Fileoffset: 151

Line : N060 Y42 ; util_error_Id = -12

------------------------------------------------------------------

Channel : (No.: 1)

Value : 000 [mm]

Class : WARNING (0) Reaction : PROGRAM_ABORT (2)

==================================================================

Value 1 : Actual value : 0 / 1.05E+005 / 0 [0.1*10^-3 mm or ░]

Value 2 : Actual value : 0 / 0 / 0 [0.1*10^-3 mm or ░]

Value 3 : Actual value : 0 / 0 / 0 [0.1*10^-3 mm or ░]

Value 4 : Actual value : 0 / 0 / 0 [0.1*10^-3 mm or ░]

Value 5 : Actual value : 0 / 0 / 0 [0.1*10^-3 mm or ░]

------------------------------------------------------------------

Config : ONE_CHANNEL_CONFIGURATION / ...

Module : BAVO_5AX.C Line : 6438

BF-Type : BAVO (5) Commu: BAVO_1 (44) Multiple ID: 2

Content : NC_PROGRAM (1)