AdsConnection.TryWriteValue Method (ISymbol, Object)

Writes a value to the symbol. Strings and all primitive data types(UInt32, Int32, Bool etc.) are supported. Array and structures are not supported. If a string is passed as parameter, the method attempts to parse the string according to the ADS data type of the symbol.

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

Syntax

C#

public AdsErrorCode TryWriteValue(
    ISymbol symbol,
    Object val
)

Parameters

symbol

Type: TwinCAT.TypeSystem.ISymbol
The symbol the value is written to.

val

Type: System.Object
The value to write.

Return Value

Type: AdsErrorCode
AdsErrorCode.

Implements

IAdsSymbolicAccess.TryWriteValue(ISymbol, Object)

Reference

AdsConnection Class

TryWriteValue Overload

TwinCAT.Ads Namespace