AdsClient.WriteAnyStringAsync Method (UInt32, String, Int32, Encoding, CancellationToken)
Writes the string (Potentially unsafe!)
Namespace: TwinCAT.Ads
Assembly: TwinCAT.Ads (in TwinCAT.Ads.dll)
Version: 6.0.328+39e3229
Syntax
C#
public Task<ResultWrite> WriteAnyStringAsync(
uint variableHandle,
string value,
int length,
Encoding encoding,
CancellationToken cancel
)
Parameters
variableHandle |
Type: System.UInt32 |
value |
Type: System.String |
length |
Type: System.Int32 |
encoding |
Type: System.Text.Encoding |
cancel |
Type: System.Threading.CancellationToken |
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.