AdsConnection.TryRead Method (UInt32, UInt32, .Byte., Int32, Int32, Int32, Int32.)

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 AdsErrorCode TryRead(
    uint indexGroup,
    uint indexOffset,
    byte[] readBuffer,
    int offset,
    int length,
    int timeout,
    out int readBytes
)

VB

Public Function TryRead ( 
    indexGroup As UInteger,
    indexOffset As UInteger,
    readBuffer As Byte(),
    offset As Integer,
    length As Integer,
    timeout As Integer,
    <OutAttribute> ByRef readBytes As Integer
) As AdsErrorCode

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.

readBuffer

Type: .System.Byte.
The read buffer.

offset

Type: System.Int32
The offset.

length

Type: System.Int32
The length.

timeout

Type: System.Int32
The timeout.

readBytes

Type: System.Int32.
The read bytes.

Return Value

Type: AdsErrorCode
AdsErrorCode.

Reference

AdsConnection Class

TryRead Overload

TwinCAT.Ads Namespace