TcAdsClient.Read Method (UInt32, UInt32, AdsStream)

Reads data synchronously from an ADS device and writes it to the given stream.

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

Syntax

C#

public int Read(
    uint indexGroup,
    uint indexOffset,
    AdsStream dataStream
)

VB

Public Function Read ( 
    indexGroup As UInteger,
    indexOffset As UInteger,
    dataStream As AdsStream
) As Integer

Parameters

indexGroup

Type: System.UInt32
Contains the index group number of the requested ADS service.

indexOffset

Type: System.UInt32
Contains the index offset number of the requested ADS service.

dataStream

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

Return Value

Type: Int32
Number of successfully returned data bytes.

Exceptions

Exception

Condition

AdsErrorException

Thrown when the ADS call fails.

Reference

TcAdsClient Class

Read Overload

TwinCAT.Ads Namespace