AdsTransMode Enumeration

ADS Transmission Mode for ADS Notifications.

Namespace:  TwinCAT.Ads
Assembly:  TwinCAT.Ads.Abstractions (in TwinCAT.Ads.Abstractions.dll) Version: 6.0.116+a71ced3

Syntax

C#

public enum AdsTransMode

Members

 

Member name

Value

Description

None

0

None / Uninitalized transport mode. No AdsNotification event is fired.

Cyclic

3

The AdsNotification event is fired cyclically.

The Notification will be registered on the ADS Server side for a cyclical trigger (dependant on time parameter) and is bound to the 'default' task of the addressed target. In case of the PLC target (e.g. Port 851) the default task is the first configured task.

Each time the 'default' task has finished its cycle the realtime system will check for the expired cycle time and sends the AdsNotification message on expiry.

The used ContextMask for the 'default' task is 0.

Please be aware, that server side 'Change' notifications stress the realtime system and should be handled with care. Therefore, dependent of the cycle time of the task and the capabilities of the system only a limited set of Cyclic Notifications should be used!

OnChange

4

On-Change AdsNotification event.

The Notification will be registered on the ADS Server side for an on-change and optional cyclical trigger (dependant on parameters) and is bound to the 'default' task of the addressed target. In case of the PLC target (e.g. Port 851) the default task is the first configured task.

Each time this task has finished its cycle the realtime system will check for the changed value and an optional expired cycle time and sends the AdsNotification message on change or expiry.

The used ContextMask for the 'default' task is 0.

Please be aware, that server side 'OnChange' notifications stress the realtime system / the default task with value comparisons. Therefore, dependent of the cycle time of the task and the capabilities of the system a higher amount of notification registrations should be handled with care !

CyclicInContext

5

The AdsNotification event is fired cyclically within the given task context.

A Value of parameter is interpreted as task context number ContextMask. This can be important, if the notifications have to be synchronous with specific tasks, but should not be used in the default case.

The Notification will be registered on the ADS Server side for a cyclical trigger (dependant on time parameter) and is bound to the task specified by the ContextMask of the addressed target. In case of the PLC target (e.g. Port 851) the ContextMask is the Index of the global TASKINFOARRAY - 1.

Each time this task has finished its cycle the realtime system will check for the expired cycle time and sends the AdsNotification message on expiry.

OnChangeInContext

6

The AdsNotification event is fired when the data changes within the given task context.

A Value of parameter is interpreted as task context number ContextMask. This can be important, if the notifications have to be synchronously with specific tasks, but should not be used in the default case.

The Notification will be registered on the ADS Server side for an on-change and optional cyclical trigger (dependant on parameters) and is bound to the task specified by the ContextMask of the addressed target. In case of the PLC target (e.g. Port 851) the ContextMask is the Index of the global TASKINFOARRAY - 1. Each time this task has finished its cycle the realtime system will check for the changed value and an optional expired cycle time and sends the AdsNotification message on change or expiry.

Please be aware, that server side 'OnChange' notifications stress the realtime system / the default task with value comparisons. Therefore, dependent of the cycle time of the task and the capabilities of the system only a limited set of OnChange Notifications should be used!

Remarks

The AdsTransMode configures the registration of the AdsNotification at the server system and how the parameters of the AddDeviceNotification(String, Int32, NotificationSettings, Object) are interpreted. The following general scenarios are addressed:

In the default case the OnChange or the Cyclic (Server cycle) should be used. All other modes are side cases for special purposes.

More about the AdsNotifications: ADS Notification concept.

Reference

TwinCAT.Ads Namespace

IAdsNotifications.AdsNotification

IAdsNotifications.AdsNotificationEx

AddDeviceNotification Overload

AddDeviceNotificationEx Overload