AdsConnection.WriteValueAsync<T>(String, T, CancellationToken) Method

Write value as an asynchronous operation.


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

Syntax

C#

public Task<ResultWrite> WriteValueAsync<T>(
string symbolPath,
T value,
CancellationToken cancel
)

Parameters

symbolPath  String

Name of the ADS symbol.

value  T

Object holding the value to be written to the ADS symbol

cancel  CancellationToken

The cancel token.

Type Parameters

T

The value type.

Return Value

Task<ResultWrite>
A Task<ResultWrite> representing the asynchronous operation.

Implements

IAdsSymbolicAccess.WriteValueAsync<T>(String, T, CancellationToken)

Exceptions

Exception

Condition

ObjectDisposedException

ClientNotConnectedException

Remarks

This method automatically marshals the value from .NET objects into the TwinCAT representation if possible. The overall behaviour is described here in the interface description.

See Also

Reference

AdsConnection Class WriteValueAsync Overload TwinCAT.Ads Namespace WriteValue<T>(String, T) TryWriteValue<T>(ISymbol, T)

Beckhoff Automation GmbH & Co. KG 2001-2026