Skip to Content
Niagara 4How does the Tuning Policy work in any given Niagara Driver

How does the Tuning Policy work in any given Niagara Driver

The Tuning Policy is a critical configuration component in Niagara 4 drivers that controls how the driver communicates with devices, manages polling intervals, handles errors, and optimises performance. Understanding tuning policies is essential for proper driver configuration and system performance.

Overview

A Tuning Policy defines the operational parameters for a Niagara driver, including polling schedules, retry logic, timeout values, and error handling strategies. Each driver instance can have its own tuning policy, allowing fine-grained control over driver behaviour.

Key Components of a Tuning Policy

Polling Configuration

The tuning policy controls how frequently the driver polls devices:

  • Poll Interval: The base interval between poll cycles
  • Poll Priority: Determines the order in which devices are polled
  • Poll Scheduling: Controls when polling occurs (continuous, scheduled, or on-demand)

Communication Parameters

Communication settings that affect driver behaviour:

  • Timeout Values: How long to wait for device responses
  • Retry Logic: Number of retry attempts and retry intervals
  • Connection Management: How connections are established and maintained

Error Handling

Configuration for handling communication errors:

  • Error Thresholds: When to mark a device as failed
  • Recovery Strategies: How to recover from communication failures
  • Error Reporting: How errors are logged and reported

How Tuning Policies Work

Policy Application

  1. Driver Initialisation: When a driver starts, it loads its assigned tuning policy
  2. Parameter Application: The driver applies all parameters from the tuning policy
  3. Runtime Behaviour: The driver operates according to the policy settings throughout its operation

Policy Inheritance

Tuning policies can be:

  • Driver-Specific: Each driver instance has its own policy
  • Template-Based: Policies can be created from templates
  • Shared: Multiple drivers can share the same policy

Step-by-Step Configuration

Step 1: Access Driver Properties

  1. Open Niagara Workbench
  2. Navigate to the Station containing your driver
  3. Expand the Drivers folder
  4. Right-click on the target driver
  5. Select Properties from the context menu

Step 2: Navigate to Tuning Policy

  1. In the Driver Properties dialog, locate the Tuning Policy section
  2. This may be under the Advanced or Configuration tab depending on the driver type

Step 3: Select or Create a Tuning Policy

  1. Click the Browse button next to the Tuning Policy field
  2. Choose from existing policies or create a new one
  3. To create a new policy:
    • Click New
    • Enter a name for the policy
    • Configure the policy parameters (see steps below)

Step 4: Configure Polling Parameters

Set the polling configuration:

  • Poll Interval: Set the base polling interval (e.g., 5 seconds, 30 seconds, 1 minute)
  • Poll Mode: Choose between:
    • Continuous: Poll continuously at the specified interval
    • Scheduled: Poll according to a schedule
    • On-Demand: Poll only when requested
  • Priority: Set device polling priority (High, Normal, Low)

Step 5: Configure Communication Parameters

Set communication timeouts and retry logic:

  • Request Timeout: Time to wait for device response (typically 5-30 seconds)
  • Connection Timeout: Time to establish connection (typically 10-60 seconds)
  • Retry Count: Number of retry attempts (typically 3-5)
  • Retry Interval: Time between retry attempts (typically 5-10 seconds)

Step 6: Configure Error Handling

Set error handling parameters:

  • Error Threshold: Number of consecutive errors before marking device as failed
  • Recovery Interval: Time to wait before attempting recovery
  • Error Reporting: Configure how errors are logged and reported

Step 7: Apply and Save

  1. Click OK to save the tuning policy configuration
  2. The driver will apply the new policy settings
  3. Monitor driver behaviour to ensure optimal performance

Common Tuning Policy Configurations

High-Performance Configuration

For systems requiring fast response times:

  • Poll Interval: 5-10 seconds
  • Request Timeout: 5 seconds
  • Retry Count: 3
  • Error Threshold: 3 consecutive errors

Balanced Configuration

For typical building automation systems:

  • Poll Interval: 30-60 seconds
  • Request Timeout: 10 seconds
  • Retry Count: 3-5
  • Error Threshold: 5 consecutive errors

Low-Bandwidth Configuration

For systems with limited network bandwidth:

  • Poll Interval: 2-5 minutes
  • Request Timeout: 30 seconds
  • Retry Count: 2-3
  • Error Threshold: 10 consecutive errors

Understanding Poll Scheduling

The Poll Scheduler works in conjunction with the Tuning Policy:

  1. Policy Defines Intervals: The tuning policy sets the base polling interval
  2. Scheduler Manages Execution: The poll scheduler determines when polls actually occur
  3. Coordination: Both work together to optimise polling efficiency

For detailed information on poll scheduling, see How does the Poll Scheduler work in any given Niagara Driver.

Best Practices

Policy Design

  • Match to Network: Configure timeouts based on network characteristics
  • Consider Device Capabilities: Some devices may not support fast polling
  • Balance Performance: Balance between responsiveness and network load

Monitoring and Adjustment

  • Monitor Performance: Regularly review driver performance metrics
  • Adjust as Needed: Modify policies based on observed behaviour
  • Document Changes: Keep records of policy changes and their effects

Testing

  • Test Changes: Test policy changes in a development environment first
  • Gradual Changes: Make incremental changes rather than large adjustments
  • Monitor Impact: Observe system behaviour after policy changes

Troubleshooting

Driver Not Polling

If a driver is not polling devices:

  1. Check Policy Assignment: Verify the tuning policy is assigned to the driver
  2. Review Poll Interval: Ensure poll interval is not set too high
  3. Check Poll Mode: Verify poll mode is set to Continuous or Scheduled
  4. Review Driver Status: Check driver status for errors

Slow Response Times

If driver response is slow:

  1. Reduce Poll Interval: Decrease poll interval for faster updates
  2. Review Timeout Values: Ensure timeouts are not too high
  3. Check Network: Verify network performance
  4. Review Device Count: Consider reducing number of devices per driver

Communication Errors

If experiencing frequent communication errors:

  1. Increase Timeout Values: Allow more time for device responses
  2. Adjust Retry Logic: Increase retry count or interval
  3. Review Error Threshold: Adjust threshold based on network reliability
  4. Check Device Status: Verify devices are functioning properly

Additional Resources

  • Niagara 4 Driver Configuration Guide
  • Driver Tuning Best Practices
  • Network Optimisation for Niagara Systems