Error Codes SerialLineControlADS
Overview
Offset + error code | Range | Description |
|---|---|---|
0x00000000 + TwinCAT System Error | 0x00000000-0x00007800 | TwinCAT system error (including ADS error codes) |
0x00000000 + TcAdsSerialCommServer error | 0x00009000-0x000091FF | Error in the TwinCAT ADS Serial Comm Server |
0x3D090000 + Win32 System Error Code | 0x3D090000-0x3D09FFFF | Win32 system error |
0x7A120000 + FreeBSD®/Linux® system error | 0x7A120000-0x7A12FFFF | FreeBSD®/Linux® system error |
Error codes of the type ComError_t are not used by this function block.
![]() | Debugging For more detailed error analysis additional debug outputs can be configured in the TcAdsSerialCommServer. Use the variable TraceLevel in the input structure SerialCfg for this purpose. |
Additional information on the most important TwinCAT system errors
Code | Code | Description | Additional information |
|---|---|---|---|
0x00000006 | 6 | The system cannot find the destination port. ADS Server may not have started. | The TwinCAT function, including ADS server, must be installed on the system on which the virtual COM port is located. |
TcAdsSerialCommServer error
Code | Code | Description | Symbolic name |
|---|---|---|---|
0x00009001 | 36865 | The specified COM port is invalid. | COMERRORADS_INVALID_COMPORT |
0x00009002 | 36866 | The command for the TcAdsSerialCommServer is invalid. | COMERRORADS_INVALID_CMD |
0x00009003 | 36867 | Internal error | COMERRORADS_INVALID_DATAPOINTER |
0x00009011 | 36881 | The parameter structure passed is unknown to the TcAdsSerialCommServer. | COMERRORADS_INVALID_CFGSTLEN |
0x00009012 | 36882 | The parameter structure passed is unknown to the TcAdsSerialCommServer. | COMERRORADS_INVALID_CFGSTVER |
0x00009013 | 36883 | The trace level (variable TraceLevel in the input structure SerialCfg) for the output of messages is invalid. | COMERRORADS_INVALID_TL |
0x00009021 | 36897 | The specified baud rate is not supported. | COMERRORADS_INVALID_BAUDRATE |
0x00009022 | 36898 | The specified parity is invalid. | COMERRORADS_INVALID_PARITY |
0x00009023 | 36899 | The specified number of data bits is invalid. | COMERRORADS_INVALID_BYTESIZE |
0x00009024 | 36900 | The specified number of stop bits is invalid. | COMERRORADS_INVALID_STOPBIT |
0x00009025 | 36901 | Dtr control is invalid. | COMERRORADS_INVALID_DTR_CTRL |
0x00009026 | 36902 | Rts control is invalid. | COMERRORADS_INVALID_RTS_CTRL |
0x00009027 | 36903 | Cts is invalid | COMERRORADS_INVALID_CTS_OUTCTRL |
0x00009028 | 36904 | Dsr is invalid | COMERRORADS_INVALID_DSR_OUTCTRL |
0x00009029 | 36905 | Dsr is invalid | COMERRORADS_INVALID_DSR_SENS |
0x00009031 | 36913 | Internal error | COMERRORADS_NOT_INIT |
0x00009032 | 36914 | The receive buffer in the TcAdsSerialCommServer has overflowed. Incoming data is lost. Received data must be queried immediately. It must be ensured that no data accumulates in the PLC function block SerialLineControlADS. This can be monitored with the output RxBufCount. With a stable communication connection, this value does not rise above 1000. | COMERRORADS_RD_BUFFER_OVERRUN |
0x00009033 | 36915 | The COM port is already open. | COMERRORADS_PORT_CONNECTED |
0x00009034 | 36916 | Interaction with the COM port is not possible because the COM port has not yet been opened by the TcAdsSerialCommServer. | COMERRORADS_PORT_NOT_CONNECTED |
0x00009035 | 36917 | The COM port could not be closed correctly. | COMERRORADS_RD_THREAD_TIMEOUT |
0x00009036 | 36918 | The COM port could not be closed correctly. | COMERRORADS_WR_THREAD_TIMEOUT |
0x00009037 | 36919 | During an existing communication connection, this error may occur if the USB device is disconnected. Before disconnecting the USB device the input bConnect must be set to FALSE and thus the COM port is closed. SerialLineControlADS has closed the port and will automatically try to reopen it with the specified parameters. If no errors are present at the output in the following cycles and the output PortOpened = TRUE, an opening of the COM port has been successfully completed. | COMERRORADS_RD_FAILURE |
0x00009038 | 36920 | A write error can be the trigger for this error code. Details can be output with the help of the variable TraceLevel in the input structure SerialCfg. | COMERRORADS_WR_FAILURE |
0x000090E0 | 37088 | Internal errors |
|
0x00009101 | 37121 | The version of the TcAdsSerialCommServer is incompatible. An official product installation fixes the error. | COMERRORADS_SERVER_INCOMPATIBLE |
Additional information on the most important Win32 system errors
Code | Code | Description | Additional information | Symbolic name |
|---|---|---|---|---|
0x3D090002 | 1024000002 | The system cannot find the specified file. | This error can occur if the specified COM port is not available. Make sure the value for the COM port and the other parameters in ComSerialConfig are specified correctly. | ERROR_FILE_NOT_FOUND |
0x3D090005 | 1024000005 | Access is denied. | Check whether the respective serial COM port was already occupied/opened by another program. In this case you have to enable the port from the other program, in order to enable communication. | ERROR_ACCESS_DENIED |
0x3D090057 | 1024000087 | The parameter is incorrect. | This error occurs if an input parameter for serial data transmission is invalid (see ComSerialConfig). Not all parameter settings for serial data transmission may be available in all cases. Some settings or combinations are not supported by Windows or the COM port drivers. In this case you should check whether the communication works with a different parameter setting. | ERROR_INVALID_PARAMETER |
Additional information on the most important FreeBSD® system errors and Beckhoff RT Linux® system errors
Code | Code | Description | Additional information |
|---|---|---|---|
0x7A120002 | 2048000002 | The system cannot find the specified file. | This error can occur if the specified COM port is not available. Make sure the value for the COM port and the other parameters in ComSerialConfig are specified correctly. |
0x7A120005 | 2048000005 | An input/output error has occurred. | This error can occur if the specified COM port is already in use by another app. |
Requirements
|
Development environment |
Target platform |
PLC libraries to include |
|---|---|---|
|
TwinCAT v3.1.4016 |
PC or CX (x86, x64) |
Tc2_SerialCom |
