AdsErrorCode Enumeration

ADS request return codes.

Namespace:  TwinCAT.Ads
Assembly:  TwinCAT.Ads.Abstractions (in TwinCAT.Ads.Abstractions.dll) Version: 6.0.328+39e3229

Syntax

C#

public enum AdsErrorCode

Members

 

Member name

Value

Description

None

-1

None / Uninitialized.

Category: Global

This indicates an uninitialized value.

NoError

0

No Error / Succeeded.

Error code: 0 (0x000).

Category: Global

C++: ERR_NOERROR

The ADS request succeeded.

InternalError

1

Internal Error.

Error code: 1 (0x001).

Category: Global

C++: ERR_INTERNAL

This error is very generic and there is no further information available about the problem.

NoRTime

2

No Realtime available.

Error code: 2 (0x002).

Category: Global

C++: ERR_NORTIME

LockedMemoryError

3

Allocation locked memory error.

Error code: 3 (0x003).

Category: Global

C++: ERR_ALLOCLOCKEDMEM

MailBoxError

4

Mailbox error.

Error code: 4 (0x004).

Category: Global

C++: ERR_INSERTMAILBOX

The Mailbox is full – the ADS message could not be sent. Reducing the number of ADS messages per cycle may help.

WrongHMsg

5

Wrong receive HMSG.

Error code: 5 (0x005).

Category: Global

C++: ERR_WRONGRECEIVEHMSG

TargetPortNotFound

6

The Target port is not found.

Error code: 6 (0x006).

Category: Global

C++: ERR_TARGETPORTNOTFOUND

The ADS server is not started or is not reachable. The target machine could be found, but the Port is not available.

TargetMachineNotFound

7

The Target machine is not found.

Error code: 7 (0x007).

Category: Global

C++: ERR_TARGETMACHINENOTFOUND

The Target computer / AMS route was not found. This Error typically occurs when the Route is not registered at the requesting system.

UnknownCommandID

8

Unknown command ID.

Error code: 8 (0x008).

Category: Global

C++: ERR_UNKNOWNCMDID

BadTaskID

9

Bad task ID.

Error code: 9 (0x009).

Category: Global

C++: ERR_BADTASKID

NoIO

10

No IO.

Error code: 10 (0x00A).

Category: Global

C++: ERR_NOIO

UnknownAmsCommand

11

Unknown AMS command.

Error code: 11 (0x00B).

Category: Global

C++: ERR_UNKNOWNAMSCMD

Win32Error

12

Win 32 error.

Error code: 12 (0x00C).

Category: Global

C++: ERR_WIN32ERROR

PortNotConnected

13

The Port is not connected.

Error code: 13 (0x00D).

Category: Global

C++: ERR_PORTNOTCONNECTED

InvalidAmsLength

14

Invalid AMS length.

Error code: 14 (0x00E).

Category: Global

C++: ERR_INVALIDAMSLENGTH

InvalidAmsNetID

15

Invalid AMS Net ID.

Error code: 15 (0x00F).

Category: Global

C++: ERR_INVALIDAMSNETID

LowInstallLevel

16

Low Installation level.

Error code: 16 (0x010).

Category: Global

C++: ERR_LOWINSTLEVEL

Installation level is too low – TwinCAT 2 license error.

NoDebug

17

No debug available.

Error code: 17 (0x011).

Category: Global

C++: ERR_NODEBUGINTAVAILABLE

PortDisabled

18

Port disabled.

Error code: 18 (0x012).

Category: Global

C++: ERR_PORTDISABLED

The port is disabled when the TwinCAT system service not in an active state (config, running). For the time of a Reconfig/Restart the included TwinCAT Router disables all RouterPorts.

PortConnected

19

The Port is already connected.

Error code: 19 (0x013).

Category: Global

C++: ERR_PORTALREADYCONNECTED

AmsSyncWin32Error

20

AMS Sync Win32 error.

Error code: 20 (0x014).

C++: ERR_AMSSYNC_W32ERROR

SyncTimeOut

21

AMS Sync timeout.

Error code: 21 (0x015).

Category: Global

