AdsTransMode Enumeration

ADS Transmission Mode for ADS Notifications.

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

Syntax

C#

public enum AdsTransMode

VB

Public Enumeration AdsTransMode

Members

 

Member name

Value

Description

None

0

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

ClientCycle

1

Client triggered cyclic AdsNotification event. The AdsNotification event is fired cyclically triggered from the client side. Polling is used from the User Application to read values, before they are fired as Notifications.

Client side triggering has the following consequences:

  • The realtime environment on the server side will be less stressed (expecially the mailbox queue).
  • Value requests are serialized one after another and are handled slower (synchronouly, not asynchronously)
  • Implicit synchronization of the events into the UI Thread.

ClientOnChange

2

The AdsNotification event is fired when data changes triggered by the client. The AdsNotification event is fired on-change triggered from the client side. Polling is used from the User Application to read values, before they are fired as Notifications. Client side triggering has the following consequences:

  • The realtime environment on the server side will be less stressed (expecially the mailbox queue).
  • Value requests are serialized one after another and are handled slower (synchronouly, not asynchronously)
  • Implicit synchronization of the events into the UI Thread.

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!

A system limit for server side notification registrations is 1024.

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 !

A system limit for server side notification registrations is 1024.

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 synchron 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 synchron 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, AdsStream, Int32, Int32, AdsTransMode, Int32, Int32, 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

TcAdsClient.AdsNotification

TcAdsClient.AdsNotificationEx

AddDeviceNotification Overload

AddDeviceNotificationEx Overload