Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

ADS Connection Properties

localAddress (string, required)

The local address of the client

Example: "192.168.7.20.1.1"

localPort (integer)

The local ADS port of the client. When omitted or set to 0, a free port is requested from the target AMS router; this works only for TwinCAT 3 / real-router targets. TwinCAT 2.x and router-less raw (rawClient) targets need an explicit port, and for fleets set an explicit unique port per connection for deterministic routing. Must be unique per client: two connections sharing the same local AMS NetId and port misroute notifications.

Example: 32750

rawClient (boolean)

Treat the target as a plain ADS device without a TwinCAT system manager (remote I/O, bus couplers, custom ADS servers). Overrides the legacy derivation from connectionCheckEnabled: false. No schema default on purpose: the service manager fills defaults in, and a default here would defeat that derivation.

forceUtf8ForAdsSymbols (boolean)

Always use UTF-8 when encoding and decoding ADS symbols. Needed for non-PLC targets serving UTF-8 symbols; TwinCAT 4026 and newer is detected automatically.

Default: false

includeRawValue (boolean)

If true, read responses also carry the raw undecoded bytes under value.rawValue (a Buffer). Off by default so reads keep the v1 shape {value, type, symbol} and the data plane stays small; enable only when a consumer needs the raw bytes.

Default: false

host (string, required)

The device address. It can be an IP address or a hostname.

Example: "192.168.2.114"

routerTcpPort (integer)

The ADS Router TCP port

Default: 48898

Example: 48898

port (integer, required)

AMS port of the ADS device. This is not the TCP port used but the setting usually known as PortNr.; the actual TCP port is adsRouterTcpPort.

Example: 851

netId (string, required)

AMS Net ID of the ADS device.

Example: "192.168.2.114.1.1"

timeoutDelay (integer)

Time (milliseconds) after connecting to the router or waiting for command response is canceled due to timeout

Default: 2000

connectionCheckEnabled (boolean)

If true, the connection will be regularly checked for existing connectivity in the time interval as defined in the parameter connectionCheckInterval. For rawClient targets this arms the agent-side liveness watchdog (periodic ADS ReadState probes), the only way a half-open raw connection is detected. Set false to disable all checking.

Default: true

connectionCheckInterval (integer)

How often to check the connection (in milliseconds). Applies to the TwinCAT system-state monitoring on PLC targets and to the ReadState watchdog on rawClient targets.

Default: 5000

connectionDownDelay (integer)

How much time should pass without response to mark the connection down (in milliseconds). On rawClient targets, an ADS error response still counts as alive, only silence trips the watchdog.

Default: 25000

connectionStrategy (object)

If a connection attempt fails, retries will be performed with increasing delay (waiting time) in between. The following parameters control how these delays behave.

Properties of the connectionStrategy object:

initialDelay (integer)

Delay (waiting time) of the first connection retry (in milliseconds). For subsequent retries, the delay will be increased according to the parameter incrementFactor which has a default value of 2.

Default: 1000

Additional restrictions:

  • Minimum: 1000

maxDelay (integer)

Maximum delay (waiting time) to wait until the next retry (in milliseconds). The delay (waiting time) for any subsequent connection retry will not be larger than this value. Must be strictly greater than initialDelay.

Default: 30000

incrementFactor (integer)

The factor used to increment initialDelay up to maxDelay. For example if initialDelay is set to 1000 and maxDelay to 5000 the values for the delay would be 1000, 2000, 4000, 5000.

Default: 2

Additional restrictions:

  • Minimum: 2

Last updated

Was this helpful?