AdsConnection.WriteControlAsync Method (AdsState, UInt16, ReadOnlyMemory.Byte., CancellationToken)
Writes the AdsState and device state to the ADS device.
          Namespace:  TwinCAT.Ads
Assembly:  TwinCAT.Ads (in TwinCAT.Ads.dll)
Version: 6.0.328+39e3229
Syntax
C#
public Task<ResultAds> WriteControlAsync(
AdsState adsState,
ushort deviceState,
ReadOnlyMemory<byte> writeBuffer,
CancellationToken cancel
)
Parameters
| 
                   adsState  | 
                   Type: TwinCAT.Ads.AdsState  | 
| 
                   deviceState  | 
                   Type: System.UInt16  | 
| 
                   writeBuffer  | 
                   Type: System.ReadOnlyMemory.Byte.  | 
| 
                   cancel  | 
                   Type: System.Threading.CancellationToken  | 
Return Value
Type: Task.ResultAds.
A task that represents the asynchronous 'ReadState'
operation. The ResultAds parameter
contains the ErrorCode of the ADS
communication after execution.