Skip to Content
Niagara 4How does the Poll Scheduler work in any given Niagara Driver

How does the Poll Scheduler work in any given Niagara Driver

The Poll Scheduler is a sophisticated component within Niagara 4 drivers that manages the timing, sequencing, and coordination of device polling operations. It works in conjunction with the Tuning Policy to optimise communication efficiency and ensure reliable data collection from field devices.

Overview

The Poll Scheduler is responsible for:

  • Sequencing Polls: Determining the order in which devices are polled
  • Timing Coordination: Managing when polls occur to avoid conflicts
  • Load Balancing: Distributing polling load across time to prevent network congestion
  • Priority Management: Handling high-priority devices before lower-priority ones
  • Error Recovery: Rescheduling polls after communication failures

How Poll Scheduling Works

Basic Scheduling Mechanism

  1. Policy Configuration: The Tuning Policy defines the base poll interval for the driver
  2. Scheduler Initialisation: When the driver starts, the scheduler creates a polling schedule
  3. Device Registration: Each device connected to the driver is registered with the scheduler
  4. Schedule Generation: The scheduler creates a polling sequence based on device priorities and intervals
  5. Execution: The scheduler executes polls according to the generated schedule

Scheduling Algorithms

The Poll Scheduler uses several algorithms to optimise polling:

Round-Robin Scheduling

  • Devices are polled in a circular sequence
  • Ensures fair distribution of polling time
  • Prevents any single device from monopolising the driver

Priority-Based Scheduling

  • High-priority devices are polled more frequently
  • Critical devices receive immediate attention
  • Lower-priority devices are polled when resources are available

Adaptive Scheduling

  • Adjusts polling frequency based on device response times
  • Reduces polling for slow-responding devices
  • Increases polling for fast-responding devices

Step-by-Step Configuration

Step 1: Access Driver Configuration

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

Step 2: Navigate to Poll Scheduler Settings

  1. In Driver Properties, locate the Poll Scheduler section
  2. This may be under Advanced or Scheduling tab
  3. Review current scheduler configuration

Step 3: Configure Scheduler Mode

Select the scheduling mode:

  • Automatic: Driver automatically manages scheduling (recommended)
  • Manual: Manual configuration of polling sequences
  • Custom: Custom scheduling based on specific requirements

Step 4: Set Device Priorities

Configure priority levels for devices:

  1. Navigate to Devices under the driver
  2. For each device, set priority:
    • High: Critical devices requiring frequent updates
    • Normal: Standard devices with regular polling
    • Low: Non-critical devices with infrequent polling

Step 5: Configure Poll Intervals

Set polling intervals per device or device group:

  1. Select a device or device group
  2. Set Poll Interval (e.g., 5s, 30s, 1m, 5m)
  3. Configure Poll Offset to stagger polling times
  4. Repeat for all devices

Step 6: Configure Scheduler Parameters

Set scheduler-specific parameters:

  • Maximum Concurrent Polls: Number of simultaneous polls (typically 1-5)
  • Poll Queue Size: Maximum number of queued polls
  • Scheduler Resolution: Minimum time between scheduled polls (typically 1 second)

Step 7: Enable Adaptive Scheduling (Optional)

If supported by the driver:

  1. Enable Adaptive Scheduling
  2. Configure Adaptation Rate: How quickly scheduler adapts (typically 0.1-0.5)
  3. Set Minimum Interval: Smallest allowed poll interval
  4. Set Maximum Interval: Largest allowed poll interval

Step 8: Apply Configuration

  1. Click OK to save configuration
  2. Restart the driver if required
  3. Monitor scheduler performance

Understanding Scheduler Behaviour

Poll Sequence Generation

The scheduler generates polling sequences based on:

  1. Device Priority: High-priority devices scheduled first
  2. Poll Intervals: Devices with shorter intervals polled more frequently
  3. Poll Offsets: Offsets prevent simultaneous polling of multiple devices
  4. Network Constraints: Scheduler considers network bandwidth and latency

