ITcAdsServiceDuplex.AddBufferedDeviceNotification3

Connects a variable to the associated TcAdsClient. The notification will be passed through the ITcAdsServiceCallbaks.AdsNotification method if the ITcAdsServiceDuplex .SubscibeAdsNotificationEvent method was called successfully.

int AddDeviceNotification3 (
    string netId,
    int port,
    long indexGroup,
    long indexOffset,
    int length,
    AdsTransMode transMode,
    int cycleTime,
    int maxDelay,
    int maxValues,
    object userData 
);

Parameters

netId

NetID of the target AMS Router.

port

Port of the target AMS Router.

indexGroup

Contains the index group number of the requested ADS service.

indexOffset

Contains the index offset number of the requested ADS service.

length

The length of the byte array buffer which will be returned by the AdsNotification callback.

transMode

Specifies if the event should be fired cyclically or only if the variable has changed.

cycleTime

The ADS server checks whether the variable has changed after this time interval. Unit is ms.

maxDelay

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

maxValues

This values defines when a buffered notification is fired.

userData

This object can be used to store user specific data.
Only data types which can be serialized are allowed.

Return Value

The handle of the notification.

SOAP Error Faults

Type

Description

AdsErrorFault

The AdsErrorFault is returned if an AdsException is thrown by a TcAdsClient object in a method of the TwinCAT ADS WCF service.

AdsErrorErrorFault

The AdsErrorErrorFault is returned if an AdsErrorException is thrown by a TcAdsClient object in a method of the TwinCAT ADS WCF service.

ArgumentErrorFault

The ArgumentErrorFault is returned if there is a failure in an argument of a method.

UnexpectedErrorFault

The UnexpectedErrorFault is returned if an unexpected Error occurs.

See Also

ITcAdsServiceDuplex Interface | ITcAdsServiceDuplex Interface | ITcAdsServiceCallbacks Interface