Error message
Administration errors | If an error occurs, the CNC issues an error message and current execution of the CNC channel is cancelled. |
292019 | Requested kinematic transformation has not been configured. |
292020 | Insufficient memory for management of kinematic transformation. |
292021 | Given channel number is not known. |
292022 | Interface to kinematic transformation has not been configured. |
292023 | Backward transformation after forward transformation results in different position. |
292030 | Error when requesting configuration data of kinematic transformation. |
292031 | Error during initialisation of kinematic transformation. |
292032 | Error in the kinematic forward transformation. |
292033 | Error in the kinematic backward transformation. |
292034 | Current MCS input position of the kinematic forward transformation. |
292035 | Current PCS output position of the kinematic forward transformation. |
292036 | Current PCS input position of the kinematic backward transformation. |
292037 | Current MCS output position of the kinematic forward transformation. |
292044 | CNC interface version is too old. Incompatible with the current TcCOM object. |
292045 | Selected orientation mode or rotation sequence unsupported 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: trafo_test
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 500 [-]
Value_2: Error value is 1005 [-]
------------- end of error message -----------------------
User-specific transformation errors
Besides the standard transformation errors, the user can issue user-defined errors for some methods (e.g. error ID 123) by using the function return value (0 = OK).
HRESULT CTrafo::Forward(PTcNcTrafoParameter p)
{
if (…)
return 123; // raise error
…
return S_OK;
}
Error messages in TcCncUsersEvents.xml
In the event of an error, the user-defined return value of the method can be transferred to the error message evaluation via the PLC or the TwinCAT Event Logger, (see also FCT-M7// TwinCAT3 error output). 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.
Direct output of user-specific transformation error messages
As of CNC Build V3.1.3081.4 or V3.1.3110 user-specific error messages of the user-specific transformation can be output directly. The error range ID 500000 to ID 500999 is provided for this purpose.
The process is as follows:
- Return error value from transformation in the provided range
- Integrate the corresponding error text in the TcCncUsersEvents.xml file, see code example above.
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 in the kinematic backward transformation
------------------------------------------------------------------
Program : trafo_test
Path : D:\TwinCAT3\ (No: 65535)
File : _trafo-error-test.nc
Block no: N60 Fileoffset: 151
Line : N060 Y42 ; util_error_Id = -12
------------------------------------------------------------------
Channel : (No.: 1)
Value : 500
Class : ERROR (5) Reaction : PROGRAM_ABORT (2)
==================================================================
Value 1 : Actual value : 500
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 PCS output position of the kinematic forward transformation.
------------------------------------------------------------------
Program : trafo_test
Path : D:\TwinCAT3\ (No: 65535)
File : _trafo-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 resp. ░]
Value 2 : Actual value : 0 / 0 / 0 [0.1*10^-3 mm resp. ░]
Value 3 : Actual value : 0 / 0 / 0 [0.1*10^-3 mm resp. ░]
Value 4 : Actual value : 0 / 0 / 0 [0.1*10^-3 mm resp. ░]
Value 5 : Actual value : 0 / 0 / 0 [0.1*10^-3 mm resp. ░]
------------------------------------------------------------------
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)