IAdsSymbolLoader.DefaultNotificationSettings Property

Gets/Sets the default notification settings for this SymbolLoader

Namespace:  TwinCAT.Ads.TypeSystem
Assembly:  TwinCAT.Ads.Abstractions (in TwinCAT.Ads.Abstractions.dll) Version: 6.0.328+39e3229

Syntax

C#

INotificationSettings DefaultNotificationSettings { get; set; }

Property Value

Type: INotificationSettings
The default notification settings.

Remarks

The Default notification Settings can be set on the SymbolLoader and is used as default on the different Symbols. On the symbol itself the NotificationSettings can be overridden.

Examples

Setting the DefaultNotificationSettings on the IAdsSymbolLoader object:

Set DefaultNotificationSettings

// Create AdsClient object
using (AdsClient client = new AdsClient())
{
    // No automatic Synchronization (necessary for Console applications without message loop)
    //client.Synchronize = false;

    // Connect to client
    client.Connect(address);

    // Usage of 'dynamic' type/symbol loader
    SymbolLoaderSettings settings = new SymbolLoaderSettings(SymbolsLoadMode.DynamicTree, ValueAccessMode.IndexGroupOffsetPreferred);
    IAdsSymbolLoader dynLoader = (IAdsSymbolLoader)SymbolLoaderFactory.Create(client, settings);

    // Set the DefaultNotification Properties
    dynLoader.DefaultNotificationSettings = new NotificationSettings(AdsTransMode.ClientOnChange, 200, 2000);

    // Determine the symbols
    dynamic dynamicSymbols = ((IDynamicSymbolLoader)dynLoader).SymbolsDynamic;

    // Task 1 Symbol (build in symbol)
    dynamic task1Symbol = dynamicSymbols._TaskInfo[1];

    // CycleCount Symbol
    dynamic cycleCountSymbol = task1Symbol.CycleCount;

    // Override Notification Setting for Cycle Count Symbol
    cycleCountSymbol.NotificationSettings = new NotificationSettings(AdsTransMode.OnChange, 250, 0);

    // Register Dynamic Value Changed event.
    cycleCountSymbol.ValueChanged += new EventHandler<ValueChangedEventArgs>(cycleCount_ValueChanged);

Reference

IAdsSymbolLoader Interface

TwinCAT.Ads.TypeSystem Namespace