IAdsSymbolicAccessTryWriteValueT(ISymbol, T) Method

Tries to write a value to the symbol.


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

Syntax

C#

AdsErrorCode TryWriteValue<T>(
    ISymbol symbol,
    T value
)

Parameters

symbol  ISymbol

The symbol the value is written to.

value  T

The value to write.

Type Parameters

T

The value type.

Return Value

AdsErrorCode
AdsErrorCode.

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 TryWriteValue Overload TwinCAT.Ads Namespace WriteValueT(ISymbol, T) WriteValueAsyncT(ISymbol, T, CancellationToken)

Beckhoff Automation GmbH & Co. KG 2001-2026