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 system error

0x7A120000-0x7A12FFFF

FreeBSD system error

Error codes of the type ComError_t are not used by this function block.

Error Codes SerialLineControlADS 1:

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
(hex)

Code
(dec)

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 errors

Code
(hex)

Code
(dec)

Description

Symbolic name

0x00009001

36865

COM Port is invalid.
valid range: 1 .. 255

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 transferred parameter structure is unknown.

COMERRORADS_INVALID_CFGSTLEN

0x00009012

36882

The transferred parameter structure is unknown.

COMERRORADS_INVALID_CFGSTVER

0x00009013

36883

The trace level (variable TraceLevel in input structure SerialCfg) for message output is invalid.

COMERRORADS_INVALID_TL

0x00009021

36897

Baud rate is not supported.

COMERRORADS_INVALID_BAUDRATE

0x00009022

36898

Parity is invalid.

COMERRORADS_INVALID_PARITY

0x00009023

36899

Number of data bits is invalid.

COMERRORADS_INVALID_BYTESIZE

0x00009024

36900

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 is overrun. Incoming data will be lost.

Received data has to be retrieved immediately. It has to be ensured by the application that no data accumulate in the function block SerialLineControlADS. This can be observed with the output RxBufCount . At a stable communication connection this value do not exceed 1000.

COMERRORADS_RD_BUFFER_OVERRUN

0x00009033

36915

The COM Port is already open.
SerialLineControlADS will automatically try to close the port and reopen it again with the input parameters. If there is no error output for the next cycles and if the output PortOpened gets TRUE, the COM Port has successfully be opened.

COMERRORADS_PORT_CONNECTED

0x00009034

36916

The COM Port is not yet opend by the TcAdsSerialCommServer. The interaction with the port was not possible.
SerialLineControlADS will automatically try to reopen the port again with the input parameters. If there is no error output for the next cycles and if the output PortOpened gets TRUE, the COM Port has successfully be opened.

COMERRORADS_PORT_NOT_CONNECTED

0x00009035

36917

The COM Port couldn't be closed correctly.

COMERRORADS_RD_THREAD_TIMEOUT

0x00009036

36918

The COM Port couldn't be closed correctly.

COMERRORADS_WR_THREAD_TIMEOUT

0x00009037

36919

During an existing communication connection this error can occur if the USB device is disconnected. Before disconnecting the USB device the input bConnect has to be set to FALSE in order to close the COM Port.
Also a read error can be the reason. Details can be output using the variable TraceLevel in the input structure SerialCfg.

SerialLineControlADS has closed the port and will automatically try to reopen it again with the input parameters. If there is no error output for the next cycles and if the output PortOpened gets TRUE, the COM Port has successfully be opened.

COMERRORADS_RD_FAILURE

0x00009038

36920

A write error can be the reason for this error code. Details can be output using the variable TraceLevel in the input structure SerialCfg.
It's possible that data is not transferred. No retry of writing is started automatically.

COMERRORADS_WR_FAILURE

0x000090E0
-
0x000090FF

37088
-
37119

internal errors

 

0x00009101

37121

The version of the TcAdsSerialCommServer is incompatible. An official product installation clears the error.

COMERRORADS_SERVER_INCOMPATIBLE

Additional information regarding the main Win32 system errors

Code
(hex)

Code
(dec)

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 regarding the main FreeBSD system errors

Code
(hex)

Code
(dec)

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.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4016

PC or CX (x86, x64)

Tc2_SerialCom