IAdsSymbolLoaderDefaultNotificationSettings Property

Gets/Sets the default notification settings for this SymbolLoader


Namespace: TwinCAT.Ads.TypeSystem
Assembly: TwinCAT.Ads.Abstractions (in TwinCAT.Ads.Abstractions.dll) Version: 7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470

Syntax

C#

INotificationSettings DefaultNotificationSettings { get; set; }

Property Value

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.

Example

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.OnChange, 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

Beckhoff Automation GmbH & Co. KG 2001-2026