C++: ERR_AMSSYNC_TIMEOUT

AmsSyncAmsError

22

AMS Sync AMS error

Error code: 22 (0x016).

Category: Global

C++: ERR_AMSSYNC_AMSERROR

AmsSyncNoIndexMap

23

No index map for AMS Sync available.

Error code: 23 (0x017).

Category: Global

C++: ERR_AMSSYNC_NOINDEXINMAP

InvalidAmsPort

24

Invalid AMS port.

Error code: 24 (0x018).

Category: Global

C++: ERR_INVALIDAMSPORT

NoMemory

25

No memory.

Error code: 25 (0x019).

Category: Global

C++: ERR_NOMEMORY

TCPSendError

26

TCP send error.

Error code: 26 (0x01A).

Category: Global

C++: ERR_TCPSEND

HostUnreachable

27

The Host is unreachable.

Error code: 27 (0x1B).

Category: Global

C++: , ERR_HOSTUNREACHABLE

AmsInvalidFragment

28

Invalid AMS fragment.

Error code: 28 (0x1C).

Category: Global

C++: ERR_INVALIDAMSFRAGMENT

TlsSendError

29

TLS send error – secure ADS connection failed.

Error code: 29 (0x1D)

Category: Global

C++: ERR_TLSSEND

AccessDenied

30

Access denied – secure ADS access denied.

Error code: 30 (0x1E)

Category: Global

C++: ERR_ACCESSDENIED

TcpConnectionRefused

31

TCP Connection refused

Error code: 31 (0x1F)

Category: Global

C++: ERR_TCP_CONN_REFUSED

NoLockedMemory

1280

Router: no locked memory.

Error code: 1280 (0x500).

Category: Router

C++: ROUTERERR_NOLOCKEDMEMORY

Locked memory cannot be allocated.

ResizeMemory

1281

Router: The size of the router memory could not be changed.

Error code: 1281 (0x501).

Category: Router

C++: ROUTERERR_RESIZEMEMORY

The router memory size could not be changed.

MailboxFull

1282

Router: mailbox full.

Error code: 1282 (0x502).

Category: Router

C++: ROUTERERR_MAILBOXFULL

The mailbox has reached the maximum number of possible messages.

DebugBoxFull

1283

Router: The mailbox has reached the maximum number of possible messages.

Error code: 1284 (0x504).

Category: Router

C++: ROUTERERR_DEBUGBOXFULL

The Debug mailbox has reached the maximum number of possible messages.

UnknownPortType

1284

Router: Unknown Port Type

Error code: 1284 (0x504).

Category: Router

C++: ROUTERERR_UNKNOWNPORTTYPE

The port type is unknown.

RouterNotInitialized

1285

Router: Router is not initialized.

Error code: 1285 (0x505).

Category: Router

C++: ROUTERERR_NOTINITIALIZED

The router is not initialized.

PortAlreadyInUse

1286

Router: The desired port number is already assigned.

Error code: 1286 (0x506).

Category: Router

C++: ROUTERERR_PORTALREADYINUSE

The port number is already assigned.

PortNotRegistered

1287

Router: Port not registered.

Error code: 1287 (0x507).

Category: Router

C++: ROUTERERR_NOTREGISTERED

The port is not registered.

NoMoreQueues

1288

Router: The maximum number of Ports reached.

Error code: 1288 (0x508).

Category: Router

C++: ROUTERERR_NOMOREQUEUES

The maximum number of ports has been reached.

InvalidPort

1289

Router: The port is invalid.

Error code: 1289 (0x509).

Category: Router

C++: ROUTERERR_INVALIDPORT

The port is invalid.

RouterNotActive

1290

Router: TwinCAT Router not active.

Error code: 1290 (0x50A).

Category: Router

C++: ROUTERERR_NOTACTIVATED

The router is not active.

RouterFragmentBoxFull

1291

Router: The mailbox has reached the maximum number for fragmented messages.

Error code: 1291 (0x50B).

Category: Router

C++: ROUTERERR_FRAGMENTBOXFULL

The mailbox has reached the maximum number for fragmented messages.

