DynamicSymbol.WriteValueAsync Method

Writes the Value of the IValueSymbol

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

Syntax

C#

public Task<ResultWriteAccess> WriteValueAsync(
    Object value,
    CancellationToken cancel
)

Parameters

value

Type: System.Object
The value.

cancel

Type: System.Threading.CancellationToken
The cancellation token.

Return Value

Type: Task.ResultWriteAccess.
A tasks that represents the asynchronous 'ReadValue' operation. The read result is stored in the ResultWriteAccess return value and contains the ErrorCode.

Implements

IValueSymbol.WriteValueAsync(Object, CancellationToken)

Remarks

Calling on primitive types, a call of this method will directly write this Value. On complex types (structs and arrays) it depends on the ISymbolLoader settings what will happen. In non dynamic modes: Only byte Arrays (of correct size) can be written) in dynamic mode: A Value that represents the value will be accepted also.

Reference

DynamicSymbol Class

TwinCAT.TypeSystem Namespace