TcAdsClient.Write Method (Int32, AdsStream, Int32, Int32)

Writes data synchronously to an ADS device.

Namespace:  TwinCAT.Ads
Assembly:  TwinCAT.Ads (in TwinCAT.Ads.dll) Version: 4.3.0.0

Syntax

C#

public void Write(
    int variableHandle,
    AdsStream dataStream,
    int offset,
    int length
)

VB

Public Sub Write ( 
    variableHandle As Integer,
    dataStream As AdsStream,
    offset As Integer,
    length As Integer
)

Parameters

variableHandle

Type: System.Int32
Handle of the ADS variable

dataStream

Type: TwinCAT.Ads.AdsStream
Stream that contains the data.

offset

Type: System.Int32
Offset of the data in dataStream.

length

Type: System.Int32
Length of the data in dataStream.

Implements

IAdsHandleAccess.Write(Int32, AdsStream, Int32, Int32)

Exceptions

Exception

Condition

AdsErrorException

Thrown when the ADS call fails.

Reference

TcAdsClient Class

Write Overload

TwinCAT.Ads Namespace