RouterFragmentTimeout

1292

Router: A fragment timeout has occurred.

Error code: 1292 (0x50C).

Category: Router

C++: ROUTERERR_FRAGMENTTIMEOUT

A fragment timeout has occurred.

RouterPortToBeRemoved

1293

Router: The port is removed..

Error code: 1293 (0x50D).

Category: Router

C++: ROUTERERR_TOBEREMOVED

The port is removed..

DeviceError

1792

error class <device error">

Error code: 1792 (0x700).

Category: Device

C++: ADSERR_DEVICE_ERROR

DeviceServiceNotSupported

1793

The requested Service is not supported by the server.

Error code: 1793 (0x701).

Category: Device

C++: ADSERR_DEVICE_SRVNOTSUPP

This will be returned for example when an not known IndexGroup or IndexOffset is accessed.

DeviceInvalidGroup

1794

Invalid index group.

Error code: 1794 (0x702).

Category: Device

C++: ADSERR_DEVICE_INVALIDGRP

DeviceInvalidOffset

1795

Invalid index offset.

Error code: 1795 (0x703).

Category: Device

C++: ADSERR_DEVICE_INVALIDOFFSET

DeviceInvalidAccess

1796

Reading/writing not permitted.

Error code: 1796 (0x704).

Category: Device

C++: ADSERR_DEVICE_INVALIDACCESS

DeviceInvalidSize

1797

Parameter size not correct.

Error code: 1797 (0x705).

Category: Device

C++: ADSERR_DEVICE_INVALIDSIZE

Usually the size of the requested return data (by Read or ReadWrite-request) doesn't have the correct size and doesn't fit in the reserved read memory buffer.

DeviceInvalidData

1798

Invalid parameter value(s).

Error code: 1798 (0x706).

Category: Device

C++: ADSERR_DEVICE_INVALIDDATA

DeviceNotReady

1799

Device is not in a ready state.

Error code: 1799 (0x707).

Category: Device

C++: ADSERR_DEVICE_NOTREADY

DeviceBusy

1800

Device is busy.

Error code: 1800 (0x708).

Category: Device

C++: ADSERR_DEVICE_BUSY

This return code indicates that the addressed (ADS) device is actually busy. Try the request later on again.

DeviceInvalidContext

1801

Invalid context (must be in Windows).

Error code: 1801 (0x709).

Category: Device

C++: ADSERR_DEVICE_INVALIDCONTEXT

DeviceNoMemory

1802

The device ran out of memory.

Error code: 1802 (0x70a).

Category: Device

C++: ADSERR_DEVICE_NOMEMORY

DeviceInvalidParam

1803

Invalid parameter value(s).

Error code: 1803 (0x70b).

Category: Device

C++: ADSERR_DEVICE_INVALIDPARM

DeviceNotFound

1804

Not found(files, ...).

Error code: 1804 (0x70c).

Category: Device

C++: ADSERR_DEVICE_NOTFOUND

DeviceSyntaxError

1805

Syntax error in command or file.

Error code: 1805 (0x70d).

Category: Device

C++: ADSERR_DEVICE_SYNTAX

DeviceIncompatible

1806

Objects do not match.

Error code: 1806 (0x70e).

Category: Device

C++: ADSERR_DEVICE_INCOMPATIBLE

DeviceExists

1807

Object already exists on device.

Error code: 1807 (0x70f).

Category: Device

C++: ADSERR_DEVICE_EXISTS

DeviceSymbolNotFound

1808

Symbol not found.

Error code: 1808 (0x7010).

Category: Device

C++: ADSERR_DEVICE_SYMBOLNOTFOUND

The requested Symbol - usually requested by instance path - is not found or not existent.

DeviceSymbolVersionInvalid

1809

Symbol version is invalid.

Error code: 1809 (0x711).

Category: Device

C++: ADSERR_DEVICE_SYMBOLVERSIONINVALID

This ErrorCode can indicate that a variable handle is invalid.

DeviceInvalidState

1810

Server is not in a valid state.

Error code: 1810 (0x712).

Category: Device

C++: ADSERR_DEVICE_INVALIDSTATE

