IAdsSymbolicAccessWriteValueAsyncT(ISymbol, T, CancellationToken) Method

Writes a (typed) value to the symbol as an asynchronous operation.


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

Syntax

C#

Task<ResultWrite> WriteValueAsync<T>(
    ISymbol symbol,
    T value,
    CancellationToken cancel
)

Parameters

symbol  ISymbol

The symbol the value is written to.

value  T

The value to write.

cancel  CancellationToken

The cancellation token.

Type Parameters

T

The value type.

Return Value

Task ResultWrite
A task that represents the asynchronous 'WriteSymbol' operation. The ResultWrite parameter contains the ErrorCode after execution.

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.

Reference

IAdsSymbolicAccess Interface WriteValueAsync Overload TwinCAT.Ads Namespace WriteValueT(ISymbol, T) TryWriteValueT(ISymbol, T)

Beckhoff Automation GmbH & Co. KG 2001-2026