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.

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.

All input tags associated with a Polling driver will use the scan interval configured for the Polling driver rather than their configured scan rate.

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.

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.

 

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. When the scan interval is reached, the driver is placed back on the "to-be-polled" list. For example: If, as a result of slow communications, it takes 10 seconds to poll a station, a driver with a one-second scan interval can scan only once every 10 seconds. But, thanks to its one-second scan interval, it is placed back on the list immediately after each interval passes, and will be next in line for the following round of scans.

If the Scan Interval is set to 0, the I/O device is scanned for data as fast as is possible, defaulting to 1 second. Note that Polling drivers were designed for use with radio communication, therefore the fastest possible scan interval is one second. Faster intervals do not make sense for the intended purpose. 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

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. A Trigger Tag should be used here, if you want to schedule polling to occur on a given schedule or in response to an operator’s command. Note that an external poll signal will not cause a poll to occur if polling is disabled, or if fast scan mode is enabled.

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.