DeviceTransModeNotSupported

1811

ADS transmode is not supported.

Error code: 1811 (0x713).

Category: Device

C++: ADSERR_DEVICE_TRANSMODENOTSUPP

DeviceNotifyHandleInvalid

1812

Notification handle is invalid.

Error code: 1812 (0x714).

Category: Device

C++: ADSERR_DEVICE_NOTIFYHNDINVALID

DeviceClientUnknown

1813

Notification client not registered.

Error code: 1813 (0x715).

Category: Device

C++: ADSERR_DEVICE_CLIENTUNKNOWN

DeviceNoMoreHandles

1814

No more notification handles.

Error code: 1814 (0x716).

Category: Device

C++: ADSERR_DEVICE_NOMOREHDLS

DeviceInvalidWatchsize

1815

Size for watch to big.

Error code: 1815 (0x717).

Category: Device

C++: ADSERR_DEVICE_INVALIDWATCHSIZE

DeviceNotInitialized

1816

Device is not initialized.

Error code: 1818 (0x718).

Category: Device

C++: ADSERR_DEVICE_NOTINIT

DeviceTimeOut

1817

Device has a timeout.

Error code: 1817 (0x719).

Category: Device

C++: ADSERR_DEVICE_TIMEOUT

DeviceNoInterface

1818

Query interface has failed.

Error code: 1818 (0x71A).

Category: Device

C++: ADSERR_DEVICE_NOINTERFACE

DeviceInvalidInterface

1819

Wrong interface required.

Error code: 1819 (0x71B).

Category: Device

C++: ADSERR_DEVICE_INVALIDINTERFACE

DeviceInvalidCLSID

1820

Class ID is invalid.

Error code: 1820 (0x71C).

Category: Device

C++: ADSERR_DEVICE_INVALIDCLSID

DeviceInvalidObjectID

1821

Object ID is invalid.

Category: Device

Error code: 1821 (0x71D).

C++: ADSERR_DEVICE_INVALIDOBJID

DeviceRequestIsPending

1822

Device: A Request is Pending.

Error code: 1822 (0x71E).

Category: Device

C++: ADSERR_DEVICE_PENDING

This return code indicates that the result of an request is not available yet. Try later to access the request result.

DeviceRequestIsAborted

1823

Device: Request is Aborted.

Category: Device

Error code: 1823 (0x71F).

C++: ADSERR_DEVICE_ABORTED

DeviceSignalWarning

1824

Device: Signal warning.

Error code: 1824 (0x720).

Category: Device

C++: ADSERR_DEVICE_WARNING

DeviceInvalidArrayIndex

1825

Device: Invalid Array Index (ADSERR_DEVICE_INVALIDARRAYIDX)

Error code: 1825 (0x721).

Category: Device

C++: ADSERR_DEVICE_INVALIDARRAYIDX

DeviceSymbolNotActive

1826

Device: Symbol not Active

Error code: 1826 (0x722).

Category: Device

C++: ADSERR_DEVICE_SYMBOLNOTACTIVE

DeviceAccessDenied

1827

Device: Access denied.

Error code: 1827 (0x723).

Category: Device

C++: ADSERR_DEVICE_ACCESSDENIED

DeviceLicenseNotFound

1828

Device: license not found

Error code: 1828 (0x724).

Category: Device

C++: ADSERR_DEVICE_LICENSENOTFOUND

DeviceLicenseExpired

1829

Device: license expired

Error code: 1829 (0x725).

Category: Device

C++: ADSERR_DEVICE_LICENSEEXPIRED

DeviceLicenseExceeded

1830

Device: license exceeded

Error code: 1830 (0x726).

Category: Device

C++: ADSERR_DEVICE_LICENSEEXCEEDED

DeviceLicenseInvalid

1831

Device: license invalid

Error code: 1831 (0x727).

Category: Device

C++: ADSERR_DEVICE_LICENSEINVALID

DeviceLicenseSystemId

1832

Device: license invalid system id

Error code: 1832 (0x728).

Category: Device

C++: ADSERR_DEVICE_LICENSESYSTEMID

