AdsServerConnectServerAsync Method

Connect server as an asynchronous operation.


Namespace: TwinCAT.Ads.Server
Assembly: TwinCAT.Ads.Server (in TwinCAT.Ads.Server.dll) Version: 7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470

Syntax

C#

public Task<uint> ConnectServerAsync(
    CancellationToken cancel
)

Parameters

cancel  CancellationToken

The cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value

Task UInt32
A Task<System.Int32> representing the asynchronous operation.

Exceptions

Exception

Condition

ObjectDisposedException

AdsServerException

AdsServer '{this.ServerName}' is already connected to '{this.ServerAddress!.ToString()}'. Disconnect before requesting a reconnect!

AdsServerException

Reference

AdsServer Class TwinCAT.Ads.Server Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026