AdsConnection.TryWrite Method (UInt32, UInt32, .Byte., Int32, 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 AdsErrorCode TryWrite(
    uint indexGroup,
    uint indexOffset,
    byte[] writeStream,
    int offset,
    int length,
    int timeout
)

VB

Public Function TryWrite ( 
    indexGroup As UInteger,
    indexOffset As UInteger,
    writeStream As Byte(),
    offset As Integer,
    length As Integer,
    timeout 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.

writeStream

Type: .System.Byte.
The write stream.

offset

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

length

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

timeout

Type: System.Int32
The timeout.

Return Value

Type: AdsErrorCode
AdsErrorCode.

Reference

AdsConnection Class

TryWrite Overload

TwinCAT.Ads Namespace