DeviceLicenseNoTimeLimit

1833

Device: license not time limited

Error code: 1833 (0x729).

Category: Device

C++: ADSERR_DEVICE_LICENSENOTIMELIMIT

DeviceLicenseFutureIssue

1834

Device: license issue time in the future

Error code: 1834 (0x72A).

Category: Device

C++: ADSERR_DEVICE_LICENSEFUTUREISSUE

DeviceLicenseTimeToLong

1835

Device: license time period to long

Error code: 1835 (0x72B).

Category: Device

C++: ADSERR_DEVICE_LICENSETIMETOLONG

DeviceException

1836

Device: Exception in device specific code

Error code: 1836 (0x72C).

Category: Device

C++: ADSERR_DEVICE_EXCEPTION

DeviceLicenseDuplicated

1837

Device: License file read twice

Error code: 1837 (0x72D).

Category: Device

C++: ADSERR_DEVICE_LICENSEDUPLICATED

DeviceSignatureInvalid

1838

Device: invalid signature

Error code: 1838 (0x72E).

Category: Device

C++: ADSERR_DEVICE_SIGNATUREINVALID

DeviceCertificateInvalid

1839

Device: public key certificate

Error code: 1839 (0x72F).

Category: Device

C++: ADSERR_DEVICE_CERTIFICATEINVALID

DeviceLicenseOemNotFound

1840

Device: public key of OEM unknown

Error code: 1840 (0x730).

Category: Device

C++: ADSERR_DEVICE_LICENSEOEMNOTFOUND

DeviceLicenseRestricted

1841

Device: license not valid for this system id type

Error code: 1841 (0x731).

Category: Device

C++: ADSERR_DEVICE_LICENSERESTRICTED

DeviceLicenseDemoDenied

1842

Device: trial license denied

Error code: 1842 (0x732).

Category: Device

C++: ADSERR_DEVICE_LICENSEDEMODENIED

DeviceInvalidFunctionId

1843

Device: function id is invalid

Error code: 1843 (0x733).

Category: Device

C++: ADSERR_DEVICE_INVALIDFNCID

DeviceOutOfRange

1844

Device: a parameter, an index, an iterator, ... is out of range

Error code: 1844 (0x734).

Category: Device

C++: ADSERR_DEVICE_OUTOFRANGE

DeviceInvalidAlignment

1845

Device: invalid alignment

Error code: 1845 (0x735).

Category: Device

C++: ADSERR_DEVICE_INVALIDALIGNMENT

DeviceLicensePlatform

1846

Device: license invalid platform level

Error code: 1846 (0x736).

Category: Device

C++: ADSERR_DEVICE_LICENSEPLATFORM

DeviceContextForwardPassiveLevel

1847

Device: wrong context - forward to passive level (port 12)

Error code: 1847 (0x737).

Category: Device

C++: ADSERR_DEVICE_FORWARD_PL

DeviceContextForwardDispatchLevel

1848

Device: wrong context - forward to dispatch level (port 10)

Error code: 1848 (0x738).

Category: Device

C++: ADSERR_DEVICE_FORWARD_DL

DeviceContextForwardRealTime

1849

Device: wrong context - forward to real time (port 11)

Error code: 1849 (0x739).

Category: Device

C++: ADSERR_DEVICE_FORWARD_RT

DeviceCertificateEntrust

1850

Device: OEM certificate not in trusted list

Error code: 1850 (0x73A).

Category: Device

C++: ADSERR_DEVICE_CERTIFICATENTRUST

ClientError

1856

Error class <client error>

Error code: 1856 (0x740).

Category: Client

C++: ADSERR_CLIENT_ERROR

ClientInvalidParameter

1857

Parameter at service is invalid. Error code: 1857 (0x741).

Category: Client

C++: ADSERR_CLIENT_INVALIDPARM

ClientListEmpty

1858

Polling list is empty.

Error code: 1858 (0x742).

Category: Client

C++: ADSERR_CLIENT_LISTEMPTY

ClientVariableInUse

1859

Variable connection is already in use.

Error code: 1859 (0x743).

Category: Client

