Software Toolbox Automation Tech Tips Blog

Tech Support Corner: Understanding TOP Server Device Scan Modes

Written by Jessica Dillon | Aug 11, 2022 6:00:00 PM

If you are reading this post, chances are you have configured your TOP Server project and are communicating with your devices successfully. Perhaps, you also have a client application successfully writing and/or reading to or from TOP Server. Did you know all TOP Server drivers provide several different Scan Modes for controlling how client requests affect the polling frequency for your configured devices? In fact, these Scan Modes apply to all client connection types including OPC UA, OPC DA and AVEVA SuiteLink.

Continuing our Tech Support Corner blog series, this short post will discuss the five Scan Mode options available in the TOP Server Device Properties. Each Scan Mode serves a different purpose depending on your specific scenario. We will explain each mode, giving you a better understanding of which mode is best for your situation. Correctly setting the Scan Mode to match the capabilities of your device will help to provide optimal performance for your automation system.

The Scan Mode is a configurable property at the device level in TOP Server, which means you can select a different mode for each individual device. This increases your control at a deeper level, giving you the flexibility to set the frequency of requests per device rather than per channel. This is ideal for bandwidth sensitive applications where more regulation is required. Having the power to set a scan rate at a minimum or static value gives users the ability to protect their network and ensure client applications will not request data more frequently than the system architecture will support, which can in turn cause performance issues.

Now, before we proceed, it's important to understand that synchronous and asynchronous device reads and writes are processed as soon as possible and are not affected by the specified Scan Mode. These Scan Modes affect Subscriptions only.

Respect Client-Specified Scan Rate Mode

Typically, scan rates are defined at the client application level, which is why this mode is the default mode for TOP Server. When selected, your devices are polled at the rate specified by the requesting client application. With this default mode, if the client requests data at a rate faster than what the TOP Server allows, the TOP Server will attempt its fastest possible scan rate, which is 10 milliseconds.

We say “attempt” because it is important to recognize that while TOP Server can technically be configured with a scan rate of 10ms, a number of factors determine whether that scan rate is realistically achievable including but not limited to:

  • Whether it’s an Ethernet or Serial driver/protocol
  • The quality of your network
  • The number of devices on the channel
  • The number of active tags being requested per device
  • How responsive the device is (i.e. if it takes the device 1 second to respond from the time it received the request, a 10 ms update rate will be impossible to fulfill through no fault of TOP Server, for instance)
  • How efficient the protocol is (i.e. Can multiple item requests be blocked into a single request? If yes, how many items can be requested at a time?)

Such external factors can mean that TOP Server may not always be able to keep up with the requested speed.

NOTE: If the TOP Server Alias Map is configured, the rate specified for your aliases supersedes any client specified scan rate even when this mode is selected.

Request Data No Faster Than Mode

This mode operates much like ‘Request Client-Specified Scan Rate’; however, there will be a limit to how fast the data can be requested. You can define a maximum scan rate, allowing clients to poll your devices only as fast as the rate specified. The valid range is 10 to 99999999 milliseconds, and the default is set to 1000 milliseconds for most drivers.

If a client requests data at a rate faster than the configured max scan rate, the faster rate will be ignored, and TOP Server will serve the data at the maximum rate specified in the Scan Rate property.

NOTE: When the server has an active client and items for the device, and the Scan Rate property is increased in this mode, the changes will take effect immediately. On the other hand, when the Scan Rate property is decreased, the changes will not take effect until all client applications have been disconnected.

Request All Data At Scan Rate Mode

For this Scan Mode, the scan rate is a fixed value that all subscribed clients will honor. The valid range is 10 to 99999990 milliseconds, and the default is 1000 milliseconds for most drivers. Because of the fixed set scan rate value, this mode eliminates the subscription-based polling control of a client. All tags will be scanned by subscribed clients at the configured rate, even if the clients requests data at different rates.

Do Not Scan, Demand Poll Only

This mode removes periodic polling from all connected clients. This includes not performing a read to get an item’s initial value when requested by a subscribed client.

Polling is instead controlled by using a Device-Level System Tag named _DemandPoll which exists per device in the server configuration.

When using the _DemandPoll system tag, the device will only be polled each time the client writes to the tag. Once triggered, the _DemandPoll item value will retain the value of 1 (True) until polling is complete. After polling is complete, the _DemandPoll item value will revert to the value of 0 (False). Follow the link for more information on TOP Server System and Statistic Tags. Clients may also issue synchronous or asynchronous explicit device reads for each individual item.

Device Demand Poll is useful for users that require full control of polling devices from their client applications. This is sometimes the preferred process for users in SCADA industries like oil and gas, water/wastewater, and others. This is because many client-side SCADA systems either do not have configurable scan rates or have scan rates whose minimum value is too long for data updates that are required by the SCADA operators.

Most such industries involve heavy use of geographically distributed telemetry communications which often requires granular control of when certain devices are polled to avoid network availability lapses, limited bandwidth, collisions and other performance issues. These industries also often find the TOP Server Scheduler Plug-in to be invaluable for such granular control over polling frequency, which is internal to TOP Server without requiring any additional configuration on the SCADA side.

Respect Tag-Specified Scan Rate Mode

This is the last mode available. It forces clients to respect the scan rate defined in the static tag properties. This allows the user to set scan rate limits on a per static tag basis, further expanding the flexibility to control the frequency of requests for each device.

NOTE: Dynamic tags are always scanned at the client-specified scan rate regardless of the Scan Rate mode specified in the device properties. This mode is only for statically defined tags in the TOP Server configuration. For more information on the difference between static defined tags and dynamic tags please refer to our detailed website section on “Static versus Dynamic Tags”.

What is the Initial Updates from Cache Setting?

Now regardless of the selected Scan Rate mode, you probably noticed the common setting Initial Updates from Cache available across all modes.

When enabled, this setting forces initial value updates for items to be pulled from the server cache (if available) rather than explicitly requesting them from the device when either a new client initially connects or when new items are added for an existing client connection. TOP Server’s default for this setting is disabled which allows the server to read the initial value from the device itself.

NOTE: Cache updates can only be provided when the new item references share the same of all the following properties:

  • Address
  • Scan Rate
  • Data Type
  • Client Read/Write Access
  • Scaling Properties

We hope this additional clarity of the different Scan Modes available with each TOP Server driver has been helpful in making decision towards optimizing the performance of your applications. As we touched on earlier, for users looking for the most granular control over when and which devices and tags are polled by TOP Server, we recommend exploring the available features included with the TOP Server Scheduler Plug-In. Please feel free to contact our support team with any questions, and don’t forget to subscribe to our blog to find out about the latest updates to TOP Server.