The ScadaLink Interface:
|ScadaTEC products (such as ScadaPhone and ScadaLogger)
use Windows based "Inter Process Communications" to obtain data point values
to log or report. Inter Process Communications (IPC) is an umbrella term
which covers several specific modes in which Windows based programs can
send and receive data to and from other Windows based programs. In ScadaTEC
products, the ScadaLink interface employs one of three varieties of IPC
to obtain data from and send data to the SCADA server: Dynamic Data Exchange
(DDE), OLE (Object Linking and Embedding), or OPC (OLE for Process Control).
|Note that the blue line indicating data flow has arrows
at both ends; this signifies that ScadaTEC products can not only read data
from the SCADA server but can also write data to the SCADA server. All
ScadaLink transactions are initiated by the IPC Client. The ScadaLink Interface
is only active when the ScadaTEC product being used is placed into Run
Configuring The ScadaLink Interface:
|The ScadaLink interface is configured and
tuned via the various options available under the ScadaLink menu item.
For the purposes of this document, ScadaPhone's ScadaLink interface will
be explored; other ScadaTEC products using the ScadaLink interface have
very similar controls.
In the following examples, we will explore each of the
seven menu items listed in the pull down menu below the ScadaLink main
menu item: Setup, Status, Scan
Rate, Response Log, Discrete
Representations, OPC Quality Options, and
ScadaLink Setup Window:
|All ScadaTEC products employing
the ScadaLink interface need to be configured to connect with the appropriate
server. This configuration is performed in the ScadaLink Setup window (which
is accessible via the ScadaLink | Setup menu items).
Note that ScadaLink Setup window has a box labeled Interface
Type which contains radio buttons to select the appropriate type of IPC
to use to communicate with the SCADA Server.
Most SCADA software supports the industry standard OPC;
however, some packages only support DDE or OLE. If you're not sure what
type of IPC communication is supported by your SCADA software, you can
browse the list of pre-configured servers by selecting the OPC radio button
on the ScadaLink Setup window and then clicking on the blue text below
the Selected Server Label (which reads "Intellution, Fix" in the example
to the right).
Clicking the blue label will display the server selection
list corresponding to the selected Interface Type. For purposes of this
example, click on the OPC radio button and then click the blue label.
|The OPC Server List window comes pre-configured with
link information for several popular SCADA packages. If your SCADA software
is listed here, you only need to highlight its entry in the list and click
the OK button.
If your SCADA package is not listed, you can add an appropriate
entry by clicking the New menu item. Clicking either the New or Edit menu
items opens the Edit OPC Server window.
|The Edit OPC window contains two pieces of configurable
information: the Name of the OPC server (for display and identification
purposes) and the Service (a.k.a. the Class Name) of the OPC server.
The Name field is not critical, it's just there to help
the user to identify the server to be used (i.e. it is the text string
that will be displayed in the OPC Server List window). The Service field
is critical to making a ScadaLink connection; the Service string is used
to make a Windows API call to establish the OLE/OPC conversation that will
be used to transmit data between ScadaPhone and the SCADA server.
Each SCADA software package has a unique Class Name name
which is registered within Windows. If you're not sure what your particular
SCADA package's Class Name is, you need to consult the documentation for
ScadaLink Status Window:
|Once the ScadaLink interface has been configured,
you can monitor its status by opening the ScadaLink Status window:
The ScadaLink Status window updates at a very high rate
of speed when a live connection is running, so it is virtually impossible
to see the results of each and every transaction. However, the values shown
on the Scan Rate line do provide useful feedback for system tuning. If
your project is having problems retrieving data from only a few data points,
you can examine the return value of each tag in the polling list by looking
at the ScadaLink Response Log.
ScadaLink Scan Rate Window:
|The rate at which ScadaPhone polls the SCADA
server for tag values can be configured via the Adjust Scan Rate window.
This window allows the system designer to adjust two parameters that control
The purpose for these adjustments is to provide a means for
optimizing ScadaPhone's update cycle time without monopolizing the CPU.
The rate at which ScadaPhone will attempt to read values
from the SCADA server.
The number of tags to read during each interaction with the
In the example to the right, the settings indicate that
ScadaPhone will read 3 tags from the SCADA server, wait 55 milliseconds,
and then read again. In this example, ScadaPhone is reading 39 tags per
second, which updates every tag in the polling list every 5.6 seconds (thus
inferring that there are approximately 218 tags in the polling list).
ScadaLink Response Log:
|The ScadaLink Response Log shows the response
received for each tag in the ScadaLink polling list as well as a time stamp
to indicate the last time this point was updated. This is useful to trace
down problems with particular data points that are not being returned correctly
from the SCADA server.
In some cases an error code or a blank may be returned.
If this is the case, the tag name in the ScadaPhone tag database is probably
not spelled correctly or there can be problems with character case (i.e.
in some SCADA systems, "tag1" is not considered to be the same as "TAG1").
Another common error happens when tags are defined to
be Discrete in ScadaPhone but they are actually defined as Analog in the
SCADA system tag database. When this happens, ScadaPhone will alert you
by displaying the Discrete Expected, Analog Received window:
If the Discrete Expected, Analog Received window
appears, the only way to fix the problem is to switch ScadaPhone into
Development mode and remove the offending tags from the Discrete's tab
and move them to the Analogs tab.
In addition to the Analog/Discrete problem described
above, another variety of ScadaLink response problems can arise if the
ScadaLink is configured to use DDE and the SCADA server allows the system
designer to assign non-standard string values to indicate True and False
values for discrete tags. Intellution iFix provides a good example of this.
|In iFix, the system designer can specify any string to
represent True and any string to represent False (e.g. "Running" can be
assigned to True and "Stopped" can be assigned to False). If ScadaPhone
is configured to use DDE to communicate with the SCADA server, these strings
are returned when the tag is polled (an OPC connection typically returns
"1" or "0"). Whenever ScadaPhone receives one of these non-standard responses,
the Discrete Representations window is displayed.
The Discrete Representations window provides a means for
translating the non-standard responses into meaningful responses. In the
example above, there are 3 non-standard responses listed. The first two
are iFix error codes indicating that some of the tags in ScadaPhone's polling
list are not valid; the third item is the string "STOPPED". In order to
configure ScadaPhone to recognize "STOPPED" as being False, you must highlight
"STOPPED" in the unrecognized response list, select the "FALSE, OFF, 0"
radio button, and click the assign button. After assigning a value to "STOPPED",
the Close button can be clicked to close this window.
OPC Quality Options:
| Each time the ScadaLink interface polls an OPC
server for a tag value, an additional "quality" attribute is returned along
with the tag value. The quality attribute can be one of 3 values: Good,
Bad, or Uncertain. This attribute conveys whether or not the SCADA server
has had problems retrieving the tag value from field devices such as a
PLC or other SCADA nodes via a network connection.
ScadaPhone can be configured to react to this attribute
or to ignore this attribute. The OPC Quality Options window has 3 settings
to determine whether or not ScadaPhone will update its tag value database
based on the value of this quality attribute.
|You may find it necessary to modify these settings if
tag values in ScadaPhone are not being updated properly. By default, the
ScadaLink interface ignores any tag value that has an OPC quality attribute
less than Good; However, in some cases valid data can be returned with
an attribute set to Uncertain or Bad. You can determine the quality that
is being returned with each ScadaLink tag by examining the ScadaLink
Server Startup Delay:
|Once the ScadaPhone project has been completed and ScadaPhone
is being put into service in the field, it is common practice to place
a shortcut to ScadaPhone.exe in the Startup program group. This insures
that in the event of a system shutdown, ScadaPhone will be launched when
the computer has been restarted.
The only problem with launching ScadaPhone automatically
is that, in most cases, ScadaPhone loads and starts running more quickly
than the SCADA server software. If ScadaPhone attempts to open a link to
the SCADA server before it has been completely initialized, the SCADA server
may be disrupted to the point that it is unable to finish its start up
|To combat this problem, the ScadaLink interface provides
a configurable Server Startup Delay which tells ScadaPhone how long to
wait before attempting a connection with the SCADA server. This delay allows
the SCADA server to fully initialize and start running before ScadaPhone
attempts to communicate with it.
In order to properly configure this delay, you should
launch you SCADA software and measure how long it takes to fully initialize
and commence running. Once you've determined the length of time required
for a full SCADA startup, configure ScadaPhone's Server Startup Delay to
wait for that amount of time plus 10 seconds (to allow for variation).