C++: ADSERR_CLIENT_VARUSED

ClientDuplicateInvokeID

1860

Invoke ID already in use.

Error code: 1860 (0x744).

Category: Client

C++: ADSERR_CLIENT_DUPLINVOKEID

ClientSyncTimeOut

1861

Timeout has elapsed.

Error code: 1861 (0x745).

Category: Client

C++: ADSERR_CLIENT_SYNCTIMEOUT

This error occurs when the communication endpoint don't answer within the configured timeout timespan. The most likely reasons for this return code is a not available client (system shutdown), network problems or a busy device that runs the client.

ClientW32Error

1862

Error in win32 subsystem.

Category: Client

Error code: 1862 (0x746).

C++: ADSERR_CLIENT_W32ERROR

ClientTimeoutInvalid

1863

Timeout value is invalid.

Error code: 1863 (0x747).

Category: Client

C++: ADSERR_CLIENT_TIMEOUTINVALID

ClientPortNotOpen

1864

ADS port is not opened.

Error code: 1864 (0x748).

Category: Client

C++: ADSERR_CLIENT_PORTNOTOPEN

ClientNoAmsAddr

1865

No AMS Address.

Error code: 1865 (0x749).

Category: Client

C++: ADSERR_CLIENT_NOAMSADDR

ClientSyncInternal

1872

An internal in ADS sync has occurred.

Error code: 1872 (0x750).

Category: Client

C++: ADSERR_CLIENT_SYNCINTERNAL

ClientAddHash

1873

Hash table overflow.

Error code: 1873(0x751).

Category: Client

C++: ADSERR_CLIENT_ADDHASH

ClientRemoveHash

1874

There are no more symbols in the hash table.

Error code: 1874 (0x752).

Category: Client

C++: ADSERR_CLIENT_REMOVEHASH

ClientNoMoreSymbols

1875

There are no more symbols in cache.

Error code: 1875 (0x753).

Category: Client

C++: ADSERR_CLIENT_NOMORESYM

ClientResponseInvalid

1876

An invalid response has been received.

Error code: 1876 (0x754).

Category: Client

C++ ADSERR_CLIENT_SYNCRESINVALID

This error occurs when the client receives invalid response frame for an ADS request. The frame is ignored and this error code is returned to the caller.

ClientPortLocked

1877

The synchronous ADS Port is locked.

Error code: 1877 (0x755).

Category: Client

C++: ADSERR_CLIENT_SYNCPORTLOCKED

ClientRequestCancelled

1878

The client Request was cancelled (asynchronously)

Error code: 1878 (0x756).

Category: Client

C++: ADSERR_CLIENT_REQCANCEL

ClientQueueFull

32768

The ADS Client queue is full

Error code: 32768 (0x8000).

Category: Client

C++: ADSERR_CLIENT_SYNCPORTLOCKED

WSA_ConnAborted

10053

Software caused connection abort (0x2745, 10053)

An established connection was aborted by the software in your host computer, possibly due to a data transmission time-out or protocol error.

Error code: 10053 (0x2745).

Category: Windows Sockets

C++: WSAECONNABORTED

WSA_ConnReset

10054

Connection reset by peer. (0x2746, 10054)

An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET.

Error code: 10054 (0x2746).

Category: Windows Sockets

C++: WSAECONNRESET

WSA_ConnRefused

10061

Windows sockets connection refused (0x274d, 10061)

No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.

Error code: 10061 (0x274d).

Category: Windows Sockets

C++: WSAECONNREFUSED

Remarks

These ADS Error codes are used within the AmsHeader to indicate ReturnCodes or Error states in ADS Request Responses. For example the NoError (value 0) indicates a success. Further codes like TargetPortNotFound (the ADSServer port is not found) or ClientSyncTimeOut (the client request wasn't answered within the configured global timeout) indicate communication errors. Also ApplicationReturn codes (e.g. ClientNoMoreSymbols (the end of the Server Symbols list is reached) are encoded in this AdsErrorCode.

For more information please see the AMS Header structure described on the Beckhoff Information System.

Reference

TwinCAT.Ads Namespace