Dynamic Adjustments

The scheduler dynamically adjusts polling:

  • Response-Based: Adjusts based on device response times
  • Error-Based: Reduces polling frequency for devices with errors
  • Load-Based: Adjusts to prevent network congestion
  • Time-Based: Adapts to time-of-day patterns if configured

Conflict Resolution

When scheduling conflicts occur:

  1. Priority Resolution: Higher-priority polls take precedence
  2. Queue Management: Conflicting polls are queued for later execution
  3. Resource Allocation: Scheduler allocates resources based on availability

Integration with Tuning Policy

The Poll Scheduler works closely with the Tuning Policy:

  1. Policy Sets Base Interval: Tuning Policy defines the base poll interval
  2. Scheduler Manages Execution: Poll Scheduler determines actual execution timing
  3. Coordination: Both components coordinate to optimise performance

The Tuning Policy provides the framework, while the Poll Scheduler handles the execution details.

Best Practices

Scheduler Configuration

  • Use Automatic Mode: Let the driver manage scheduling automatically when possible
  • Set Appropriate Priorities: Assign priorities based on device importance
  • Stagger Poll Times: Use poll offsets to prevent simultaneous polling
  • Monitor Performance: Regularly review scheduler performance metrics

Device Organisation

  • Group Similar Devices: Group devices with similar requirements
  • Balance Load: Distribute polling load evenly across time
  • Consider Network Topology: Account for network structure in scheduling

Performance Optimisation

  • Limit Concurrent Polls: Restrict concurrent polls to prevent network congestion
  • Use Adaptive Scheduling: Enable adaptive scheduling for variable network conditions
  • Review Intervals: Regularly review and adjust poll intervals based on needs

Troubleshooting

Polls Not Executing

If polls are not executing:

  1. Check Scheduler Status: Verify scheduler is enabled and running
  2. Review Device Status: Ensure devices are online and accessible
  3. Check Poll Intervals: Verify intervals are not set too high
  4. Review Driver Logs: Check for scheduler-related errors

Uneven Polling Distribution

If some devices are polled more frequently than others:

  1. Review Priorities: Check device priority settings
  2. Check Intervals: Verify poll intervals are configured correctly
  3. Review Offsets: Ensure poll offsets are properly configured
  4. Monitor Scheduler: Use scheduler monitoring tools to identify issues

Network Congestion

If polling causes network congestion:

  1. Reduce Concurrent Polls: Lower maximum concurrent polls setting
  2. Increase Intervals: Increase poll intervals for non-critical devices
  3. Stagger Polls: Use larger poll offsets to spread polling over time
  4. Review Network: Check network capacity and configuration

Slow Response Times

If scheduler response is slow:

  1. Reduce Queue Size: Lower poll queue size to prevent backlog
  2. Increase Resolution: Increase scheduler resolution for faster execution
  3. Review Priorities: Ensure high-priority devices are scheduled first
  4. Optimise Intervals: Adjust poll intervals based on actual needs

Monitoring Scheduler Performance

Scheduler Metrics

Monitor these key metrics:

  • Poll Execution Rate: Number of polls executed per unit time
  • Average Poll Latency: Time between scheduled and actual poll execution
  • Queue Depth: Number of polls waiting in queue
  • Error Rate: Percentage of failed polls
  • Device Coverage: Percentage of devices polled within their intervals

Performance Analysis

Regularly analyse scheduler performance:

  1. Review Metrics: Check scheduler metrics regularly
  2. Identify Bottlenecks: Find devices or times causing issues
  3. Optimise Configuration: Adjust configuration based on analysis
  4. Document Changes: Keep records of configuration changes

Additional Resources

  • Niagara 4 Driver Architecture Guide
  • Poll Scheduler Best Practices
  • Network Optimisation for Building Automation Systems