AdsConnection.ReadWrite Method (UInt32, UInt32, AdsStream, AdsStream, Int32)

Writes data synchronously to an ADS device and then Reads data from this device.

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

Syntax

C#

public int ReadWrite(
    uint indexGroup,
    uint indexOffset,
    AdsStream rdDataStream,
    AdsStream wrDataStream,
    int timeout
)

VB

Public Function ReadWrite ( 
    indexGroup As UInteger,
    indexOffset As UInteger,
    rdDataStream As AdsStream,
    wrDataStream As AdsStream,
    timeout As Integer
) 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.

rdDataStream

Type: TwinCAT.Ads.AdsStream
Stream that receives the data that has been read.

wrDataStream

Type: TwinCAT.Ads.AdsStream
Stream that contains the data that should be written.

timeout

Type: System.Int32
The timeout.

Return Value

Type: Int32
Number of successfully returned data bytes.

Reference

AdsConnection Class

ReadWrite Overload

TwinCAT.Ads Namespace