AdsConnection.AddDeviceNotificationEx Method (UInt32, UInt32, AdsTransMode, Int32, Int32, Object, Type)

Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event.

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

Syntax

C#

public int AddDeviceNotificationEx(
    uint indexGroup,
    uint indexOffset,
    AdsTransMode transMode,
    int cycleTime,
    int maxDelay,
    Object userData,
    Type type
)

VB

Public Function AddDeviceNotificationEx ( 
    indexGroup As UInteger,
    indexOffset As UInteger,
    transMode As AdsTransMode,
    cycleTime As Integer,
    maxDelay As Integer,
    userData As Object,
    type As Type
) 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.

transMode

Type: TwinCAT.Ads.AdsTransMode
Specifies if the event should be fired cyclically or only if the variable has changed.

cycleTime

Type: System.Int32
The ADS server checks whether the variable has changed after this time interval. Unit is in ms.

maxDelay

Type: System.Int32
The AdsNotification event is fired at the latest when this time has elapsed. The unit is ms.

userData

Type: System.Object
This object can be used to store user specific data.

type

Type: System.Type
Type of the object stored in the event argument.

Return Value

Type: Int32
The handle of the notification.

Implements

IAdsNotifications.AddDeviceNotificationEx(UInt32, UInt32, AdsTransMode, Int32, Int32, Object, Type)

Reference

AdsConnection Class

AddDeviceNotificationEx Overload

TwinCAT.Ads Namespace