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
- Driver Initialisation: When a driver starts, it loads its assigned tuning policy
- Parameter Application: The driver applies all parameters from the tuning policy
- 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
- Open Niagara Workbench
- Navigate to the Station containing your driver
- Expand the Drivers folder
- Right-click on the target driver
- Select Properties from the context menu
Step 2: Navigate to Tuning Policy
- In the Driver Properties dialog, locate the Tuning Policy section
- This may be under the Advanced or Configuration tab depending on the driver type
Step 3: Select or Create a Tuning Policy
- Click the Browse button next to the Tuning Policy field
- Choose from existing policies or create a new one
- 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
- Click OK to save the tuning policy configuration
- The driver will apply the new policy settings
- 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:
- Policy Defines Intervals: The tuning policy sets the base polling interval
- Scheduler Manages Execution: The poll scheduler determines when polls actually occur
- 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:
- Check Policy Assignment: Verify the tuning policy is assigned to the driver
- Review Poll Interval: Ensure poll interval is not set too high
- Check Poll Mode: Verify poll mode is set to Continuous or Scheduled
- Review Driver Status: Check driver status for errors
Slow Response Times
If driver response is slow:
- Reduce Poll Interval: Decrease poll interval for faster updates
- Review Timeout Values: Ensure timeouts are not too high
- Check Network: Verify network performance
- Review Device Count: Consider reducing number of devices per driver
Communication Errors
If experiencing frequent communication errors:
- Increase Timeout Values: Allow more time for device responses
- Adjust Retry Logic: Increase retry count or interval
- Review Error Threshold: Adjust threshold based on network reliability
- Check Device Status: Verify devices are functioning properly
Related Topics
- How does the Poll Scheduler work in any given Niagara Driver
- How to calculate the quantity of Global Capacity Points consumed in a Station
Additional Resources
- Niagara 4 Driver Configuration Guide
- Driver Tuning Best Practices
- Network Optimisation for Niagara Systems