AdsConnectionWriteAnyStringAsync Method

write any string as an asynchronous operation.


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

Syntax

C#

public Task<ResultWrite> WriteAnyStringAsync(
    uint variableHandle,
    string value,
    int length,
    Encoding? encoding,
    CancellationToken cancel
)

Parameters

variableHandle  UInt32

The variable handle.

value  String

The value.

length  Int32

The length of the string to write

encoding  Encoding

The encoding.

cancel  CancellationToken

The cancellation token.

Return Value

Task ResultWrite
Task<ResultWrite>.

Remarks

ATTENTION: Potentially this method is unsafe because following data can be overwritten after the string symbol. Please be sure to specify the string length lower than the string size reserved within the process image! The String is written with the specified encoding.

Reference

AdsConnection Class TwinCAT.Ads Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026