Polling Driver Tags

Not counted towards your tag license limit.

Polling driver tags are designed for use in telemetry applications where communication links may be costly, either in terms of time or money.

Reference Notes:

The Polling driver tag provides the following features:

  • The ability to poll multiple stations or I/O devices in a pre-determined order and at a fixed time interval.
  • The ability to switch to fast-polling mode of selected sites on demand. See Fast Scan Widget.
  • Provides a simple grouping of I/O tags on a single display.
  • Navigate to a station page using F11 or F12.

Polling driver tags are not required for Data Flow RTU driver tags because those have a polling feature built-in.

Each polling driver should be attached to a unique driver. These may share a common port.
Because Poll Drivers use the same RPC service as their communication driver, it is important to ensure that all communication drivers within the same Polling Group are using the same server list.

Polling drivers should be configured to stand between a communications driver tag and the I/O tags. Their function is to control the order and the frequency of data transfer between the I/O tags and the remote equipment via the communication driver tag.

When data is written from an output tag, it is immediately passed to the Polling driver tag and then on to the associated communication driver tag. Following each write, all I/O addresses will be read immediately so that feedback need not wait for the next polling cycle.

About Scan Intervals

All input tags associated with a Polling driver will use the Scan Interval configured for the Polling driver rather than their configured scan rate. The minimum Scan Interval is actually 1 second. If the Scan Interval is set to 0, it will scan as close to 1 second as possible, limited by how quickly scans are completed. If the Scan Interval is not set, it will default to 60 seconds. You cannot poll by External Trigger only. However, you can set an extremely large Scan Interval to minimize the number of nuisance scans.

The highest Scan Interval you can set is 2,147,483,647 seconds. That is roughly equivalent to once every 68 years.

The actual scan interval is limited by the speed of communication. If it takes 10 seconds to poll a station and the scan interval is less than 10 seconds, the driver will poll every 10 seconds.

If you require scan intervals measured in fractions of a second, configure those directly within your I/O tags and do not use a Polling driver to control timing.

See: Polling Groups and Scan Intervals

Alarming

When polling fails-over from the primary server to a backup, VTScada automatically generates an alarm with priority 3 (warning). You may control this using three application properties as follows:

  • PollDriverAlarmPriority. Defaults to 3 - Warning.
  • PollDriverAlarmDisable. Defaults to FALSE. In spite of the name, this property will decommission the alarm rather than disable it when set to TRUE.
  • PollDriverAlarmOnDelay. Defaults to 60 seconds. Avoids nuisance alarms from transient network issues.

A common need is to create an alarm that will be triggered, not on the first failure, but only after x consecutive polling cycles have failed. This can be done using an expression in an Alarm tag, created as a child of the Polling driver. You will need to know the following:

  • [*Driver]\LastTime will return the time stamp of the parent Polling driver's last successful poll.
  • Time stamps are measured in seconds since January 1, 1970. (Standard computer time stamp.)
  • Today()*86400 will give you the number of seconds from January 1, 1970 to midnight last night.
  • Now(60) will give you the number of seconds from midnight to the most recent minute, updating once a minute at the minute mark.

Combining that information, you can create the following expression to find the time since the last successful poll, updating on each poll and on the minute mark:

Today()*86400 + Now(60) - [*Driver]\LastTime

If your polling rate is two minutes (120 seconds) and you want an alarm after five unsuccessful polls (5 * 120 = 600), then your alarm expression becomes:

Today()*86400 + Now(60) - [*Driver]\LastTime >= 600

Learn more about expressions here: Expressions

Station Page Navigation

Pressing either F11 or F12 will open the Station Number dialog:

Polling Groups and Scan Intervals

Polling Driver properties I/O tab

The I/O tab for the Polling Driver tag consists of properties used to identify the communication driver tag to be associated with this polling driver, and to establish the poll group, the I/O device's sequence in the poll, and the interval at which the equipment associated with the communication driver tag should be polled for data.

Polling driver configuration

I/O Device

The I/O Device field enables you to specify the communication driver tag for which this polling driver will set the scan rate.

The I/O Device field can be used to associate this tag with a new or existing communication driver tag using the tag browser button. The button opens the Tag Browser, which displays only the existing communication driver tags for your application, and enables you to create a new communication driver tag using its New button.

Poll Group Name

Optional. If you have several Polling Drivers with similar configurations and especially if those drivers use the same port (possibly a radio) you may create an association between them by creating and assigning the same group name to all. There are several use-cases for this, as described in Polling Groups and Scan Intervals.

Poll Sequence Number

Relevant only if you have used the same Poll Group Name for several Polling Drivers, and if those drivers are configured with the same Scan Interval and Delay After Scan.

Because the interval and delay are the same, all drivers are placed on the group's "to-be-polled" list at the same time. The Poll Sequence Number specifies this driver's place in the sequence for the identified group. See: Polling Groups and Scan Intervals

Scan Interval

Measured in seconds with an actual minimum equal to the number of seconds it takes to poll or 1 second, whichever is greater. A value of 0 will poll at this minimum rate.
This setting is required. If there is no value, it will poll every 60 seconds by default.

Scan Interval Offset

Measured in seconds. Sets a delay after the Scan Interval that must pass before the driver is added back to the "to-be-polled" list. For example, if the Scan Interval is 10 and the delay is 2 (both measured in seconds) then the driver will be added back into the to-be-polled list at the 2, 12, 22, 32... marks, assuming that it takes less than 10 seconds to complete the poll. (10 second interval plus 2, not 12 second intervals of 12, 24, 36...)

See: Polling Groups and Scan Intervals

External Poll Trigger

May be linked to any tag or expression that transitions from a 0 or invalid state to a 1-state to trigger a poll.
Using a Trigger tag is a Best Practice. If you want to schedule polling to occur on a given schedule or in response to an operator’s command.
A couple of important notes about External Poll Triggers:
- An external poll signal will not cause a poll to occur if polling is disabled, or if fast scan mode is enabled.
- You cannot poll by trigger only. You must have a Scan Interval, but you can make it very large. (Max 2,147,483,647, roughly 68 years)

Disable Polling

Use to disable or re-enable the polling cycle for this poll driver. This does not mean that reads or writes are disabled because only the polling cycle is affected. A Toggle Polling Button widget can be drawn in your application to allow operators to change this value at need.