SDG Implementers Guide
SDG Implementers Guide
This Documentation and its’ associated distribution media contain proprietary information of Triangle
MicroWorks, Inc. and may not be copied or distributed in any form without the written permission of
Triangle MicroWorks, Inc.
Copies of the source code may only be made for backup purposes.
THIS SOFTWARE LICENSE AGREEMENT IS BEING PROVIDED TO YOU AS PART OF A TRIAL FOR
REVIEW BEFORE PURCHASE. THE FOLLOWING LICENSE AGREEMENT IS A CLICKTHROUGH LICENSE
AGREEMENT THAT IS SHOWN DURING THE INSTALLATION OF THE SOFTWARE. YOU MUST AGREE
TO ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT IN ORDER TO INSTALL THE SOFTWARE.
THEREFORE, IF YOU DO NOT AGREE TO ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT, DO
NOT INSTALL THE SOFTWARE.
TRIANGLE MICROWORKS, INC. License Agreement and Warranty
THIS IS A LEGAL AGREEMENT BETWEEN YOU (“YOU”) AND TRIANGLE MICROWORKS, INC.
(“TRIANGLE MICROWORKS”). TRIANGLE MICROWORKS IS WILLING TO LICENSE THE
TRIANGLE MICROWORKS SOFTWARE AND RELATED DOCUMENTATION PURCHASED BY YOU
AND KNOWN AS SCADA DATA GATEWAY (THE “SOFTWARE”) TO YOU ONLY UPON THE
CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS LICENSE AGREEMENT
(THE "AGREEMENT"). PLEASE READ THE TERMS AND CONDITIONS CAREFULLY BEFORE
CLICKING ON THE “I AGREE” BUTTON, AS CLICKING ON THIS BUTTON WILL INDICATE YOUR
ASSENT TO THEM. IF YOU DO NOT AGREE TO THE BELOW TERMS AND CONDITIONS, THEN
CLICK ON THE “I DO NOT AGREE” BUTTON. IF YOU DO NOT AGREE TO THE BELOW TERMS AND
CONDITIONS, TRIANGLE MICROWORKS IS UNWILLING TO LICENSE THE SOFTWARE TO YOU.
1. Subject to the following terms and conditions, Triangle MicroWorks grants to you a nonexclusive, nontransferable
limited license to install and use the Software solely for your internal business purposes and subject to the limitations in
this Agreement. There are three mechanisms to license the Software. The “Seat License” is a PC based software
license that is installed on a single computer and is solely for the use of the Software by you on a single computer at
any one time. The “Hardware Dongle License” is a license that is stored on a dedicated USB hardware device that can
be shared between computers by physically moving the Hardware Dongle License. The Hardware Dongle License is
solely for the use of the Software by you on a single computer at any one time. The “Network License” is a license that
is stored on a computer that can be shared across a local area network. The Network License is solely for the use of the
Software by you on a single computer at any one time. The Network License may be installed on a corporate network
and shared locally. The Network License cannot be shared outside of your company. You may physically transfer or
copy the Software on to another computer; provided, however that each license instance may not be used on more than
one computer or device at any given time. Subject to the foregoing limitation, you are entitled to copy the Software into
any machine-readable or printed form for backup purposes in support of the use of the Software on a single computer
by you. Any copy of the Software permitted by the preceding provision shall include a copyright notice of Triangle
MicroWorks.
2. You may use the Software solely for the applicable term (i.e., period of time) as set forth below.
If you have licensed the Software for a free trial period (a “Trial License”), the term of the Software license
will be for 21 days. You understand and acknowledge that after the 21-day period and unless otherwise
extended by Triangle MicroWorks, in its sole discretion, the Software will automatically deactivate and cease
to operate. You agree that you are solely responsible for backing up all data used in connection with the
Software and that Triangle MicroWorks will not be responsible to you for any damages, claims, loss or
expenses whatsoever in connection with deactivation of the Software. At the conclusion of the Trial License,
you may purchase a Term License or a Perpetual License, as agreed to by you and Triangle MicroWorks.
If you have licensed the Software for a fixed period of time and not on a trial basis (a “Term License”), the
term of the Software license will be the period of time agreed to by you and Triangle MicroWorks. At the end
of that period of time, your use of the Software will terminate, and the Software will automatically deactivate
and cease to operate. You agree that you are solely responsible for backing up all data used in connection
with the Software and that Triangle MicroWorks will not be responsible to you for any damages, claims, loss
or expenses whatsoever in connection with deactivation of the Software except as explicitly set forth herein.
At the conclusion of the Term License, you may purchase an additional Term License or a Perpetual License,
as agreed to by you and Triangle MicroWorks.
If you have paid a one-time fee for a perpetual license, then your term of the Software License is perpetual (a
“Perpetual License”) and subject to termination only as set forth herein.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | iii
SCADA Data Gateway | Implementers Guide
3. You may not transfer the Software to another entity or person. You shall not modify, translate, reverse assemble or
reverse compile in whole or in part the Software. You shall not rent, sell, time-share, lease, sublicense, transfer, copy,
disclose, display or otherwise make available the Software or copies thereof to others, except as provided herein. Any
breach of the above terms and conditions shall immediately terminate your license under this Agreement. You hereby
certify and agree that the Software will not be shipped, transferred, or re-exported, directly or indirectly, into any
country prohibited by the United States Export Administration Act and the regulations thereunder, and the Software
will not be used for any purpose prohibited by the same.
4. You may not erase, delete or modify any copyright, trademark or other proprietary notices included on the Software.
You agree that if you infringe Triangle MicroWorks intellectual property rights or exceed the scope of permitted use of
this license, Triangle MicroWorks will be irreparably injured and may obtain a court order to enjoin you from further
use of the Software.
5. This license is not a sale. Title, ownership rights, and intellectual property rights in and to the Software shall remain
in Triangle MicroWorks. You agree to abide by the copyright laws and all other applicable laws of the United States
and international treaties. You acknowledge that the Software in source code form remains a confidential trade secret of
Triangle MicroWorks. Failure to comply with the above restrictions will result in automatic termination of this
Agreement and will make available to Triangle MicroWorks other legal remedies.
6. Notwithstanding anything herein to the contrary, you acknowledge and agree that Triangle MicroWorks may
terminate your license to the Software if you have failed to comply with any of your obligations under this Agreement.
You shall not be entitled to a refund in the event of termination by Triangle MicroWorks pursuant the foregoing
sentence.
7. By purchasing a Term License or a Perpetual License to the Software you are automatically subscribed in the
Software Maintenance & Enhancement Plan (the “Plan”) for a period of one (1) year following the date of purchase
(the “Purchase Date”) of the license, or if shorter, the term of your Term Licensee (such initial period referred to as the
“Initial Maintenance Period”). Upon expiration of the Initial Maintenance Period, the Plan may be renewed on an
annual basis subject to payment by you of the applicable then-current annual fee. This Plan may provide a cost
effective method for upgrading to the most recent release version of the Software. The Plan also provides technical
support by telephone, fax, or email. The Initial Maintenance Period for Perpetual Licenses is free. The annual fee for
the Plan for Perpetual Licenses after the first year is 25% of the Perpetual License purchase price; provided, however
that Triangle MicroWorks, in its sole discretion, may adjust the annual fee at any time. The annual fee for the Plan for
Term Licenses depends on the specific terms of the Term License. Although Triangle MicroWorks has no obligation
to provide upgrades to the Software under the Plan, Triangle MicroWorks may from time to time provide upgrades.
Any upgrades to the Software shall be deemed to become part of the Software and shall be subject to the terms and
conditions of this Agreement. All Plan annual fees are nonrefundable.
8. For Term Licenses and Perpetual Licenses only, Triangle MicroWorks warrants that the Software shall perform
substantially as described in its documentation for a period of sixty (60) days from the Purchase Date. In the event of a
breach of the foregoing warranty, the sole obligation of Triangle MicroWorks and your sole remedy is that Triangle
MicroWorks will provide you with a refund of the most recent license fee paid for the Software. Triangle MicroWorks,
as a condition to providing such refund, may require that you sign an affidavit certifying that you have deleted or
destroyed all copies of the Software in your possession. Triangle MicroWorks makes no warranties with respect to
Trial Licenses. Except as set forth in this Section 8, THE SOFTWARE IS PROVIDED "AS IS" WITHOUT
WARRANTIES OF ANY TYPE, AND TRIANGLE MICROWORKS HEREBY EXPRESSLY DISCLAIMS ALL
WARRANTIES, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
MERCHANTABILITY, TITLE, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
10. You may terminate the license granted under this Agreement at any time by destroying or deleting all copies of the
Software in your possession or control. In the event of termination of this Agreement for any reason, all the sections of
this Agreement will survive except for Sections 1 and 2.
11. This Agreement shall be governed by and construed in accordance with the laws of the State of North Carolina,
without regard to the choice of law provisions thereof. The United Nations Convention on Contracts for the
International Sale of Goods shall not apply to this Agreement. Any dispute or claim arising out of, or in connection with,
this Agreement shall be finally settled by binding arbitration in Raleigh, North Carolina, in accordance with N.C. Gen.
Stat. § 1-569.1 et seq. (the “Uniform Arbitration Act”) and the then-current rules and procedures of the American
Arbitration Association by one (1) arbitrator appointed by the American Arbitration Association. The arbitrator shall apply
the law of the State of North Carolina, without reference to rules of conflict of law or statutory rules of arbitration, to the
merits of any dispute or claim. Judgment on the award rendered by the arbitrator may be entered in any court of competent
jurisdiction. The parties agree that, any provision of applicable law notwithstanding, they will not request, and the
arbitrator shall have no authority to award, punitive or exemplary damages against any party. In the event that any
arbitration, action or proceeding is brought in connection with this Agreement, the prevailing party shall be entitled to
recover its costs and reasonable attorneys' fees. In the event that the above arbitration provision is held invalid or
unenforceable, any dispute with respect to this Agreement shall be brought and heard either in the North Carolina state
courts located in Raleigh, North Carolina or the federal district court, located in Raleigh, North Carolina. In such event,
the parties to this Agreement each consent to the in personam jurisdiction and venue of such courts. The parties agree
that service of process upon them in any such action may be made if delivered in person, by courier service, by
telegram, by telefacsimile or by first class mail, and shall be deemed effectively given upon receipt.
12. This Agreement sets forth the entire agreement between you and Triangle MicroWorks pertaining to the licensing
of the Software and supersedes in its entirety any and all written or oral agreements previously existing between the
parties with respect to such subject matter. If any provision of this Agreement is held invalid or unenforceable, such
provision shall be revised to the extent necessary to cure the invalidity or unenforceability, and the remainder of this
Agreement shall continue in full force and effect. In the event of any conflict between any provision of this Agreement
and any applicable law, the provision or provisions of this Agreement affected shall be modified to remove such
conflict and permit compliance with such law and as so modified this Agreement shall continue in full force and effect.
This Agreement may not be assigned without the consent of Triangle MicroWorks.
Triangle MicroWorks, Inc. 2840 Plaza Place, Suite 205, Raleigh, North Carolina 27612 USA (919) 870-5101
Additional References:
SDG Quick Start Guide.pdf
SDG 61850 Quick Start Guide.pdf
SDG What’s New (located on the Triangle MicroWorks website)
Office:
Triangle MicroWorks, Inc
2840 Plaza Place
Suite 205
Raleigh, North Carolina 27612
Phone: 919.870.5101
Fax: 919.870.6692
Email: [email protected]
Website: http://www.trianglemicroworks.com
Table of Figures
Figure 1: SCADA Data Gateway ...................................................................................................................... 14
Figure 2: SDG Software Architecture ............................................................................................................... 15
Figure 3: Slave to Master Component Data Collection .................................................................................... 16
Figure 4: Commands passed thru the SDG ....................................................................................................... 16
Figure 5: Connection and Identification of Data Points ................................................................................... 17
Figure 6 Communication Channels.................................................................................................................. 18
Figure 7 Sessions.............................................................................................................................................. 19
Figure 8 Sectors ............................................................................................................................................... 20
Figure 9 IEC 61850 Client in the SDG .......................................................................................................... 112
Figure 10 Add IEC 61400-25 Menu Item ....................................................................................................... 113
Figure 11 Add IEC 61400-25 Alarm dialog screen ....................................................................................... 113
Figure 12 Find Alarms Array dialog screen .................................................................................................. 114
Figure 13 Alarms Array Node ........................................................................................................................ 114
Figure 14 Add Alarm Context Menu .............................................................................................................. 115
Figure 15 Add Alarm MDO dialog screen .................................................................................................... 116
Figure 16 Configured Alarm MDOs ............................................................................................................. 116
Figure 17 Example of Master to Slave and Master to Master Association .................................................... 208
Figure 18 TMW Simple OPC Client ................................................................................................................ 210
Figure 19 Event Log Record Format ............................................................................................................. 235
1. Overview
The Triangle MicroWorks SCADA Data Gateway (SDG) application is a communication protocol driver. It
provides the values that the protocol transmits over the wire. It collects data from OPC Server, IEC 60870-5,
DNP3, IEC 61850, ICCP/ICCP, or Modbus Slave devices and then supplies this data to other control systems
supporting OPC Client, IEC 60870-5, DNP3, IEC 61850, ICCP/ICCP, and/or Modbus communication
protocols.
The SDG interface retrieves data from external Slave Remote Devices through IEC 60870-5-101, -103, and -
104, DNP3, IEC 61850, or OPC Client Master Components as shown above in Figure 1.
The SDG can also issue control commands to remote Slave devices through these Master Components. These
data and command points can then be transferred to Control Centers or other Master Devices through Slave
Components including OLE for Process Control (OPC).
The SDG comes with all the components depicted in Figure 2. Each component is individually licensed as
described below. Only licensed components can be configured and used in a specific SDG installation.
Multiple connections to remote master or slave devices can be made with each protocol component.
The OPC Alarm and Event Server reports events to OPC Alarm and Event Clients running on the
same or a different computer.
The OPC Server Component is a specific Slave Component that communicates through the OPC
interface to other Windows software applications running on the same or a different computer.
1.3.3.1 Sequence from remote Slave devices to Master Component data collection
1. A Master Component collects data from remote Slave devices (e.g. RTUs or IEDs)
2. The Master Component presents the data to the database
3. The Database then presents the data to the Slave Components
Slave Data Points are created and associated with Master Data Points or Equations in the Point Mapping file.
Master Data Points are placeholders for data calculated by equations or collected by Master Components from
Remote Slave Devices. Slave Data Points are placeholders for data in the SDG that are available to remote
Masters. The identity of the sector for each data point specified in the Point-Mapping file (channel, link
Address, ASDU address) must correspond to a sector defined in tmwgtway.ini.
Data points are identified by their physical connection to the SDG and the addressing within the
communication protocol configured for the remote device. The following diagram illustrates how the SDG
connects to and identifies each data point. While this diagram shows a Master Component of the SDG
connected to several remote slave devices, the same point identification scheme is used for Slave Components
communicating with remote Master devices.
Each communication channel has a set of parameters, such as: baud rate, parity, and number of data and
stop bits. These parameters are set in the “Physical Layer” section of tmwgtway.ini.
1.4.2 Sessions
A session is a communication connection between the SDG and a remote device. A session is identified by a
specific link address on a communication channel. If more than one device is attached to a SDG
communication channel (multi-drop topology), the link address is used to select the device or SDG Slave
Component that should receive the message. The session establishes a virtual connection between the SDG
and a remote master or slave device.
IEC60870-5-104 only supports one session per channel; hence the session or link address is not
required for this protocol.
Communication protocol specifications supported by the SDG use the ISO protocol standards for the
Application (7), Data Link (2), and Physical (1) Layers. It should be noted, the term session in this product
and the associated documentation does NOT refer to the defined ISO Session (5) Layer.
Figure 7 Sessions
The parameters associated with the session include an index to the communication protocol and most of the
communication protocol related settings. Each session using the same communication channel must have a
unique data link address. Since the IEC60870-5-104 only supports one session per channel, the data link
address is not required. For more information, refer to “Session Configuration” and subsequent sections in
tmwgtway.ini.
PC COM ports are typically RS-232 interfaces, which only permit connection to a single remote
device. To permit connection to multiple remote devices, as shown in Figure 7, it may be necessary
to use some form of multi-drop interface device such as an RS-232 to RS-485 converter.
1.4.3 Sectors
In IEC 60870-5 protocols, each session may contain more than one sector. Each Sector is a group of data
contained within a single Session. In these protocols, each sector corresponds to a single Common Address
of ASDU. DNP3 does not support sectors and hence does not require a Common Address of ASDU.
Figure 8 Sectors
Each sector is identified in tmwgtway.ini by both its session index and sector index. The sector ASDU
Address must be unique within the session. If a remote Slave device or a Slave Component consists of only
one sector, the ASDU address is normally set to the same value as the link address. Refer to the “Database
Configuration” section of tmwgtway.ini.
The following illustration represents a typical set of master channels using 3 modems:
In the illustration above, there are 6 Modem Pool Channels that share 3 physical modems. Each of the
Modem Pool Channels is configured to connect to a single Modem Pool. In addition it is assumed that the
sessions are Master Sessions. The Modem Pool is responsible for managing the 3 Modems. As the modems
become available and requests are made by the Modem Pool Channels, the Modem Pool handles these
requests and provides them to the available modem(s).
To use this type of configuration effectively, the communications load on each Modem Pool Channel must
not be continuous (i.e. The Idle timeout value should be utilized to force a modem to become available when
there are no communications requirements on a Modem Pool Channel). The rate at which requests are made
of the slave device should be greater than the idle timeout. This allows each channel to take turns using the
modems. When the idle timeout occurs, the modem is made available for use by another channel. Each
physical modem should be configured for dial out and be enabled (these are the default settings). Each
Modem Pool Channel should also be configured for dial out with a telephone number specified for its
corresponding slave device.
Note: the minimum requirements are for very small SDG configurations with very limited data throughput
requirements.
Listed below is information on the limitations of the SDG to consider when trying determining system
performance:
The 250 session limit is per SDG. For example, you could have one channel with 250 sessions; or 250
channels with one session per channel; or 50 channels with 5 sessions per channel; etc.
In addition to installing the required files on your system, the installation application performs the following
steps:
1. Creates entries in the StartAll Programs menu for the selected protocols.
2. If running on Windows NT/XP it will run the setup.exe program found in the installation directory to
install the drivers required by the licensing software.
To run the SDG application, select StartAll Programs->Triangle MicroWorksSCADA Data Gateway
folder from the Start Menu or double-click the tmwgtway.exe file located in the installation directory. Refer to
the Quick Start Guide for information on configuring the SCADA Data.
To reinstall or remove the SDG application, run the installation process again or select ‘Add/Remove
Programs’ from the Control Panel.
The SDG uses the Sentinel LDK licensing system from SafeNet, Inc. This is an advanced and full
featured licensing system that allows you to manage your license keys for Triangle MicroWorks
products. The system provides the capability to transfer licenses to other machines without needing
to contact Triangle MicroWorks. All of the capabilities of the system are described in the document
called Guide to Triangle MicroWorks Licensing. This document fully describes how to convert your
demo version of this product into a fully licensed version. The document is found in the installation
directory for the SDG software.
No login required
Service can run under a separate user account
Application starts automatically when the computer boots
Casual users cannot accidentally stop the application
The SDG can run as a service or as an interactive application, it cannot run as both at the same time. The
interactive application (i.e., GUI SDG) mode is used to configure the SDG communications parameters,
point mapping, etc. This configuration process results in an INI and CSV file that the service version of the
SDG will later use to configure itself when it starts.
The SDG configuration can be created and tested interactively using the GUI version and then, when the
configuration/testing process is complete, the SDG service can be started as a service from the service
control panel as outlined below. To make changes to the configuration the service must be stopped before
the GUI can be started.
By default, the SDG GUI does not ask if the SDG service should start or start the service automatically.
To have the SDG service automatically start when you exit the GUI, check the ‘Automatically Start SDG
Service on GUI exit’ radio button. When the GUI starts, if the service is running you will get the option to
shut the service down. As stated above, the service and GUI cannot run at the same time.
To have the SDG GUI ask if the service should be started when you exit the GUI, check the ‘Ask at SDG
GUI Exit’ radio button.
To start/stop and configure the SDG service startup up behavior, the service control panel is used. It can be
accessed by selecting All ProgramsTriangle MicroWorksSCADA Data GatewaySDG Service
ConfigurationStart or Stop SDG Service from the Start Menu. The service control panel is shown below:
The name of this service is GTWService. Right-clicking on this entry will bring up a context menu that can
be used to Start/Stop and set the properties of the GTWService. When setting the properties the following
dialog appears:
The Event log along with the protocol analyzer log should be used to troubleshoot problems.
3. User Interface
3.1 Main Window
The SDG User Interface is a Multiple Document Interface Application, with 2 document types; a
Configuration document and a Protocol Analyzer document. The main window is a container for both of
these document types. Each document type can have multiple views of the same document data, allowing
the user to see the configuration and protocol information in various different ways. The menus are context
sensitive depending on which document type is currently selected. In addition context sensitive help is
provided for certain fields on the configuration dialog boxes. Below is a screenshot of the main SDG
application window with the configuration document/view at the top and the protocol analyzer
document/view on the bottom.
On the left is a hierarchical view of the current SDG configuration which includes:
(1) Gateway at the root of the hierarchy
The configured devices with the:
o (2) Channel
o (3) Session
o (4) Sector
o (5) Data Type(s)
In the upper right is a list of points (6), which displays their current value, quality, etc (if appropriate). In
the lower right is the Point Mapping view (7), which displays the current mapping of master to slave data
points. The configuration user interface is used to both configure as well as monitor the SDG.
(1) Save - Saves the current configuration to the tmwgtway.ini and tmwgtway.csv files.
(2) Exit with Save - Exits the SDG and saves the INI and CSV files.
(3) Exit without Save - Exits the SDG without saving the INI and CSV files.
(1) Add - Add SDG objects (Channel, Session, etc) to the configuration.
(2) Delete - Removes an object from the configuration (if a higher level item is removed, all
objects beneath the item are also removed).
(3) Properties - Opens a dialog screen for the current object for viewing and modifying the
properties of the object.
All Edit menu commands operate on the currently selected object in the SDG
configuration window.
(1) New Analyzer Window - Displays a new Analyzer window. There can only be one window at a
time.
(2) New Configuration Window - Displays a new Configuration window.
(3) Cascade - Arranges the SDG windows as cascade.
(4) Tile Vertical - Arranges the SDG windows as vertical tiles.
(5) Tile Horizontal - Arranges the SDG windows as horizontal tiles.
(6) Switches between the currently opened windows in the SDG.
At the top is the Filter bar (1) which determines the content of the Protocol Analyzer display by selecting
checkboxes to customize the filters.
On the left is the Device Filter (2). This filter allows you to select which channels, sessions, and sectors
will get displayed.
On the right is the Communications Display, Protocol Analyzer log, (3) which shows the communications
between the SDG and external devices.
**
The Protocol Analyzer buffer will then be saved to the specified file, which will also
become the current analyzer file. All subsequent save operations will save the protocol
analyzer log to this file.
(1) Copy – Copies the selected text in the Protocol Analyzer log to the Windows clipboard.
(2) Find Text – Opens a dialog screen for searching the Protocol Analyzer log for a particular text.
(1) Set Buffer – Controls the size of the Protocol Analyzer log buffer.
(2) Font – Set the font for the Protocol Analyzer display.
Filter (1) - contains a checkbox for each of the protocol layers (User, Application, Transport, Data
Link, and Physical, MMI, OPC). Only layers that are checked will be displayed in the Protocol
Analyzer windows. The Errors check box determines whether error messages will be displayed in
the Protocol Analyzer window.
Database (2) - controls whether Static, Cyclic, and Event Header and Data are displayed.
Timestamp (3) - determines whether timestamps will be displayed for all messages in the Protocol
Analyzer window.
Window Controls (4)
o Pause checkbox - when checked, pauses the Protocol Analyzer display. Use caution when
using this option because data can be lost while the display is paused.
o Clear button - clears the Protocol Analyzer display window.
The Clear All and Set All buttons (1) provide a convenient means of selecting or clearing all devices layers.
Checking and un-checking an item does not affect the items below it. Thus, it may be necessary to
expand items in order to fully view which items will be displayed. For example, in the above diagram,
the MDNP channel is not checked. However, it is possible that the Session Layer below the MDNP
channel is checked.
Changes made to this box from the Print option will be used for the current print session. Changes made to
this box from the Print Setup item will be used by subsequent Print operations unless the Print dialog box is
used to override them at the time of printing
The Print option from the File menu displays the dialog box shown above. This dialog box can be used to
select a printer, select printer options, and number of copies to print.
Option Description
Percentage of Lines to Remove the number of lines that are removed when the buffer becomes
When Full full (in order to make room for new lines)
Max Protocol Analyzer Line sets the maximum number of lines in the display window
Count
Enable Save to File Determines whether the Protocol Analyzer log is saved to a file
automatically. This option is convenient for saving traces that are
larger than the buffer size. When this block is checked you can
specify the path and name of the file where the log will be saved
Property Description
Auto Refresh Time (ms) sets the rate at which the point list in the configuration window is
refreshed. Setting this value to 0 disables the refresh operation. When
enabled the values of all the points displayed in the list are updated from
the internal SDG database at the rate specified.
Initial Threads in This setting is related to SDG performance. The default value is 4, and
Thread Pool requires a SDG restart to take, this is for performance improvements so
that the GUI is a bit more responsive and work items can be spread
across multiple cores. The WorkItemQSize MDO at the root of the SDG
provides an indication of the current number of work items ready to be
processed by the thread pool. This setting is stored in the registry and as
a result applies to all running instances of the SDG. The value must be
>= 1 (i.e. cannot be zero). Ideally this is set to number of cores on the
computer the SDG is running on.
* The Paths group is useful to define the location of the SDG INI file and
help file. Note that if running as an OPC server (started by an OPC
client), the SDG needs this information to accurately locate the INI file
and help file. When started by an OPC client, the default path if not
specified, is dependent on the OPC client and operating system (this
usually defaults to C:\winnt\system32).
Disable Save On Exit disables saving the configuration files automatically when the SDG exits.
INI Dir (Paths) path to the SDG INI file folder
HELP Dir path to the SDG Help file folder
INI File (Service) path to the INI file that will be used when the SDG is run as a service
Startup Options parameters available for setting the SDG Service start-up options when
the SDG GUI is exited.
61850 and ICCP Full 7 As Per protocol for both 61850 and ICCP, this will control how the
Layer Stack Addressing server looks at the 7 Layer stack for incoming client connections. If
checked, it will allow multiple servers to start on the SAME port and a
connecting client will connect to the appropriate server based on the 7
layer stack settings. See the protocol reference manuals for more details.
Property Description
Use System Clock If set to true, the date and time will always be read from the Windows
system clock as opposed to an internally maintained clock. The internal
clock is initialized to the Windows system clock at startup but will be
adjusted whenever clock synchronization is received from an external
master. You would generally set UseSystemClock to true if you have an
external clock synchronization mechanism that synchronizes the Windows
system clock outside the SDG. In this case it is advised that
AcceptClockSync be set to false.
Event Log File Name Event Log File Name and Path. See manual for a description of the
available %xxx property keywords.
Event Log Record Event Log record format. See manual for a description of the available
Format %xxx property keywords.
Event Log File Flush Maximum amount of time between writing to the event log file before it is
Period flushed to disk. Set to zero to inhibit explicit flushing. This parameter
may be useful if another application reads the event log file to obtain event
data in real time.
SOE Queue File Name Sequence Of Events Queue File Name and Path. [DEFAULT:
SDG_SOEQueueFile]
Enable SOE Queue If set to true, the SOE Queue will be enabled. Possible values are 0, 1,
'FALSE', or 'TRUE'. [DEFAULT: FALSE]
OPC Client Status The interval at which an OPC client requests status information from its
Update Rate (ms) server. If the client does not wish to request status updates set this to 0.
Possible values are from 0 to 30000. [DEFAULT: 1000 ms]
OPC Time Source Specifies the source of the time tag for OPC data points. The possible
values are “Update” or “Reported.” “Update” means the time, relative to
the SDG system clock, at which the data point was last updated.
“Reported” specifies the reported time of the most recent event that caused
the data to change. Reported time will be relative to the remote slave
device's system clock except on initialization where the SDG's system
clock is used until the first event with time is received. Static data polling,
or received events which do not specify a reported time, may cause a
specific data point's value to change without an event being generated;
hence the event time will not change.
OPC Event Time Specifies the source of the time tag for OPC Alarm and Event data points.
Source The possible values are “Update” or “Reported”. “Update” means the
time, relative to the SDG system clock, at which the data point was last
updated. Reported specifies the reported time of the event that caused the
data to change. Reported time will be relative to the remote slave device's
system clock except on initialization where the SDG's system clock is used
until the first event with time is received. Static data polling, or received
events which do not specify a reported time, may cause a specific data
point's value to change without an event being generated; hence the event
time will not change.
OPC XML DA Server Specifies the name used by an OPC XML DA client to connect to the
Name SDG. With the INI file defaults a local opc xml da client can connect to
the SDG as follows: http://localhost:8081/SDG
OPC XML DA Server The TCP/IP port for the OPC XML DA server. With the INI file defaults a
Port local opc xml da client can connect to the SDG as follows:
http://localhost:8081/SDG
Group Description
Errors Each bit enables (1)/disables (0) a reason to log errors, such as
changes in number of link layer checksum failures or in link session
on-line/off-line status, in the event log file. If 0, nothing will be
logged.
Diagnostics Each bit enables (1)/disables (0) a reason to log diagnostic data, such
as change to the number of transmitted frames, in the event log file.
If 0, no diagnostics data will be logged.
Control Each bit enables (1)/disables (0) a reason to log control data, such as
changes to pollEnabled or to GeneralInterrogationPeriod, in the
event log file. If 0, nothing will be logged.
Equations Each bit enables (1)/disables (0) a reason to log results of equations.
If 0, no equation results will be logged.
OPC Data Each bit enables (1)/disables (0) a reason that an item subscription
Access through the SDG OPC Data Access Server should enable OPC
Subscription Alarm and Event notifications for the item. This mask overrides all
other masks if enabled. If 0, no OPC Alarm and Event notifications
will occur as a result of an item subscription.
Use OPC If true, all OPC AE events are reported as simple events. Possible
Alarm and values are 0, 1, 'FALSE', or 'TRUE'.
Event Simple
Events
The Edit at Runtime checkbox allows you to make changes to the SDG properties
without having to restart the application. If you make changes and this option is not
checked, then you will need to re-start the SDG for the changes to take effect.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 49
SCADA Data Gateway | Implementers Guide
located at the top of each dialog window; this causes the cursor to appear as follows: Next, click
inside the box (2) next to the item to display the help description (3).
4. Configuration Reference
This section discusses the configuration of the SDG. The SDG application configuration is specified in a
file, called tmwgtway.ini.
Once you have completed configuring the SDG, Triangle MicroWorks recommends that you make a copy
of the configuration files (tmwgtway.ini and tmwgtway.csv) so you can easily restore your system in the
event that these files are accidentally lost or overwritten.
Configuration information may be read from another initialization file specified on the command line when
invoking the SDG. This initialization file will not be overwritten when the SDG terminates. Comments
may be inserted in this file by preceding the comment text with two slash characters (i.e.: //). For example,
[email protected] could be used where file.xyz is the name of the file being passed into the Gateway.
The following diagram shows how the some of the important configuration parameters in tmwgtway.ini
relate to the point-addressing scheme.
To do this, right-click on the shortcut and then select Properties. Next, in the Target field add the
argument to the end of the path as follows: "C:\Program Files\Triangle MicroWorks\SCADA Data
Gateway\tmwgtway.exe" $
Now each time the SDG is started, the Open INI File dialog screen is displayed which will allow you to
locate the INI file to be used for this SDG configuration. Click the Cancel button to load the INI file from
the location specified in the SDG Options dialog screen (ViewOptions from the SDG menu)
Enter the Point Number (1) for this MDO and click the ellipse button (2) to select any require options for
this MDO.
The User Tag Name (3) and Description (4) parameters are optional and are used to provide further
description of the MDO.
The MDO is now added and can be viewed, or edited, by clicking the session:
Creating SDOs is done indirectly by mapping (drag-and-drop) an MDO on to a Slave Data Type (MDO
to a SDO). First, use the mouse to click and hold on the MDO in the Master session (1). Next, drag the
MDO on top of the Slave Data Type (2) and release the mouse button to perform the mapping:
After the point has been mapped, the Slave Data Object Editor is displayed:
Enter the Slave Information Object Address (1) and then select any required options (2) for the Slave
Point. Click OK to return to the SDG main window.
The following dialog screen facilitates editing the options field for tags (i.e. MDO, SDO, OPC Client,
Equation).
The Option column (1) displays the option name. The Value column (2) is used to set the value of the option.
For Boolean options, in order to include the option the Value must be TRUE. The Use column (3) must be
set to Yes for the option to be included. To edit an option, click in the textbox next to the option to change the
value.
This will display the Internal Master Data Object Editor dialog screen. This dialog screen allows you to
define the User Tag Name (1), Options (2), Description (3), and the Type (4) for the MDO. The
Description parameter (3) is optional:
The value of a command SDO will be passed on through the Internal MDO to a monitor SDO.
Internal MDOs can be used just like any other MDO type in the SDG. However internal MDOs can accept
a value and provide a value to a mapped point.
To modify the current value and quality of an Internal MDO, click on the Gateway node and then locate the
Internal MDO in the item pane on the right. Next, right-click on the MDO and select Edit Internal MDO:
The following dialog boxes are used to manage the value and quality for various data types:
To edit an Internal Boolean MDO Value, click the Value checkbox (1) to set the value to TRUE or uncheck
the checkbox to set it to FALSE. Click the Quality button (2) to edit the MDOs quality.
To edit an Internal Analog MDO value, enter a value in the Value textbox (1). Click the Quality button (2)
to edit the MDOs quality.
To edit the quality of an Internal MDO, select the appropriate checkboxes on the Quality Editor Dialog
screen. The quality can be a combination of the check boxes listed above. The numerical value is
displayed in the Value edit box.
This will display the Master Data Object Equation Editor dialog screen:
The equation editor makes it easy to create equations using a drag-and-drop approach. Equation operations
and database tags can be dragged and dropped from the Tag List (1) or Operations List (2) into the
Equation field (3). The Validate Equation button (4) can be used to verify the syntax of the equation prior
to adding it to the point list.
One use of equations is to convert the “raw” value reported by the SDG into an IEC Normalized or Scaled
value. For example, to convert the reported value, which has a range of -32768 to 32767 to a Normalized
value, which has the range of -1 to +1-2-15, enter an equation to divide the reported value by 32768.
See section 4.26.5.7 Equation Field for more information on the options and restrictions for equations.
Once you have added all the modem pools you require, the SDG configuration window will display these
items under the ModemPools node as shown below:
Next, to add a modem to the pool right-click on the desired modem pool element and select Add Modem to
display the Add Modem dialog screen:
Most of the configuration parameters on this dialog screen are the same as those for a serial port. The ones
that are different are described below.
Parameter Description
Modem Name A name used to refer to and identify the modem
Initialization String* Specifies the initialize string that is sent to the modem when the modem is
opened
Hangup String* Specifies the hang up string that is sent to the modem when the modem is
closed
Dialing Mode Sets the dialing mode of the Modem: 'pulse' - use pulse dialing. 'tone' - use
tone dialing
Read Command Timeout Specifies the timeout in seconds that the SDG waits for a modem to
respond to a command
Write Command Timeout Specifies the timeout in seconds that the SDG waits to send a command to
a modem
Response Terminator Sets the character used to terminate a response from the Modem: 'none' -
Character don't use a character to terminate the response (assumes the modem is set
up with no command responses (i.e. ATQ1)). 'line feed' - use a 'line feed'
character to terminate the response. 'carriage return' - use a 'carriage
return' character to terminate the response
No Dial Out If TRUE, the modem will be configured for receiving telephone calls only
Enable If set to true, the modem will be Enabled and Available for use. This can
be used to perform maintenance on the modem
* The Initialization String and Hang-up String must be compatible with the Hayes AT
command set.
Once the modem pool configuration is complete, the SDG configuration window will display these items
under the ModemPools node as shown below:
Parameter Description
Session Protocol Sets the protocol for the channel. Possible values are 'S101', 'S104',
'M101', 'M103', 'M104', 'MDNP', or 'SDNP'
Dial Out Specifies if the channel will dial or not. If the check box is checked the
channel will attempt to dial the telephone number on a modem specified in
the Modem Pool field. If the check box is not checked the channel will be
configured to only answer telephone calls
Modem Pool The modem pool this channel will use for communications. A free
modem in the modem pool must be available for the channel to attempt
dialing
Phone Number The telephone number of the peer device that this channel will dial when
making a connection
Wait For Answer Sets the amount of time in seconds the modem will wait for an answer
from the peer device. If the peer device does not answer in this time
period a new dial attempt will be made
Redial Attempts Sets the number of times the channel will attempt to dial the remote
device. If the remote device cannot be reached the channel is disabled,
and must be manually re-enabled. To re-enable the channel the
ChannelRedialLimitControl MDO must be set to false. This internal
MDO indicates true when the redial limit is reached
Idle Time Sets the number of seconds the modem will stay connected after there is
no more data to send or receive. If more data is sent or received on the
modem the timeout period starts over. This parameter is useful for
disconnecting the modem when there is no communications activity. If
this value is set to 0 the idle timeout is disabled (i.e. the modem will not
automatically hang up)
Alias Name Name for communications channel, this must be specified
Parameter Description
Session Protocol Sets the protocol for the channel. Possible values are 'S101', 'S104',
'M101', 'M103', 'M104', 'MDNP', or 'SDNP'
IP Address / None Name Sets the Communication Channel. Examples: "192.168.1.25" or
"node name"
Mode Sets the connection mode to use. Possible values are 'server', or
'client'. Typically Slaves are servers and Masters are clients
IP Port Number Sets the TCP/IP port number to use
Alias Name Name for communications channel, this must be specified
Parameter Description
Session Protocol Sets the protocol for the channel. Possible values are 'S101', 'S104',
'M101', 'M103', 'M104', 'MDNP', or 'SDNP'
COM Port Sets the Communication Channel. Examples: "COM1", “COM2”,
“COM3”, etc
Baud Rate Sets the baud rate for corresponding serial port.
Parity Sets the parity for corresponding serial port. Possible values are 'none',
'even', or 'odd'
Data Bits Sets the number of data bits for corresponding serial port. Possible
values are '7', or '8'
Stop Bits Sets the number of stop bits for corresponding serial port. Possible
values are '1', or '2'
Flow Control Sets the mode of the serial Channel.
Possible values are:
none - use no flow control.
hardware - use hardware flow control. Hardware flow control is
configured by the SDG as shown in the table below
windows - use flow control and serial parameters (baud rate, parity,
etc.) as specified with the Windows MODE command (For
information on the Windows Mode command, type help mode in
a Windows Command window).
Offline Poll Period The period at which the sessions on the channel are polled if they are
offline. This parameter only applies to serial DNP and Modbus master
sessions on this channel. A value of zero (0) will disable this feature
Alias Name Name for communications channel, this must be specified
For all Session types the following fields are defined here:
Parameter Description
Absolute Response Timeout Default application response timeout. This value is the maximum
amount of time (in milliseconds) that will be allowed before a
command is cancelled due to timeout. This time starts when the
request is submitted and ends when the final application level
response is received. This value can generally be overridden for
specific data points by the 'TO' option in the point mapping file
Incremental Response Maximum amount of time (in milliseconds) to allow between
Timeout messages from a remote device when a request is pending to that
device. The message need not be a direct response to the pending
request. If no message is received from the remote device within this
period it is assumed the device has terminated processing of the
request and the request is cancelled due to an application level
timeout. This timer is restarted every time a message is received
from the remote device
Parameter Description
Controlled Station Link Address Data link address of slave component or remote device. Each
Address identifies a unique session, which is a link layer
connection between a Master and a Slave device. Set to 0xffff
(65535) for the session to be a "broadcast session".
Link Mode Data link transmission mode. Required for each
communications channel. Possible values are 'balanced', or
'unbalanced'
Link Max Retries Maximum number of attempts to re-transmit data link-layer
frames that were not confirmed. This parameter does not apply
for link layer connections (sessions) when the GATEWAY is
acting as an unbalanced slave
Link Confirm Timeout The maximum amount of time (in milliseconds) to wait for a
confirmation of frame. For an IEC 60870-5-104 session this is
the T1 parameter. This parameter does not apply for link layer
connections (sessions) when the GATEWAY is acting as an
unbalanced slave
Link Address Size Number of octets (bytes) in link Address field. A value of 0 is
only valid for sessions whose link mode is balanced. This
parameter is only used for IEC60870-5-101 master and slave
sessions. Possible values are from 0 to 2
Class 2 Poll Delay For an unbalanced master communication link, the minimum
Parameter Description
Controlled Station Link Data link address of slave component or remote device. Each
Address Address identifies a unique session, which is a link layer connection
between a Master and a Slave device. Set to 0xffff (65535) for the
session to be a "broadcast session"
Link Max Retries Maximum number of attempts to re-transmit data link-layer frames
that were not confirmed. This parameter does not apply for link layer
connections (sessions) when the GATEWAY is acting as an
unbalanced slave
Link Confirm Timeout The maximum amount of time (in milliseconds) to wait for a
confirmation of frame. For an IEC 60870-5-104 session this is the
T1 parameter. This parameter does not apply for link layer
connections (sessions) when the GATEWAY is acting as an
unbalanced slave
Class 2 Poll Delay For an unbalanced master communication link, the minimum delay
(in milliseconds) after sending request for class 2 data when an
application layer response is not pending for this session. This
Parameter Description
T1 - Link Acknowledge The maximum amount of time (in milliseconds) to wait for a
Timeout confirmation of frame
T2 – Send Acknowledge Maximum time (in milliseconds) to wait to send an Acknowledge
Delay frame
T3 – Test Frame Interval Time (in milliseconds) for the Test Frame interval
K – Transmitted Maximum number of unacknowledged transmit frames
W – Received Maximum number of unacknowledged received frames
Originator Address Originator address (for 2-octet COT). Possible values are from 0
to 255
Parameter Description
Session Name Optional parameter for setting the Session Name to a custom value
SDG Local Link Address Data link address of the local device
Remote Device Link Data link address of the remote device
Address
Link Confirm Mode Request the remote device to send a data link layer confirm of the last
frame sent. This setting is independent of whether the remote device
will require this device to send a data link confirm to frames it
receives
Auto Request Mode Each bit enables (1) or disables (0) an automatic request. This
parameter is only used for master or slave sessions using the DNP3
protocol
Possible values are:
0x001 clear restart upon RESTART IIN
Parameter Description
HMAC Algorithm HMAC algorithm to be used in challenges.
Reply Timeout (ms) How long to wait for any authentication reply.
Key Change Interval (ms) For Master: Session key interval. When time since last
key change reaches this value, session keys will be
updated. For systems that communicate infrequently,
this may be set to zero, using only the
maxKeyChangeCount to determine when to update
keys.
4.10.1.4.2 Setting Command and Control Modes for Binary Output in DNP3 Master Sessions
The SDG supports several parameters in the INI file that are used to set the command and control modes for
binary output points in Master DNP3 sessions.
The “OBJ12_use2pass” parameter is used to set the control mode. If this parameter is set to “TRUE”, then
two-pass control operations will be used for all initiated "Binary Output" controls. If this parameter is set to
“FALSE”, then single-pass control operations will be used for all initiated "Binary Output" controls.
The “OBJ12_forceDflt” parameter is used to determine if the control mode specified by the
“OBJ12_use2pass” parameter will be used or if the control mode will be taken from upstream devices. If this
parameter is set to “TRUE”, then the default control code will always be used instead of any control codes for
Binary Output controls received from upstream devices. If this parameter is set to “FALSE”, then the control
code for Binary Output controls received from upstream devices will be used if possible.
The “OBJ12_dfltCmdMode” parameter is used to set the command mode. Possible values for this parameter
are “LATCH”, “PULSE”, and “PAIRED”. The default is “LATCH”.
The “PulseLength” parameter is used to set the length (in milliseconds) of the pulse used for all initiated
Binary Output controls. Pulse Length is used when a pulse, trip or close control code is specified. The
default value is 100 (milliseconds).
The values specified for these parameters in the SDG initialization file apply to all points and
devices configured for use with the SDG.
For certain points and/or devices that require different control and command modes from those specified in
the initialization file, these default values can be overridden using the point mapping file. See Section
4.21.5.3 Table of Control Options and the Meaning on page 194 for more information.
Parameter Description
Controlled Station Slave Address Data link address of remote device. Each Address identifies a
unique session, which is a link layer connection between a
Master and a Slave device
Parameter Description
SDG Link Address Data link address of slave component
Link Mode Data link transmission mode. Required for each communications
channel. Possible values are 'balanced', or 'unbalanced'
Link Max Retries Maximum number of attempts to re-transmit data link-layer frames
that were not confirmed. This parameter does not apply for link
layer connections (sessions) when the GATEWAY is acting as an
unbalanced slave
Link Confirm Timeout Maximum time to wait for confirmation of frame. This parameter
does not apply for link layer connections (sessions) when the
GATEWAY is acting as an unbalanced slave
Link Address Size Number of octets (bytes) in link Address field. A value of 0 is only
valid for sessions whose link mode is balanced
ASDU Address Size Number of octets (bytes) in Common Address of ASDU (sector
address) field
ASDU COT Size Number of octets (bytes) in Cause Of Transmission (COT) field of
ASDU
ASDU IOA Size Number of octets (bytes) in Information Object Address (point
number) field
Parameter Description
T1 - Link Acknowledge The maximum amount of time (in milliseconds) to wait for a
Timeout confirmation of frame
T2 – Send Acknowledge Delay Maximum time (in milliseconds) to wait to send an Acknowledge
frame
T3 – Test Frame Interval Time (in milliseconds) for the Test Frame interval
K – Transmitted Maximum number of unacknowledged transmit frames
W – Received Maximum number of unacknowledged received frames
Parameter Description
Session Name Optional parameter for setting the Session Name to a custom
value
SDG Local Link Address Data link address of the local device
Remote Device Link Address Data link address of remote device
Link Confirm Mode Request the remote device to send a data link layer confirm of the
last frame sent. This setting is independent of whether the remote
device will require this device to send a data link confirm to
frames it receives
Incremental Response Timeout
Enable DNP3 Secure If TRUE, the DNP3 Secure Authentication Settings dialog screen
Authentication is displayed.
Parameter Description
Slave Address Data link address of local device. Each Address identifies a unique session, which
is a link layer connection between a Master and a Slave device
Parameter Description
Sector Address ASDU address of the sector
EOI Action Mask Each bit enables (1) or disables (0) an automatic request to be sent as
a result of receiving an initialization message from a slave device.
This parameter is only used for IEC 60870-5 master sessions
Possible values are:
0x1 request a general interrogation
0x2 request a clock synchronization
0x4 request a counter interrogation
Online Action Mask Each bit enables (1) or disables (0) an automatic request to be sent as
a result of a slave device coming online. This parameter is only used
for IEC 60870-5 master sessions
Possible values are:
0x1 request a general interrogation
0x2 request a clock synchronization
0x4 request a counter interrogation
Blocking Action Mask Each bit enables (1) or disables (0) an automatic request to be sent as
a result of a slave device leaving blocking mode. This parameter is
only used for IEC 60870-5-103 master sessions
Possible values are:
0x1 request a general interrogation
0x2 request a clock synchronization
0x4 request a counter interrogation
A Data Type is a container for MDOs or SDOs. After a sector or session (for DNP and Modbus) is
specified a ‘Data Type’ can be added to it. The list of available types varies depending on the protocol.
To add additional data types to the sector or session, right-click on the sector/session and select Add
Data Type.
The retry failed transaction part of this dialog screen is used to configure a retry of a timed out transaction,
the failed transaction will be retried for ‘Count’ times at an interval of ‘Period (ms)’. Once the transaction
succeeds again the retry count is reset to 0.
This will display the IEC Action Mask Editor dialog screen:
This will display the DNP Action Mask Editor dialog screen:
The DNPActionNow has a completion status MDO associated with it DNPActionNowStatus. This MDO
is used to display the current status of the DNPActionNow request. The following describes the meaning
of the values:
Typically this can be used to indicate the DNPActionNow has completed and a reason why. This can
also be used to sequence a set of commands/requests on a multi-drop connection.
This will display the Modbus Action Mask Editor dialog screen:
All data specified in the database will be read at the period specified by the mask period.
Transactions will be created based on an optimization algorithm and issued to a slave device.
When the SCADA Data Gateway is used in a Multi Drop network configuration the following suggestions
may be useful for improved polling of data.
This can apply to a mixture of polling and unsolicited reporting when it’s desired to receive periodic updates
based on polling, with preemptive updates based on unsolicited reporting when events occur at a substation.
The default polling algorithm in the SCADA Data Gateway can result in many collisions when substation(s)
begin sending unsolicited responses, potentially resulting in less data throughput during critical times.
These strategies describe changes to the polling algorithm of the SCADA Data Gateway in order to support a
more desired operation. In addition, this provides a more intuitive polling configuration for all multi-drop
channels, which will simplify configurations using multi-drop connections. This only applies to Modbus and
DNP3, as multi drop polling is handled differently in the IEC 60870-5 family of protocols. In particular, the
IEC 60870-5 family allows multiple requests to be outstanding at any one time.
A separate group of ActionMasks is provided for each protocol family: DNPActionMask, IECActionMasks,
and MBActionMasks. Within each family, there are five scheduling action masks (e.g., DNPActionMask0,
DNPActionMask1, DNPActionMask2, DNPActionMask3, and DPActionMask4). In addition, there is a
“current action” Action Mask (e.g., DNPActionNow) that can be used to issue a command immediately.
There is also an ActionMaskOnlineControl for each set of action masks (per device). This control can be
mapped and value set to turn the ActionMasks On/Off based on the Boolean value of this control. For
example if the ActionMaskOnlineControl is set to “off” then none of the action masks will fire regardless of
the connectivity status of the Device. In general, the ActionMaskOnlineControl needs to be “on” and
connectivity needs to be established for the Actions to fire.
With the Channel-based Action Masks, the specified commands will be issued according to the specified
schedule, unless the Unsolicited HoldOff timer is configured (see below). Commands will be issued on only a
single session at a time. Sessions will be selected on a round-robin schedule.
For example, when the Action Mask period timer expires, the specified action will be issued on Session 0 for
that channel. The next time the Action Mask period timer expires, the action will be issued on Session 1. The
next time the Action Mask period timer expires, the action will be issued on Session 2. When the Action
Mask period timer expires after issuing a command for the last session, the next command will be issued on
the first session (Session 0) again.
Users should configure either the Session-based ActionMasks, or the Channel-based Action Masks, but not
both. Five Channel ActionMasks are available (ActionMask0 through ActionMask5).
User commands should have the highest priority. Note that it is not possible to stop the receipt of unsolicited
requests; however, when the SDG receives a command (e.g., from the external OPC Client), it will
immediately queue the request. When the channel is clear (i.e., no responses are being received), the SDG
should send the request.
Polling is the lowest priority. Polls should be delayed until (1) there are no outstanding requests queued; and
(2) no unsolicited responses have been received for a specified amount of time.
This process should run independently on each channel. Within each channel, polling of sessions should be
per the Channel ActionMask described above.
4.14.2.1 Example 1.
Assume COM15 has been configured to conduct an Event Poll every 60 seconds. If there are no user
commands (request messages) queued, and the channel has been quiet for the specified amount of time, then
these polls will be conducted.
4.14.2.2 Example 2.
Suppose the SDG is configured to conduct an Event Poll every 10 seconds, and it starts polling at 09:00:00.
Let’s say it completes a poll scheduled for 09:00:00, and receives an unsolicited response at 09:01:05. The
SDG would wait an additional amount of time (e.g., 10 seconds) before resuming polling at 09:01:15.
To accommodate this a HoldOff timer is available to the session. This timer will be restarted each time a
request is sent or an unsolicited response is processed on that channel. When the channel ActionMask timer
expires, if the hold off timer is still running, then the SDG will delay the specified action by the amount of
time left on the hold off timer.
At the end of the delay, the SDG will again check the hold off timer; if it is still running (as would be the case
if a new unsolicited response was received), then the SDG will again delay the action by the amount of time
left on the hold off timer.
The new Channel-based action timer will run continuously. When the Action Period timer expires, the SDG
will check to see if the previous request is still in progress or if the HoldOff timer is not running. If so, then
no request will be queued. The next attempt to queue a request will be when the Action Period timer expires
again. Otherwise, the specified action will be queued for the next session.
Since the Action Period runs continually, the specified actions will occur at regular time intervals (e.g.,on
multiples of10 seconds).
Note that this algorithm means that it is possible to completely block ActionMask activities if unsolicited
responses are received at a rate faster than the hold off timer interval. It is up to the customer to recognize this
fact and adjust their configuration or system operation accordingly.
The “offline poll period” currently used on session-based polling should not be used. This period allows
sessions that are not online to be polled at a slower rate. This feature is important with the session-based
polling scheme, because offline sessions complicate timeout calculations.
With the channel-based polling, only the Application Timeout is required, as requests will not be queued at
the Application layer if there are prior, incomplete commands. An offline session does not significantly affect
polling – the offline session’s poll will timeout, and the next session will be polled on the next Action Period
interval. [See Note1].
4.14.4.1 DNPChannelResponseTimeout
This timer exists on the channel. DNP3 allows a single outstanding request on each channel. This timer is
started when a request is sent, is canceled when the response is received.
4.14.4.2 ApplDNPAbsRespTimeout
This time starts when a request is put in the queue. Multiple (non-identical) requests may be on the queue at
any one time. These requests will only be sent one at a time, as prescribed by the DNP3 specification. This
timer ensures that requests cannot be “stuck” in the queue. It should be set larger than (n *
DNPChannelResponseTimout), where n is the maximum number of requests that are anticipated to be
queued.
4.14.4.3 PhysOfflinePollPeriod
This existing parameter determines the period at which sessions are polled if they are offline. This
parameter is typically used to slow polling of offline devices so that the repeated timeouts do not adversely
affect other sessions. The offline devices are periodically polled (at this reduced rate) so that the SDG can
determine when they come back online.
4.14.4.4 MDNPunsolHoldOffTime
This timer starts when an unsolicited response is processed. This timer must expire before a new request
may be sent on the channel.
When this parameter is set, the SDG will remember the configuration parameters, but otherwise will treat
the channel as if it is not present.
When this parameter is set, the SDG will remember the configuration parameters for the session, but
otherwise will treat the session as if it is not present.
Notes:
1. If an offline poll delay is needed, it can be implemented as a counter – when a session is offline, it
will be skipped for ‘n’ cycles.
When prompted to use a SCL/ICD/CID file for the configuration, click the Yes or No button:
This will display the in the Add a 61850 Client dialog box:
Page | 100 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Parameter Description
Name The name of the client.
Server IP Address The TCP/IP address of the server to connect to.
Server TCP Port The TCP/IP port of the server to connect to.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 101
SCADA Data Gateway | Implementers Guide
Client IP Address Specifies the IP address of this IEC 61850 Client. This is useful to
select a specific network adapter to use to connect to a server.
AE Invoke ID ASCE AE invoke ID. Value from 0 to 65536. Applies to Client And
Server.
AE Qualifier ASCE AE qualifier. Value from 0 to 65536. Applies to Client And
Server.
AP Invoke ID Invoke ID – ASCE AP invoke ID. Value from 0 to 65536. Applies to
Client And Server
Application ID ACSE AP title of the Server. Applies to Client And Server.
Presentation Selector Presentation selector of the Server. Applies to Client And Server.
Session Selector Session selector of the Server. Applies to Client And Server.
Transport Selector Transport Selector of the Server. Applies to Client And Server.
GOOSE Adapter The adapter to use for GOOSE communications.
SCL File The SCL/ICD/CID file used to configure the client from.
Use SCL File To allow switching between and on-line configuration or an off-line
configuration.
IED Name The IED Name of the IED in the SCL file to load if using a SCL file. .
Applies to Client And Server.
Timezone Bias Integer value of timezone offset.
Reconnect Re-try Count How many times to try to reconnect (0 is forever) if cannot connect. If
this is set to a nonzero value it can be reset by right clicking on the
client node in the main tree and selecting “Reset Connect Retry
Count” from the popup menu.
Reconnect Time (msecs) How often to attempt re-connection if a connection fails.
Connect Timeout (msecs) The time to wait for a valid connection.
Password The password for authentication (if checked)
Certificate Whether to use 62351 security (strong security)
If Security Setup is selected, the following dialog will appear for setting up the certificate information for
62351 (below). All of the parameters need to be filled in except Certificate Authority Revocation List
File and Directory to Certificate Authority.
Page | 102 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
At a minimum, configure the Name and Server IP Address. If the SDG and IEC 61850 server are
running on the same machine, use the default loopback address provided of 127.0.0.1. Click the OK
button to continue to add the client to the configuration. If the client is not connected the SDG will
display the client name in the main tree prepended with “**”. Once the client is connected, the “**” will
go away. This makes it easy to visually see when a client is connected or not.
When a client is added the following MDOs are added to indicate status and statistics for that 61850
client.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 103
SCADA Data Gateway | Implementers Guide
This will display the Add 61850 Report Control Block dialog screen:
Page | 104 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Select any one of the Report Control Blocks from the list box on the left side of the Add 61850 Report
Control Block dialog box. The corresponding data set and its contents will be shown in the list box on the
right. Next, click the Add RCB button to add the report control block. Note that you can create and add
your own Data Set to a Report Control block by using the Create/Add Data Set to RCB button as shown
above (select the RCB prior to creating the Data Set).
If the Report Control Block is already in use by a client, choose a different report control block or use a
Polled Data Set (right click on the IEC 61850 Client node in the tree again and select Add a 61850 Polled
Data Set)
The Report Control Block is now added and can be viewed by clicking on the 61850Client node.
The following status MDOs are added to the client when the Report Control Block is added:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 105
SCADA Data Gateway | Implementers Guide
Right clicking on the RCB and selecting Edit RCB button will allow you to change the trigger options and
interrogation period of the Report Control Block as shown below.
Page | 106 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
4.15.2 Adding an IEC 61850 Data Attribute from the Report Control Block
Once a Report Control Block is defined we can start adding points (Data Attributes) as MDOs to the SDG.
To add an IEC 61850 Item, right-click on the Report Control Block and select Add IEC 61850 Item:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 107
SCADA Data Gateway | Implementers Guide
This will display the Add 61850 Data Attribute dialog screen:
Next, select an item from the list and click the Add Item(s) button. To select multiple items at once, hold
down the control key and click the desired items. To select a range of items, click the first item and hold
down the shift key and click the last item. Use the filters at the bottom of the dialog box to limit the
number of Data Attributes Shown. Click the Done button when all items have been added.
Data Attributes can also be added from the keyboard by using the down arrow key to
scroll through the list and the enter key to activate the Add Item(s) button.
The Data Attributes now appear in the tree under the 61850Client node and in the list view:
Note that the Data Attributes are treated in the SDG as any other Master Data Objects (MDOs). So they
can be mapped to other items and are available through the SDGs OPC Server.
Page | 108 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
4.15.3 Adding an IEC 61850 Command Point
To add an IEC 61850 Command Point to your configuration, create an IEC 61850 Client as described
above and then right-click on the 61850Client node and select Add IEC 61850 Command Point:
This will display the Add a 61850 Command Point dialog screen:
Next, select an item from the list by double-clicking on the desired Item Name. The Item Name should now
be displayed in the Point Name textbox. Click OK to add the IEC 61850 Command Point.
Items that have a 'Command Kind' of Status Only are not writable.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 109
SCADA Data Gateway | Implementers Guide
The 61850 Command Point now appears in the tree under the 61850Client node:
Note that this command point can be treated as any other command MDO in the Gateway. It can be written
to just like any other writable MDO.
It is recommended that the data in the below mechanisms does not overlap with other data. Note that the
last mechanism to update the value in the MDO is used as the value of the MDO if the data does overlap.
Page | 110 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
4.15.4.2 Polled Data Sets
Polled Data Sets are a mechanism in the SDG to read data in a specific data set from a server on a
periodic basis. The SDG is responsible for issuing a read on the data set in the server to obtain the data.
When points are read requests are issued to the server. The outstanding request count is displayed in the
RequestQSize MDO of the client. In a situation where more requests are issued than responses received
(i.e. the server cannot keep up with the request rate) this MDO will count up to the INI file parameter
I61850ClientRequestQMaxSize value which has a default of 50. Should this situation occur, it is
recommended that the poll rate of the polled point set is set to a longer value and the
I61850ClientRequestQMaxSize value is increased. Alternatively setting the INI file parameter
I61850PolledPointSetReadAsArray to true can reduce the amount of traffic on the network and improve
this situation.
4.15.5 IEC 61400-25 Alarms (Senvion/Re Power Turbine alarms, proposed addition
to the IEC 61400-25 specification)
Senvion/Re Power turbines have 2 alarm arrays that contain the current alarm and event status of a turbine.
There is a requirement to transform these array elements into individual status points. The alarms on the
Senvion/Re Power turbine side are essentially delivered in a buffer of 50 alarm statuses and 50 alarm
events which come and go as alarms occur. The elements in this buffer need to be translated into
equivalent MDOs representing the Status Codes in the buffers.
This functionality will allow the end user to create new Alarm Master Data Objects (MDOs) for the
Senvion/Re Power REguard Control B Active alarm status arrays. For each Alarm MDO, the user will
specify the REguard Status Code that represents the alarm. The REguard active alarm status and event
arrays will be processed in such a way that as the Status Code values come and go from the array, the data
changes will be generated on the associated Alarm MDOs.
The functionality of this feature will be structured according to the following outline:
To add an alarm array, right-click on the IEC 61850 Client node and select Add IEC 61400-25
Alarms to display the Add IEC 61400-25 Alarms dialog screen.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 111
SCADA Data Gateway | Implementers Guide
From this dialog screen, the user can select an alarm status array and alarm event array from the list
of available alarm arrays (i.e. WALM1.AlmSt.actSt), provide a unique name for the array, and add
a new node to the configuration based on the user-defined name for the array.
To add alarm items (i.e. Alarm MDOs), right-click on the new node and select Add Alarms to
display the Add Alarm MDO dialog screen.
This dialog screen will display the Alarm MDO item properties which allow you to specify the
Status Code, Name, and Options as well as other standard SDG MDO options.
In addition polling and report control blocks will be setup for the status and event arrays
respectively.
The following section provides a detailed overview for this configuration within the SCADA Data
Gateway.
In order to add alarms to the SDG configuration, an IEC 61580 Client must already exist in the SDG. In
addition the INI file parameter I61850Enable61400AlarmProcessing must be set to TRUE for each
61850 client that will be processing alarms. Note that this INI parameter is FALSE by default and must
Once the IEC 61850 Client node has been added to the configuration, the next step is to add the IEC
61400-25 Alarms node.
Page | 112 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
This will display the Add IEC 61400-25 Alarms dialog screen:
Clicking the ellipse button will display the Find Alarms Arrays dialog screen:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 113
SCADA Data Gateway | Implementers Guide
This will create the alarms node underneath the IEC 61850 Client node based on the name that was
provided on the Add IEC 61400-25 Alarms dialog screen:
Page | 114 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
This will display the Alarm MDO dialog screen which allows you to define the Status Code, Name, and
Options for the alarm:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 115
SCADA Data Gateway | Implementers Guide
After the MDOs are added to the SDG configuration, they will be displayed in the GUI as shown below:
In order to start receiving changes on the arrays the SDG must be configured to receive the changes. It is
recommended that a Polled Point Set be configured to poll the status array and a report control block
configured to receive changes in the event array. Typically the event array has a RCB and Data Set
associated with it that can be configured in the SDG as any other Report Control Block would be. With
this configuration the status array will be used to initialize the alarms and the event array will be used to
receive new alarms and events from the turbine. Please see the appropriate Senvion/Re Power
documentation to get more details on how these arrays behave.
Page | 116 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 117
SCADA Data Gateway | Implementers Guide
Once the server has been created, you will be ready to start mapping MDOs to it. This is done by dragging
and dropping MDOs to the server node in the tree:
Page | 118 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
The following dialog will appear when the point is dropped. Use this dialog to select the Data Attribute in the
61850 model selected with the ICD file by pressing the hi-lite … button. Note the point name is pre
generated based on its location in the SDG.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 119
SCADA Data Gateway | Implementers Guide
After pressing the hi-lite … button. The following will appear. In this example we select the ‘Phase A’
current and press OK. Note the ‘Only MX’ filter was turned on to only display 61850 tags with the MX type
functional constraint.
Page | 120 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
After mapping the point, your SDG configuration should look similar to the image below:
This shows the point in the 61850 server (i.e. mdnp_L4_T30_P0). Although we don’t show it in this image
the description will have the path of the 61850 tag.
Here we show the master DNP side with the analog point P0 mapped to the 61850 tag.
Mapping additional points is simply a matter of dragging additional MDOs to the 61850 server. Note that
command points and monitor points are suported.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 121
SCADA Data Gateway | Implementers Guide
This will display the in the Add a ICCP Client/Server dialog box:
Page | 122 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 123
SCADA Data Gateway | Implementers Guide
Parameter Description
Name The name of this ICCP client and/or server.
ICCP Configuration Specifies client, server, or client and server functionality. Selecting
Client/Server will create a bidirectional ICCP configuration.
Initiate On Startup Applies to Client and Client/Server only. Specifies if the client should
initiate a connection upon startup of the SDG application.
Synchronize Data Sets Applies to Client and only. If true, the client will attempt to adjust its
local datasets to match servers model.
Reconnect Time (msecs) How often to attempt re-connection if a connection fails. Should be
larger than the Connect timeout.
Reconnect Re-try Count How many times to re-try reconnect (0 is forever).
ICCP Security Brings up the security configuration dialog box.
Security On Tells the application to connect using the security parameters. If
security is turned on, all certificate paths have to be valid except for
the revocation list file.
ICCP Version Specifies the ICCP version to run the current application in
Client/Server AE Invoke ID ASCE AE invoke ID. Value from 0 to 65536
Client/Server AE Qualifier ASCE AE qualifier. Value from 0 to 65536
Client/Server AP Invoke ID ASCE AP invoke ID. Value from 0 to 65536
Client/Server Application ACSE AP title of the Server
ID
Client/Server Presentation Presentation selector of the Server
Selector
Client/Server Session Session selector of the Server
Selector
Client/Server Transport Transport Selector of the Server
Selector
Server RFC IP Address Specifies the IP address that the Server will listen on for connecting
clients.
Client Server IP Address Specifies the IP address that the client will connect to. The address
127.0.0.1 specifies the same machine that the SDG is running on.
Server Listen Port Specifies the port that the server will listen on for connections. The
default is 102.
Client RFC IP Address Specifies the IP address that the client will use for connecting to the
server.
Client Connect Port Specifies the port to which the client will try to connect on its server
IP address. The default is 102.
Max Connections Allowed If specified, this setting controls how many clients can connect to the
server. 0 means no client can connect. Empty means there is no limit.
At a minimum, configure the Name and Server IP Address. If the SDG and ICCP server remote
application are running on the same machine, use the default loopback address provided of 127.0.0.1 and
make sure the remote server is started first if running in bidirectional mode. Otherwise the ICCP client in
the SDG will connect to the ICCP server in the SDG. If bidirectional functionality is desired the
Client/Server radio button must be selected. The gateway supports multiple connection profiles for the
client to connect to as a type of one sided redundancy. The main field that controls this is the “Server IP
Address”. Multiple values, semicolon separated, can be specified for the seven layer stack and security
Page | 124 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
fields for each IP address specified. The client will cycle through the IP addresses when it loses a
connection and will use the corresponding seven layer and security fields. For example, if the IP address
field is “192.168.1.134;192.168.1.155” and the Client AP Title is “1,3,9999,1;1,4,5555,2”, the client will
first try to connect to 192.168.1.134 using 1,3,9999,1. If the client either cannot connect or loses its
connection, it will then automatically try 192.168.1.155 using 1,4,5555,2. And then if it cannot connect
to the second IP or loses its connection, it will then go back to the beginning. There is no limit as to how
many connection profiles can be used.
“Use ED1 Compatibility” checkbox is to support older edition 1 MMS security implementation that does
not comply with the current standard 62351 specification. The rest of the fields should be self-
explanatory. All fields are required except “Certificate Authority Revocation List File” and “Directory to
Certificate Authority”. In the client create/edit dialog above, security cannot be turned on unless all other
fields are specified and point to valid certificate files or values.
When finished with security settings click the Ok button and then when finished with the client
create/edit settings click the OK button to add the client and/or server to the configuration.
When a client is added, the following MDOs are added to indicate status and statistics for that ICCP
client.
ChannelActiveControl – If true, the client is connected to the server. This MDO is writeable and will
connect/disconnect the client.
NumReadResponse – The number of reads completed from the server.
NumReportMessages – The number of report control block updates received.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 125
SCADA Data Gateway | Implementers Guide
When a server is added, the following MDOs are added to indicate status for that ICCP Server.
ChannelActiveControl – If true the server is listening for a client connection. This MDO is writeable and
will cause of the server to stop listening if turned off.
NumClientsConnected – Shows the number of clients connected to the Server. Note that in bidirectional
mode, peer clients are only considered connected if they initiate the connection.
Domain/DataPointName,PointType
Domain/CommandPointName,CommandPointType,SBO,CheckbackId
Domain/BilateralTableId,Bilateral_Table_ID
Page | 126 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
VMDDataPointName,PointType
VMDCommandPointName,CommandPointType,SBO,CheckbackId
ICC1/DiscretePoint,Discrete
ICC1/DiscreteExtendedPoint,DiscreteExtended
ICC1/DiscreteQTimeTagPoint,DiscreteQTimeTag
ICC1/DiscreteQTimeTagExtendedPoint,DiscreteQTimeTagExtended
ICC1/ControlCommand,ControlCommand,true,90
ICC1/DiscreteSetPoint,DiscreteSetPoint,true,-8
ICC1/RealSetPoint,RealSetPoint,true,-3
ICC1/CLIENT_BTID,Bilateral_Table_ID
VMDRealPoint,Real
VMDStatePoint,StateQ
VMDDiscreteQPoint,DiscreteQ
VMDRealQPoint,RealQ
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 127
SCADA Data Gateway | Implementers Guide
VMDStatePoint,State
VMDStateExtendedPoint,StateExtended
VMDStateQTimeTagPoint,StateQTimeTag
VMDStateQTimeTagExtendedPoint,StateQTimeTagExtended
If the domain is not specified, the Virtual Manufacturing Domain or VCC is assumed. The order that
entries are listed does not matter. Once the file is defined it can be loaded into the client model by using the
Browse… button to find and select the file and then pressing the Load button. The Client model shown
below would result from the above CSV file:
Page | 128 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 129
SCADA Data Gateway | Implementers Guide
The Clear Model button is used to completely clear the model and start over if a different model is desired.
DataSets and DS Transfer Sets are not defined in the .csv file. They are defined via the GUI as described
below. The entire model (including DataSets and DS TransferSets) is persisted in a file with the name
<clientname>_modeldef.xml and is saved in the standard location. The model is persisted anytime it
changes not when the application is saved.
This will display the Add ICCP Data Set Transfer Set dialog screen:
Page | 130 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Make sure the name is the desired name. Select the domain to create the DS Transfer Set in. Select any one
of the Data sets from the list of available data sets. The corresponding data set and its contents will be
shown in the list box on the right. Data Sets must be created from the client. If a new dataset is desired,
click the Create New Data Set button which will bring up the Create ICCP Data Set dialog:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 131
SCADA Data Gateway | Implementers Guide
The Data Set Transfer Set is now added and can be viewed by clicking on the ICCP client node.
The following status MDOs are added to the client when the Report Control Block is added:
RptDS_0_0_GI – use this MDO to initiate a General Interrogation on the DS Transfer Set.
RptDS_0_0_PURGE – use this MDO to purge the RCB clearing the buffered data
Page | 132 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
This will display the Add ICCP Data Attribute dialog screen:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 133
SCADA Data Gateway | Implementers Guide
Next, select an item from the list and click the Add Item(s) button or double click the item or highlight the
item and hit the enter key. For each item added, the corresponding domain folder will be created under the
client. The Bilateral Table ID will also appear in the name of the Domain. You must select the domain to
see the points corresponding to that domain (see below). Note: once Add Item is pressed the only way to
remove the items is to select it under its respective Domain, right click and choose delete. To select
multiple items at once, hold down the control key and click the desired items. To select a range of items,
click the first item and hold down the shift key and click the last item. Click the Done button when all
items have been added.
The Data Attributes now appear in the tree under their respective Domain:
Note that the Data Attributes are treated in the SDG as any other Master Data Objects (MDOs). So they
can be mapped to other items and are available through the SDGs OPC Server.
Page | 134 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
This will display the Add a ICCP Command Point dialog screen:
Next, select an item from the list by double-clicking on the desired Item Name. The Item Name should now
be displayed in the Point Name textbox. Click OK to add the ICCP Control Point. You can make the
control point an SBO and select the checkbackID by pressing the options “…” button:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 135
SCADA Data Gateway | Implementers Guide
The ICCP Control Point now appears in the tree under its respective Domain node:
Page | 136 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Put the value to write to the control and press “Select And Operate”. Select only applies (and appears) for
controls that are Select Before Operate (SBO), otherwise only “Operate” appears.
It is recommended that the data in the below mechanisms does not overlap with other data. Note that the
last mechanism to update the value in the MDO is used as the value of the MDO if the data does overlap.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 137
SCADA Data Gateway | Implementers Guide
IEC 60870-5-101
Mask
Quality Quality Symbol Meaning
Value
Descriptor
BL STD_QLTY_BLOCKED Blocked 0x0010
SB STD_QLTY_SUBSTITUTED Substituted (over-ride or forced) 0x0020
NT STD_QLTY_NOT_TOPICAL Not topical (offline/not dated) 0x0040
IV STD_QLTY_INVALID Invalid 0x0080
OV STD_QLTY_OVERFLOW Overflow/rollover 0x0001
EI STD_QLTY_INVALID_TIME Elapsed time invalid 0x0008
- STD_QLTY_REF_ERROR Reference error 0x0100
- STD_QLTY_IN_TRANSIT In transit/chatter 0x0200
- STD_QLTY_UNINITIALIZED Not set since startup 0x0400
- STD_QLTY_TEST Test mode 0x0800
The Gateway maps this quality to ICCP ICCP quality in the following way:
ICCP/ICCP Mask
Quality Symbol Meaning
Quality Value
Validity Held STD_QLTY_BLOCKED Blocked 0x0010
Current Source 0x0020
calculated, entered, STD_QLTY_SUBSTITUTED Substituted (over-ride or forced)
or estimated
Validity Suspect STD_QLTY_NOT_TOPICAL Not topical (offline/not dated) 0x0040
Invalid STD_QLTY_INVALID Invalid 0x0080
Abnormal Value STD_QLTY_OVERFLOW Overflow/rollover 0x0001
Invalid Timestamp STD_QLTY_INVALID_TIME Elapsed time invalid 0x0008
N/A STD_QLTY_REF_ERROR Reference error 0x0100
N/A STD_QLTY_IN_TRANSIT In transit/chatter 0x0200
N/A STD_QLTY_UNINITIALIZED Not set since startup 0x0400
N/A STD_QLTY_TEST Test mode 0x0800
Page | 138 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
This mapping is necessary because the gateway maps quality between protocols and no two protocols have
the same meaning for quality. For server side points, there is an option to interpret the quality value passed to
the Slave Data Object as straight ICCP quality. You can edit the SDO and turn
INTERPRETQUALITYASTASE2 option on for this functionality. There is no such option on the client side.
In general if the ICCP point has a flags attribute or a state attribute the quality will be converted back and
forth to and from gateway quality. If the ICCP point does not have flags or state (e.g. a Real or Discrete) the
quality with either be Invalid (0x0080) or Good (0x0000). Furthermore if the ICCP point has flags or state the
GUI will display both the gateway and ICCP quality and otherwise will only show the gateway quality. The
ICCPquality is displayed as (x,x,x,x) which is (Validity, Source, Normal Value, Timestamp Quality).
clicking on the ICCP Server node and selecting Add ICCP Domain:
Enter a Name for the domain, the DS Transfer Set count to be available to clients and the Bilateral Table ID
and then click OK:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 139
SCADA Data Gateway | Implementers Guide
Page | 140 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Next, enter the ICCP Point Name and select a Type from the dropdown list that corresponds to the type of
MDO dragged to the domain. Click OK to continue:
After mapping a point, your SDG configuration should look similar to the image below:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 141
SCADA Data Gateway | Implementers Guide
The final step in the configuration is to restart the ICCP Server. This is done by right-clicking on the ICCP
Server node and selecting Restart(stop/start) ICCP Server:
Page | 142 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
The ICCP Server is now ready to be connected to by a ICCP client that will now be able to read the Real
point, tase2Real from the Domain, DomainA.
This will display the Add an OPC AE Client dialog screen as shown below:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 143
SCADA Data Gateway | Implementers Guide
Next, click Find OPC Server and then select the desired OPC AE Server from the Select OPC AE Server
dialog screen. This dialog displays a list of OPC AE Servers available on the ‘Server Node’. Selecting one
of these servers places the value of the ‘Prog ID’ field and the ‘Node Name or IP address’ field into the
above dialog box. Click OK to continue.
Page | 144 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Parameter Description
Node Name or IP Address Specifies the Node name of the OPC AE Server to connect to
Prod ID Specifies the PROG ID of the OPC AE Server to connect to
Alias Name Optional Name for the OPC AE Server to connect to, if not specified
use the value of OPCAEserverProgID. It is strongly recommended
that this parameter be defined as an external OPC AE client may not
be able to browse for tags in SDG OPC AE server if the OPC AE
server name contains one or more period ('.') characters. To work
around this issue, define this alias name (with no periods for the
external OPC AE server, and reference the server by its alias.
Buffer Time (msecs) The buffer time, specified in milliseconds, indicates the number of
times the event notifications may be sent to the subscription object.
This parameter is the minimum time spread between two successive
event notifications. The value 0 means that all event notifications
shall be sent immediately from the server. If the parameter MaxSize
is greater than 0, it instructs the server to send event notifications
quicker in order to keep the buffer size within MaxSizeSpecifies the
buffer time for the OPC AE Server subscription.
Max Size (events) This parameter is the maximum number of events that may be
specified in a call. The value 0 means no restriction for the number of
events. Please note that if the value MaxSize is greater than 0, then
events can be sent faster from the server than through the BufferTime
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 145
SCADA Data Gateway | Implementers Guide
Page | 146 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Not all OPC AE servers support an Area Space. As a result, if the Area Space browsing is not supported
event source names will need to be entered manually. If Area Space browsing is supported, then event
source items can be selected in the Area Browser to create OPC AE MDOs.
By default when a source name is selected, a source_name.Event MDO is created. This MDO will receive
events for that source name in the OPC AE Server. The value of this MDO by default will be the message
value of the OPC AE event. Time and quality are always obtained from the OPC AE event.
To browse for an Event Source, click on the nodes to expand the tree and then click Add to add the desired
item:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 147
SCADA Data Gateway | Implementers Guide
Page | 148 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
4.20.2.2 Event Attribute MDOs
OPC AE events can have attributes associated with them. OPC AE Attributes are typically defined as
properties of Categories in an OPC AE Server. For example, a server may provide an event called
right mouse click with attributes x position and y position.
To add an OPC AE Event Attribute to your configuration, right-click on the event and select Add
OPC AE Attribute MDO:
To browse for an Event Attribute, click on the nodes to expand the tree and then click Add to add the
desired item.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 149
SCADA Data Gateway | Implementers Guide
OPC AE Client MDOs can be created to represent these attributes. The value of these MDOs will be the
attribute value (i.e. x position or y position) but the quality and time stamp will be obtained from the event.
Page | 150 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
To view the available options for this item, click on the ellipse (…) button to display the Options Editor
dialog screen. Select the desired options, including the Value and the Use parameters. These items are
selected by clicking in the appropriate box to change the value. Click OK to continue.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 151
SCADA Data Gateway | Implementers Guide
Parameter Description
ALIAS
EVENT_FALSE_MSG used to parse the message string of the event and look for the string
specified if the string is found the MDO value will be set to false
EVENT_TRUE_MSG used to parse the message string of the event and look for the string
specified if the string is found the MDO value will be set to true
EVENT_VALUE used to specify/override the default message value for the event. (i.e.
EVENT_VALUE true will cause the MDO value to be true when the
event is received)
*Click on the ellipse (…) button to open the LOGMASK dialog screen which displays a
list of additional options for these items.
The following options are related to the OPC AE Client. However, these options are selected in the OPC
DA MDO Options dialog (covered in the next section).
Parameter Description
AE_INIT_VALUE_MDO used to specify the OPC AE MDO that will be initialized with the value,
quality and time stamp (VQT) of the Data Access MDO. Once
Page | 152 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
initialized the VQT will not be applied again unless the OPC AE Client
disconnects from its server
AE_RESET_VALUE_MDO used to specify the OPC AE MDO that will receive a VQT from the
OPC DA MDO if the AE MDO value is different from the DA MDO
value
AE_RESET_VALUE in association with AE_RESET_VALUE_MDO is used to specify the
value of the OPC DA MDO that will cause the OPC AE MDO to be set
to the VQT of this OPC DA MDO when an OPC DA update is received
for this OPC DA MDO. Valid values for this option’s argument are
‘0’,’false’,’1’,’true’, ‘numeric value (float or integer)’ or ‘some string’.
If this option is specified the difference comparison in the
AE_RESET_VALUE_MDO option will not be used
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 153
SCADA Data Gateway | Implementers Guide
Optionally a log mask(s) can be used to enable OPC Alarm and Event Notifications. The
OpcAESubscriptionMask parameter in the configuration file controls when events are reported as a result of
an item subscription through the SDG OPC Data Access Server. The bits in this mask enable various reasons
that an event will be reported. This mask overrides all other OPC Alarm and Event related masks if enabled.
If the mask is 0, no OPC Alarm and Event notifications will occur as a result of an OPC Data Access item
subscription, although events can be reported for other reasons through the use of the other OPC Alarm and
Event masks (see the configuration file, each data type has an OPC Alarm and Event log mask associated with
it, the rules associated with this configuration of these masks is similar to the ‘Sequence of Event’ Log Files
section 4.29 page 231).
OPCAeCatID - Specifies the id of the OPCAE category. Default Cat IDs are from 0 to 4. Start this at 5.
OPCAeCatMsg - Specifies the name of the OPCAE category.
In addition the CSV file supports the following option fields related to OPC AE Server definition:
OPCAECONDITIONNAME – used to map this MDO to the OPC AE event space. The format of this field is
as follows:
Category id/condition name/sub condition name
CATID:COND:SUB_COND
Page | 154 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
OPCAEMESSAGE – override the default message for this alarm/event with this string
OPCAEUSEVALUEASMESSAGE – use the value of the MDO as the message for this alarm/event
Defining an Event space for the server will allow an OPC AE client to receive additional information
associated with the events and alarms by relating the individual events and alarms (defined as MDOs) to the
event space through the OPCAECONDITIONNAME option field.
This additional information can be used to filter the alarms and events on the client.
The structure of this event space definition is as follows (each array element is dimensioned at 10):
category[]
- ID – INI – OPCAeCatID[catIndex]
- msg – INI - OPCAeCatMsg[catIndex]
condition[][]
- name – INI - OPCAeCatCondName[catIndex] [condIndex]
- severity – CSV - OPCAESEVERITY
- msg – CSV - OPCAEMESSAGE
sub-condition[][][]
- name – INI - OPCAeCatSubCondName[catIndex] [condIndex] [subCondIndex]
- severity – INI - OPCAeCatSubCondSeverity[catIndex] [condIndex] [subCondIndex]
- description – INI - OPCAeCatSubCondDescription[catIndex] [condIndex] [subCondIndex]
- definition – INI – OPCAeCatSubCondDefinition[catIndex] [condIndex] [subCondIndex]
Note that in order for the OPC AE Server to publish alarms and events. The following OPTIONS/INI file
parameters will have to be configured appropriately.
//*****************************************************************************
// OPC AE Server
//*****************************************************************************
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 155
SCADA Data Gateway | Implementers Guide
Page | 156 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Changing the value of the internal MDO bitAlm will then publish an Alarm/Event through the OPC AE
Server.
To Add an OPC Data Access Client to your configuration, right-click on the Gateway node and select
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 157
SCADA Data Gateway | Implementers Guide
This will display the Add an OPC Client dialog screen as shown below:
Parameter Description
Node Name or IP address Specifies the Node name of the OPC Server to connect to. This field
is automatically populated when you select a server.
Prog ID Specifies the PROG ID of the OPC Server to connect to. This field is
automatically populated when you select a server.
Page | 158 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Alias Name Optional Name for the OPC Server to connect to, if not specified the
value of ‘Prog ID’ is used.
Refresh Rate (msecs) Specifies the rate at which the OPC server that the client is connected
to will refresh the OPC client. This is a requested update rate and
that the server may actually no update the client at the rate requested.
Reconnect Time (msecs) Specifies the reconnect timeout for the OPC Server (0 = no
reconnect).
Read Properties Time Specifies the period at which properties are read (0 = don't read)
(msecs)
Reconnect Re-try Count Specifies the reconnect re-try count for the External OPC Server (0 =
attempt reconnects for ever)Setting the client refresh MDO will cause
the internal limit counter to be re-set to 0resulting in continued
connection attempts to the OPC server.
Find OPC Server Displays the Select OPC Server dialog screen.
Click the Find OPC Server button to display the Select OPC Server dialog screen:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 159
SCADA Data Gateway | Implementers Guide
This dialog displays a list of available OPC servers on the ‘Server Node’. To select an OPC Server,
highlight the server name in the list (4) and then click the OK button to return to the Add an OPC Client
dialog screen. Complete the remaining fields, if required, and then click OK to continue.
To browse the list of available network node names, click the ellipse button (1) to display the Network
Node Names dialog screen:
Select the Node Name from the list and then click OK to return to the previous screen.
To define the server type select an option (1.0, 2.0, or General) under the Available Servers section
(2). Next click the Refresh button (3), if necessary, to refresh the list of available servers.
Page | 160 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
OPC Client items are considered MDOs in the SDG. OPC Client items obtain their value from an external
OPC server. They are updated as the server provides them to the client. These points can be mapped to other
protocols or to another OPC Client.
To add an OPC Client item to your configuration, right-click on the OPC Client and select Add OPC Client
Item:
To add items, navigate the item tree (1) to the desired node and then select a value from the list on the right.
Click Add Item (2) to add the item to the configuration. Once all items have been added, click Done (3) to
return to the SDG main window.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 161
SCADA Data Gateway | Implementers Guide
To view the properties of the OPC Client tag, click the Item Properties button (4). The Item Properties
dialog screen is explained in more detail below.
The Data Type group box (5) is used to override the SDG data type for the OPC point. If Use native type is
selected, the type is set to the type of the point in the OPC server. This ability to override the data type can
be useful if a server provides data as one type and it is convenient to change the type in the SDG to a
different type.
For example, if a server provides data as R8 (double float) and you want to map this to an IEC T50
(floating point set point command) it is useful to be able to change the type of the OPC client point to R4
(float) to facilitate the mapping.
Mapping the Refresh tag has to be done manually in the CSV file. When changed, this causes the server to
refresh all items in the client.
The following is an example of mapping an equation to the OPC Client Refresh tag in the CSV file:
Parameter Description
myAND the equation name
test the OPCClient name
Refresh the Refresh tag in the OPC client
"myPB && 1" the equation (myPB is an internal Boolean tag)
1 the type of Refresh (i.e. bool)
Refer to section 4.26.2 Mapping Points to an External OPC Server for additional information about OPC
Client Items.
Page | 162 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
To add properties, select an item from the list (1) and then click the Add Property button (2).
To display the list of available options, click the ellipse button (3).
There are 2 OPC client tag specific options that are used to cache the current read/write state of the
tag. The read/write state is normally obtained from the server but will be cached in the CSV file for
performance reasons. If the read/write state of a tag in the server changes these should be updated to
reflect that change.
o IS_COMMAND_MDO – tag can be read and written
o IS_NOT_COMMAND_MDO – tag can only be read
o Not specified – read/write state will be obtained from the server
To refresh the list of available properties, click the Refresh button (4).
To view the attributes of the selected property, click the Attributes button (5).
Once the property is added to the SDG, it will appear with an underscore (‘_’) appended to the end of the
OPC tag name:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 163
SCADA Data Gateway | Implementers Guide
This OPC Property can now be used like any other SDG MDO and can be mapped to other SDG points.
The description of the new MDO will become the description of the OPC property.
OPC properties are updated by setting the INI file configuration parameter OPCserverReadPropertiesTime.
This OPC Client configuration parameter can also be set by right-clicking on the OPC Client node and
selecting Edit OPC Client. Next, adjust The Read Properties Time field. A value of 0 will disable
property reads.
A Change in quality or value of the property will cause a propagation of the quality or value to a mapped
SDO.
Page | 164 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Note that some of the features listed above may not be available on all ODBC Client driver
implementations.
This will display the Add an ODBC Client dialog screen as shown below:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 165
SCADA Data Gateway | Implementers Guide
1. To configure a data source for use with the SDG ODBC client, you will need to access the
Administrative Tools in the Windows Control Panel.
2. Next, on the ODBC Data Source Administrator dialog screen, select the System DNS tab at the top.
Page | 166 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
3. Scroll through the list and locate the type of driver for your data source, i.e. SQL Server, and then
click Finish.
4. Next, enter the Name, Description, and Server location for the data source and click Next.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 167
SCADA Data Gateway | Implementers Guide
5. On the next screen, enter the login credentials and click Next.
6. Next, check the box for 'Change the default database to' and select your database from the dropdown
list. Click Next to continue.
Page | 168 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
7. Next, select any items that are appropriate for your environment and then click Finish.
8. Click the Test Data Source button to verify the data source is configured properly.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 169
SCADA Data Gateway | Implementers Guide
9. If configured properly, the data source should now appear under the System DNS tab.
Select a Data Source Name from the list and then click OK to continue. To add a new data source,
click New and follow the onscreen instructions to connect to your data source.
Page | 170 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Once the data source has been selected, the Database Connection String should automatically be
populated. Enter an Alias Name and then click OK to add the ODBC Client.
The ODBC Client should now appear in the tree under the Gateway node.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 171
SCADA Data Gateway | Implementers Guide
This will launch the Build Database Query dialog screen. This screen allows you to select a table to build
and test your queries against.
Page | 172 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
The Query Alias Name (1) allows you to define the name of the query. This is the name that will be
displayed under the ODBC Client node. Please note, the name cannot contain any spaces and once the
name has been defined, it cannot be changed.
The Display Table (2) dropdown box allows you to select a table from your database to run a query
against.
The database field names and types (3) display the fields defined in the selected table.
The SQL statement textbox (4) allows you to define your query and offers the following SQL
commands:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 173
SCADA Data Gateway | Implementers Guide
The SDG ODBC Client provides pre-defined MDOs that allow you to execute the query and navigate
the results. These MDOs are operated on by right-clicking on the desired MDO and selecting Change
Value of Internal User MDO. Please note, the CurrentRecord and RecordCount MDOs cannot be
operated on.
Command Description
CurrentRecord Displays the current record number
ExecuteQuery Executes the query selected under the ODBC Client node
GetNextRecord Gets the next record in the data set
MoveToRecord Navigate to the record entered by the user
RecordCount Displays the number of records in the data set
Page | 174 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
4.23.5 Executing an ODBC Query
To execute a user-defined query, select the desired query under the ODBC date source. Next, right-
click on the ExecuteQuery command MDO and select Change Value of Internal User MDO.
On the Change Boolean Value pop-up dialog screen, click the Value checkbox and then click OK.
This will execute the selected query and display the values for each of the query MDOs defined in the
database:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 175
SCADA Data Gateway | Implementers Guide
Next, set the necessary options and point number of the of the MDO you are trying to map.
The mapping should now be displayed in the mapping list located under the selected query.
Page | 176 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
4.23.7 Parameter Based Queries
The following is an example of a parameter based query that uses values input by the user to select
the appropriate rows from the table. This allows you to specify a value for an MDO in the WHERE
clause of the SQL statement. The parameter is denoted by a “?” in the query.
Since parameter based queries require input from the user, the Validate SQL button will not return the
results for the query.
In this example, an MDO named Param0 was created to allow you to specify the value of the ID field in
the SELECT statement. Param0 can be written to prior to executing the SQL statement to specify the
row that should be returned for a specific value of ID.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 177
SCADA Data Gateway | Implementers Guide
Note: Some ODBC Driver implementations may not support parameter based queries.
To set the value of your parameter, right-click on Param0 and select Change Value of Internal User
MDO. Enter the desired value on the Change Analog Value pop-up dialog screen and then click OK.
For this example, we set Param0 to 3 and then retrieved the record with ID = 3 from the table using
ExecuteQuery MDO as described above.
Page | 178 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
The results of the query are returned with the ID =3 as defined in Param0:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 179
SCADA Data Gateway | Implementers Guide
Next, locate the ODBC Client node and select the appropriate parameter (param0 in this example):
Page | 180 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
The onchange equation has the following structure:
Expr1 is the value that is being monitored for any changes. Expr2 is the deadband for detecting changes.
When Expr1 changes by more than Expr2, Expr1 is copied to the output of this equation.
The following example uses an INSERT query to update fields in a database using parameters
defined in the query:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 181
SCADA Data Gateway | Implementers Guide
When the value of point (P0) changes, we want the data to be written to the database table for field
value1 (param0). The first step is to map point P0 to a parameter in the query; in this example param0:
Page | 182 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Next, add the onchange equation by right-clicking on the Gateway node and selecting Add Equation.
On the Master Data Object Equation Editor dialog screen, select the onchange equation from the list
and drag-and-drop the equation on the Equation textbox:
Select the desired parameter from the ODBC client node that contains the mapping for point P0; in this
example Param0 and then define the values for Expr2 and Expr3:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 183
SCADA Data Gateway | Implementers Guide
In the above equation, when Param0 changes by any value, either positive or negative, we want the
query to be executed. Please note, since the onchange equation expects Expr1 to return a double, it may
be necessary to 'cast' the return value of Expr1 to a double. This is denoted by double(Expr1).
The last step is to map the onchange equation to the ExecuteQuery MDO of the ODBC Client. This is
done by dragging and dropping the equation on the Gateway node and then selecting the ExecuteQuery
MDO located under the INSERT node:
Page | 184 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
When the value of P0 changes, it will cause Param0 to change, which will trigger the ExecuteQuery
MDO and update the appropriate fields in the database table.
square( 0,1,5000)
Next, map the above equation to the ExecuteQuery MDO of the ODBC Client.
This dialog box is used to set the appropriate parameters of the slave data point.
To map points from Master Components to Master Components, drag a monitor MDO to a command data
type of a master device. When the MDO is dropped on the master data type the following dialog box is
displayed. Use this dialog box to set the appropriate parameters of the master command data point.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 185
SCADA Data Gateway | Implementers Guide
To map points from the OPC Master Component to other Master Components, drag a monitor MDO to an
OPC client. When the MDO is dropped on the OPC Client the following dialog box is displayed. Use this
dialog box to set the appropriate parameters of the OPC point.
MDOs can also be mapped to internal points (both predefined and user defined). When mapping MDOs to
these internal points they must already be defined. Select the source MDO and then drag it to a Gateway,
Session, Channel, or Sector node in the configuration tree. When the point is dropped on one of these targets,
a Tag Selector dialog will appear:
Page | 186 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
This dialog allows the destination mapped point to be selected. When MDOs are mapped in this way, the
destination point must be writeable.
Once this operation is completed the source MDO will provide a value to the destination MDO.
4.27 Setting IEC 60870-5-101 and -104 Slave Data Types to use Time Stamps
The SDG does not currently support setting a data type with time stamp (e.g., Type 58 – Single Point with
CP56 timestamp) via the GUI interface. However, the default data type can be set via the INI file.
To set the default data type to use a time stamp, select the "base" data type from the GUI (e.g., T1 - Single
Point). Then set the corresponding xxx_timeFormat parameter in the INI file. For example, for Single
Points, modify the following parameter:
For Double Points, use MDPNA_timeFormat, for Step Position use MSTNA_timeFormat, etc.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 187
SCADA Data Gateway | Implementers Guide
Currently, the DNP3 Default Variation cannot be set from the GUI; however, they can be set via the
ObjnnDfltVariation parameter in the INI file, where nn is the numerical data type. For example, the
following fields set the default variation for Object 1 (Binary Input) and Object 2 (Binary Input Change):
There can only be 1 instance of and SDG OPC server on a machine, as a result only 1 instance of SDG is
allowed to run.
SDG OPC Server can run in either polled or report mode see the INI parameters OPCServerReportMode
and OPCServerTagMode.
By setting GlobalCreateTagAutomatic = TRUE in the INI file, the data points returned from a remote slave
device to the SDG will automatically be shown in an OPC Client Browser that is connected to the SDG OPC
Server. Simply define the remote slave device in the INI file, or by using the Configuration User Interface,
run the SDG, and perform a general interrogation command (see section 4.27.12 Predefined Internal MDOs
for Monitoring and Control). All data points returned from the remote device will then be shown in the OPC
Client Browser and will not require an entry in the Point-Mapping file.
Since Command points are not received from the remote device, they will not be shown in an OPC Client
Browser. Command points may be configured in one of two ways:
1. Manually enter a physical tag name in the OPC client for the command point, for example if the
protocol is IEC60870-5-101 the physical tag name might be "COM1.L3.A3.T46.P1142". The value
written to this tag will be converted to a 101 Double point command using the command qualifier and
select mode (whether a select command is sent prior to the execute) specified in the "Command
Qualifiers" section of INI file. This method requires all points of the same type use the same
command qualifier and execute mode settings.
2. Create a point-mapping file with only Master component entries for each command point (the Slave
component columns are left blank) as outlined later in this section. Use the options field to set the
“Qualifier of Command” and “select mode” to a different value for each point if necessary. If the
options field is left blank, the values specified in the "Command Qualifiers" section of the INI file
will be used. Points listed in the point mapping file will appear in the OPC Client Browser followed
by the user name in parenthesis (if one was entered).
Page | 188 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
4.29.1 OPC Server Registration for SDG Service and GUI
As mentioned in the Quick Start guide the SDG must be registered as an OPC server if you wish to connect to
it from an OPC client. Normally this is done by the install.
Registration of the SDG as an OPC server can be done from the Windows Command Shell (DOS window) as
follows:
Open a Windows Command Shell (DOS window) by going to StartRun and typing “cmd” in
the "Open:" field, and then clicking the OK button.
When the Command shell is opened, you will typically be in your C: drive. If you have installed
the SDG on a hard drive other than the C: drive, then change to that drive by typing the letter for
that drive followed by a colon. For example, if you have installed the SDG on your E drive, then
type the command "E:" to change into the E drive.
Change to the directory where your SDG is installed by typing the command "cd
PATH_TO_SCADA_DATA_GATEWAY", where PATH_TO_SCADA_DATA_GATEWAY is the
directory where you have installed the SDG. For example, if you installed the SDG in the
directory C:\Program Files\TriangleMicroWorks\SDG and you are in the C drive in your DOS
window, then type the command "cd C:\Program Files\TriangleMicroWorks\SDG". Depending
upon how your system is configured, you may have to use the short directory names, such as "cd
C:\Progra~1\Triang~1\SDG".
Next, type the command "tmwgtway.exe -regopcserver" to register the OPC server. This will
register the Alarm and Event as well as the Data Access servers. Once registered, the SDG will
be available to OPC client software under the name “TriangleMicroWorks.OPCDA.1” for the
OPC Data server and “TriangleMicroWorks.OPCAE.1” for the OPC Alarm and Event server.
Un-registration is as above but use "tmwgtway.exe -unregopcserver".
The SDG service can, and should, also be registered as an OPC server. However, the GUI and service can not
be registered at the same time. Normally this is done automatically when the GUI and/or service are
executed.
In case this process has to be done manually, here are the necessary commands:
Command Description
GTWService.exe –regopcserver Register service as OPC Data access and Alarm and Event server
GTWService.exe –unregopcserver Un-register service as OPC Data Access and Alarm and EVENT
server
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 189
SCADA Data Gateway | Implementers Guide
When running the SDG in GUI mode the default setting is ‘The launching user’ this setting works fine if you
are doing simple interactive development with the GUI although it will cause multiple SDGs to attempt to be
launched should you try to connect to the SDG OPC Servers from different user accounts or a service running
under a different account. Running multiple instances of the SDG is not supported when using the OPC
Servers and actively blocked. A message box will be displayed stating this, should this condition be
encountered. When using multiple user accounts be it a service connecting or a different user it is required
that either the ‘The interactive user” or the ‘This user’ setting be selected. ‘The interactive user’ requires that
a user is logged in to the station in order to launch the SDG from an OPC client. The ‘This user’ setting can
be used to allow the SDG to launch without a user logged into the station.
When running the SDG as a service (i.e. GTWService) it is recommended that the ‘The system account
(services only)’ setting is selected.
Page | 190 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Property Name OPC Property Value Description
Provides the OPC Variant data type of the
#DataType OPC_PROP_CDT
Point
Provides the current value of the point (same
#Value OPC_PROP_VALUE
as the point it self i.e. without the .Value)
#Quality OPC_PROP_QUALITY Provides the OPC quality of the point
#TimeStamp OPC_PROP_TIME Provides the update time of the point
#AccessRights OPC_PROP_RIGHTS Provides the access rights of the point
Provides a description of the Point (if it was
#Description OPC_PROP_DESC
provided)
To use a property add it to the end of the tag name. For instance: if the MDO tag being subscribed to by an
external OPC Client is named MDNP.L4.T30.P0, to obtain its quality use MDNP.L4.T30.P0#Quality.
Simply specifying MDNP.L4.T30.P0 will return the value of this MDO.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 191
SCADA Data Gateway | Implementers Guide
When creating a Point Mapping file for the OPC Client, it is only necessary to define the “User Tag Name”
and “Communication Channel” fields. The “User Tag Name” must be the fully qualified path name to the
data point in the external OPC Server (such as Device1.Group.Tag1). The “Communication Channel” must
be the OPCserverName from the SDG INI file. If the OPCServerName is not specified in the initialization
file, it defaults to the OPCserverProgID. Refer to Section 1.4.4 for more information about these parameters.
Page | 192 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
3 Master Data Link Address (Not used for IEC 60870-5-104) / IEC 61850 Report Name /
IEC 61850 Data Set Name / ODBC Query Name
4 Master ASDU Address (Not used for DNP) / IEC 61850 Quality Name / IEC 61850 Data
Set Element Name / “ODBC_MDO” if ODBC point
5 Master Type ID / OPC type/ IEC 61850 Type / IEC 61850 Data Set Report Control Block
Name / ODBC Point type
6 Master Information Object Address/Information Number/ IEC 61850 Time Name / IEC
61850 Data Set GOOSE Control Block Name / ODBC Point name
7 Master Element Index (Only used for IEC 60870-5-103)
8 Master Function Type (Only used for IEC 60870-5-103)
9 Dataset Identifies the dataset present values descriptor element
10 Slave/Master Communication Channel / mapped OPC server
11 Slave/Master Data Link Address (Not used for IEC 60870-5-104) / mapped OPC tag name
12 Slave/Master ASDU Address (Not used for DNP)
13 Slave/Master Type ID / mapped OPC type
14 Slave/Master Information Object Address/Information Number
15 Slave/Master Element Index (Only used for IEC 60870-5-103)
16 Slave/Master Function Type (Only used for IEC 60870-5-103)
17 Master Equation
18 Master Options
19 Slave Options
20 Master Description
21 Mapping Mapping mode (optional) the value can be MDNP_PROTOTYPE,
MDNP_PROTO_ELEMENT, MDNP_DESCRIPTOR,
MDNP_DESCP_ELEMENT, MDNP_DESCP_ELEMENT_VALUE,
SDNP_PROTOTYPE, SDNP_PROTO_ELEMENT, SDNP_DESCRIPTOR,
SDNP_DESCP_ELEMENT, SDNP_DESCP_ELEMENT_VALUE,USER,
OPC_USER, MDO_USER, OPC_INTERNAL, MDO_INTERNAL, MDO, SDO,
OPC, I61850_DS, ICCP_MAPPING or I61850_MDO. If not specified SDO is
assumed.
Table 1 - Order of fields in the Comma Separated Value format Point-Mapping File
The configuration editor is used to build the Point Mapping file using a graphical user interface. The editor
provides the tools required to intuitively specify the information required in the Point Mapping file. The
Point Mapping file is both written and read by the SDG configuration editor; although it is not recommended
a user can choose to modify the file outside of the configuration tool to facilitate a more rapid editing
approach. For instance one could create some mappings through the GUI and then duplicate it many times in
a text editor (through copy/paste) while changing some key fields in the Point Mapping file. For DNP
datasets the first 3 to 6 fields are overridden with specific dataset descriptor and prototype meanings (i.e. The
mapping modes included for data set descriptors and prototypes).
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 193
SCADA Data Gateway | Implementers Guide
For example, logging of IEC 60870-5-101 single point binary events is controlled by INI file parameter
MSPNA_logToFile. If this is set false, specific individual single point event objects will have their events
logged by entering “LOG” in the option field for that point. If MSPNA_logToFile is set true, specific single
point objects will be excluded from the event log file by entering “!LOG” in the option field.
The Options field may contain zero, one, or more of the permissible options for the object (e.g., “G02 GI”).
When multiple options are required for one point, each option should be separated by a space.
Options are specified on various configuration dialog boxes by clicking the ellipse button (1) and selecting
the required options on the Options Editor dialog screen:
Page | 194 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
cause a write command to be executed
for the specific protocol of which the
point is a member. This will work for
any point that allows control/write
operations. Normally a command is
only issued when the command points
driving point (i.e. the point supplying
the value for the command point)
changes value or is updated.
Master Control 2PASS Control point issues 2-pass control
sequence (Select/Execute)
1PASS Control point issues 1-pass control
sequence (no Select command)
Slave Control 2PASS Control must be performed with a
Select/Execute command pair
1PASS (!1PASS) Control will be performed when an
Execute command is received (Select is
not required)
SYNC Control is “synchronous”. The reply
indicating completion of the command is
sent after the downstream device
completes the command.
ASYNC Control is “asynchronous”. The reply
indicating completion is sent
immediately to the originating device
and is not delayed waiting on the
downstream device to report completion
of the command.
Slave Monitored GI (!GI) Point is included in (excluded from)
Data response to General Interrogation
(“Station Interrogation”) request
CYC (!CYC) Point is (is not) reported as cyclic data
OPCTIMEUPDATE The event time used in OPC updates is
the time at which this value was last
updated relative to the SDG system
clock. 1
OPCTIMEREPORTED The event time used in OPC updates is
the reported time from the remote device
of the last event that caused this value to
change. 1
OPCAETIMEUPDATE The event time used in OPC Alarm and
Event updates is the time at which this
value was last updated relative to the
SDG system clock. 1
OPCAETIMEREPORTED The event time used in OPC Alarm and
Event updates is the reported time from
the remote device of the event that
caused this value to change. 1
Slave Equations EQTIMEUPDATE The event time used for this equation is
the time the equation was last calculated
relative to the SDG system clock. 1
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 195
SCADA Data Gateway | Implementers Guide
Page | 196 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
when an OPC DA update is received for
this OPC DA MDO. Valid values for
this option’s argument are
‘0’,’false’,’1’,’true’, ‘numeric value
(float or integer)’ or ‘some string’. If
this option is specified the difference
comparison in the
AE_RESET_VALUE_MDO option will
not be used.
IEC 60870-5-101 and IEC 60870-5-104:
Master Single Qux Specifies “Qualifier of Command” value
Command to use when qualifier is otherwise
unknown or when qualifier is forced (see
FQU below). ‘x’ is a hexadecimal
number representing the qualifier value.
FQU Force “Qualifier of Command” to
default value specified in .INI file or
with QUx option above, even if a
qualifier is received from an upstream
device (e.g., translate a pulse into a
latch). This is mutually exclusive with
PQU.
PQU Allow “Qualifier of Command” received
from upstream devices to be passed
through to downstream devices (e.g., a
long pulse received control is passed
through to the downstream device even
though default command qualifier for
point specifies a latch.). This is
mutually exclusive with FQU.
All TO nnn Application Response Timeout.
Commands Maximum amount of time in
milliseconds to wait for a response to a
command issued to this data point. This
option can be used to override the
ApplAbsRespTimeout configuration
parameter on a per point basis.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 197
SCADA Data Gateway | Implementers Guide
Page | 198 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
to 16)
Binary ALLOW xxxx Control is blocked if a control operation
Commands is attempted but not configured in this
(Type ID 45, mask. The reply indicating completion
46, 47) of the command will indicate that this
command failed.
Analog 1PASS (!1PASS) Control will be performed when an
Commands Execute command is received (Select is
(Type ID 48, not required)
49, 50)
IEC 60870-5-103:
General ACCEPT_AS_RAW Accept the value of the double point as
Command follows:
(Type ID 0 - "Transit"
20) 1 - "Off"
2 - "On"
3 - "Indeterminate"
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 199
SCADA Data Gateway | Implementers Guide
DNP3:
Master Binary LATCH Sets the default command mode for this
Control point to ‘latched’. Writing a value of 0
(Type ID to this point will issue a latch off
12) command, 1 will issue a latch on
command.
PULSE Sets the default command mode for this
point to ‘pulse’. Writing a value of 0 to
this point will issue a pulse off
command, 1 will issue a pulse on
command.
PRIORITY nnn Sets the priority of the binary or analog
write command. 128 is the default if not
specified.
PULSEWIDTH nnn Sets the pulse width for this point to nnn
milliseconds. This option is used in
conjunction with the PULSE option.
PULSEWIDTH_VAR Sets the pulse width for this point to
mdo_name mdo_name milliseconds. This option is
used in conjunction with the PULSE
option. Mdo_name represents a MDO
tag in the SDG whose value is used to
specify the pulse width.
PAIRED Sets the default command mode for this
point to ‘paired’. Writing a value of 0 to
this data point will issue a trip command,
1 will issue a close command.
FCM Force default command mode. The
command mode specified in the INI file,
or by one of the LATCH, PULSE, or
PAIRED, options will override the
command mode in an incoming request.
PCM Pass command mode. The command
mode received from upstream devices
will pass through to downstream devices
independent of the current default
command mode for this data point.
Analog In DEADBAND value If this parameter is specified for a master
(Type ID device, the value of an analog point read
30) by the master will have to change by
more than this amount to be transferred
to a mapped slave point (i.e. causing an
event). A value of 0 will disable dead
band testing.
Analog In SCALE rawMin rawMax Provide scaling value for the point. The
(Type ID eguMin eguMax raw analog input value will be scaled as
30) follows:
m = (eguMax-eguMin) / (rawMax-
rawMin)
Page | 200 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
b = eguMin – (m * rawMin)
scaledValue = (m * inValue) + b. The
resulting value will be provided as a
double to any mapped SDOs.
Slave Monitored CLS1, CLS2, CLS3 Specifies which class events for this data
Points point are returned in. This option can be
used to override the ObjXXDfltClass
INI configuration parameters on a per
point basis.
Binary ALLOW Bitmask to allow/disallow specific control
Output operations:
(Type ID 0x01 No Select Allows single-pass
12) control operations (allows operations that
were not previously selected as part of a SBE
Binary
or 2-pass operation)
Output 0x02 Use Default Allows no specification
(Type ID of operation. This allows pre-defined, fixed,
41) or default operations to take place. It can be
used with binary controls (OBJ12)
0x04 Pulse Allows pulse for binary
controls (OBJ12)
0x08 Latch Allows latch for binary controls
(OBJ12)
0x10 Paired Close Allows paired close for
binary controls (OBJ12)
0x20 Paired Trip Allows paired trip
command qualifier (OBJ 12)
0x40 Non-standard Allows non-standard
command qualifier
Modbus:
Master Holding PRIORITY nnn Sets the priority of the write command.
Register, 128 is the default if not specified.
Coil
Holding DEADBAND value If this parameter is specified for a master
Register, device, the value of an analog point read
Input by the master will have to change by
Register more than this amount to be transferred
to a mapped slave point (i.e. causing an
event). A value of 0 will disable dead
band testing.
Master Holding SCALE rawMin rawMax Provide scaling value for the point. The
Register, eguMin eguMax raw analog input value will be scaled as
Input follows:
Register m = (eguMax-eguMin) / (rawMax-
rawMin)
b = eguMin – (m * rawMin)
scaledValue = (m * inValue) + b. The
resulting value will be provided as a
double to any mapped SDOs.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 201
SCADA Data Gateway | Implementers Guide
For a detailed description of reported vs. update time, see section 4.28.1 Event Time Tags and Database
Update Times
Page | 202 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
4.31.1.4 LOGMSKxxxx and OPCAE_LOGMSKxxxx Events used in the MDO option field
This table defines the kind of event LOGMSK may use for an individual data object as identified in the
above table. These mask values will also be used as defines in the ‘Sequence of Event Log Files’ and/or
the ‘OPC Alarm and Event Server’.
The Types of Log Masks supported by the SDG can be found in the INI file.
When a physical tag name is generated, the component fields in the tag name have field identifier prefixes
as follows:
When a field is not used in the protocol associated with a point, the field does not appear in the tag name.
Examples of physical tag names are:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 203
SCADA Data Gateway | Implementers Guide
Tag Name Protocol
COM1.L12.A23.T3.P1 (101 protocol)
COM1.L12.A23.T3.P146.0.F160 (103 protocol)
COM1.A23.T3.P1 (104 protocol)
COM1.L3.T1.P0 (DNP protocol)
COM1.L3.T0.P0 (Modbus protocol)
The result of all equations is of type “double.” The type conversion functions are provided to
allow changing the equation result into another type. For example, the bool() function can be
used to convert the result of one equation into a Boolean value that can be used as an input to
an equation that requires Boolean arguments.
One use of equations is to convert the “raw” value reported by the SDG into an IEC Normalized or Scaled
value. For example, to convert the reported value, which has a range of -32768 to 32767 to a Normalized
value, which has the range of -1 to +1-2-15, enter an equation to divide the reported value by 32768. Please
refer to the examples below in Section 4.26.5.9.
Page | 204 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
The equation parser does not support equations in which two operators appear consecutively.
For example, an equation of the form (x * -2) is not supported. Generally, you can work
around this limitation by rewriting the equation. For this example, the equation can be
rewritten as ((0 – x) * 2).
When an equation argument is a tag and contains characters normally used as operators for calculations
(i.e. / + * etc), the tag should be enclosed in ‘(single quote) to facilitate parsing of the tag. The ‘(single
quote) operates as an escape character on the tag name.
Certain equation operators require that the value of their arguments be able to be converted to a type double
(R8) if the argument does not natively/internally support this conversion a casting operator should be used
to convert the value to the appropriate type. For example the following will require a cast:
Then the equation short(_intR4 * 100) will generate a type mismatch error since the multiply (*) operator
requires doubles as its arguments. To get this to work the equation should be written as
short(double(_intR4) * 100). The reason for this is that internal MDOs are strictly typed and only return
values of the type they are declared as.
/SUBESTACAO_P/INPUT/00_00_10/Message_2_3.m11
‘/SUBESTACAO_P/INPUT/00_00_10/Message_2_3.m11’
Example:
SUM(‘/SUBESTACAO_P/INPUT/00_00_10/Message_2_3.m11’,2)
Equations are entered using the equation editor. For more information on using equations, please review
section 4.8 Equations.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 205
SCADA Data Gateway | Implementers Guide
Page | 206 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
4.32 Master and Slave Component Columns
The configuration editor maps data points in Master Components (shown in the right-hand column) to data
points in Slave Components or command points in Master Components (shown in the left-hand column). The
purpose of this is to specify how the value for each data point in a Slave Component or command point in a
Master Component is obtained. This could be a direct mapping to a Master Data Point, or an equation, which
incorporates multiple Master Data Points. This mapping can also include changing fields such as the
information object address and even conversion to a different protocol.
The data points defined in the Master Components (right-hand columns) are an image of monitored or
controllable data in remote Slave devices. Only the objects in the remote Slave that are mapped to points in
an SDG Slave Component are listed in the Master Component column. There may be data received by the
Master Component which has no Master Point defined. This is not an error condition and the unused data is
simply discarded.
Since the OPC Server Slave Component is able to automatically generate a list of data received from the
remote slave device, these points do not require entries in the Master Component column (i.e. They are
mapped automatically when an OPC client connects to the SDG. For more information on mapping points to
the OPC Server, see section 4.26.1 Mapping points to the Internal OPC Server.
When mapping monitor master points to control/command master points the left hand column represents the
control/command point and the right hand column represents the monitor point. The monitor point receives a
value from an external slave and then causes the mapped master command point to issue a command to its
associated slave.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 207
SCADA Data Gateway | Implementers Guide
Multiple Slave Component Points may be associated with a single Master Component Point. The Slave data
points identified in the left-hand columns are data that will be created in SDG Slave Components, and may be
read by remote Masters. While a Slave Component point can only be mapped to one Master Component
point, a Master point may be mapped to zero, one, or more Slave Component points. If mapped to zero Slave
Component points, a Master Component point is only available to the OPC Server Component.
Field CSV file field Applies to Protocol Range of Corresponding INI file parameter or
index Values comment
User Tag 1 101, 103, 104, DNP, String Specify the fully qualified name of the
OPC Client, OPC OPC tag in the external server or a user
AE Client, IEC defined name for the tag or a fully
61850 qualified IEC 61850 tag name
Channel / Port 2,10 101, 103, 104, DNP, COM1, PhysComChannel, OPCserverName,
OPC Client, COM2, PhysComChnlName, I61850ServerName
datasets, OPC AE 127.0.0.1,
Client, IEC 61850 …
Data Link 3,11 101, 103, DNP, Decimal SessionLinkAddress,
Address datasets, IEC 61850 I61850ReportControlBlockName
ASDU 4,12 101, 103, 104, Decimal DbasSectorAddress if a session (link
Address datasets, IEC 61850 Address) only has one sector (ASDU
address) defined, the link address and the
ASDU address are usually set to the same
value
Type ID (101, 5,13 101, 103, 104, DNP, Decimal Defines the data type of the point. Must
103) datasets, OPC reference the non-time-tagged Type ID for
Client, OPC AE the data type. See Interoperability
Object Group
Client, IEC 61850 Documents in Appendix for list of
(DNP)
supported Type IDs for each protocol.
IOA/INF 6,14 101, 103, 104, DNP, Decimal Point Number (DNP)
datasets, OPC Client Information Object Address (101,104)
item properties, IEC Information Number (103)
61850
Property ID for OPC client point
Element Index 7,15 103 Decimal Zero offset index to identify point within
INF for 103 Type IDs 3 (Measurands I)
and 9 (Measurands II), leave this field
blank for all other Type Ids
Function Type 8,16 103 Decimal It is assumed that a remote
IEC 60870-5-103 slave device will report
each INF with only one function type.
DNP Dataset 9 DNP Identifies the dataset present values
descriptor element
Equation 17 Any String Specifies the equation
Tag Options 18,19 All String Specify options/properties for the tag
Tag 20 All String Specify a description for the tag
Description
Page | 208 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Mapping 21 All String Provides a hint to the point map parser as
Mode to how to interpret the data in the other
fields.
A common convention is to use 1-based numbering, with a preceding digit to indicate the type of data. With
the preceding digit prepended to the address, the full range is:
Address Type
000001 - 065535 Digital Outputs and internal flags
100001 - 165535 Digital inputs
300001 - 365535 Analog inputs
400001 - 465535 Analog outputs and internal Holding registers
The SDG uses the value in the protocol, which is 0 – 65535, with no preceding digits. Thus, values are
represented as:
Therefore, the application receiving the data should take into consideration the quality flag of the point before
using the data.
The follow sections of this document describe how the values and quality flags of the points are translated
between the different protocols so that you can ascertain the certainty of your data.
As an example, though, consider the situation where an OPC Client is reading point values from the SDG. In
this case, the SDG’s STD_QLTY_INVALID quality flag gets mapped to the OPC Client with the status
OPC_QUALITY_BAD. Therefore, when the SDG is started, it is possible to see results similar to what is
shown in Figure 18.
The point “MDNP.L3.T1.P0(Point0)” has an initial value of “Off” but the OPC quality of this point is “8”
which means that the point value is bad.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 209
SCADA Data Gateway | Implementers Guide
Once the current value of this point has been received from the remote device, the SDG will update the OPC
Client accordingly, and the point will have a quality value of “192” which means the point value is good.
4.33.3 Translating data types between different protocols (Master to Slave mapping)
In the Point-Mapping example shown below, the mapping translates the IEC 103 protocol to an IEC 101
protocol (1). The Master TypeID 20 may receive Slave TypeID 45 data in protocol 101.
Page | 210 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
The following table shows the data types which may be translated from one protocol to another.
Summary of Equivalent Data Types for DNP3, IEC 101, IEC 103, Modbus and OPC
IEC
DNP3 IEC 103 Modbus
Description 101/104 OPC Type Database Format
Object Type Type
Type
1, 2, 3, 4, 1 (discrete
Binary Input 1, 2, 10 1, 2 VT_BOOL Boolean
30, 31 input)
VT_UI1,
Analog Input 30, 32, 9, 10, 11, 4 (input VT_I1, Short or Unsigned
3, 9
(Integer) 40 12, 34, 35 register) *2 VT_I2 or Long
VT_I4
Analog Input
(Floating 13, 14, 36 4 VT_R4 Short Float
Point)
Binary
Output, Step
12 45, 46, 47 20 0 (coil) *1 VT_BOOL Boolean
Change (101
only)
VT_I2 or Short or Unsigned
Counter Input 20, 21 15, 16, 37
VT_R8 Long
Analog
3 (holding VT_I2 or Short or Unsigned
Output 41 48, 49
register) *1,2 VT_I4 Long
(Integer)
Analog
Output
50 VT_R4 Short Float
(Floating
Point)
Bitstring
VT_UI4 or
(Unsigned 32 7, 8, 33 Unsigned Long
VT_R8
bit)
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 211
SCADA Data Gateway | Implementers Guide
Table 4 Summary of Equivalent Data Types for DNP3, IEC 101, IEC 103, and OPC
*1
= also input for Modbus
*2
= Unsigned Short for Modbus
Short Float 32-bit short floating point number value truncated to type’s range
IEEE Standard 754 if required
-3.4 * 1038 to +3.4 * 1038
fraction = UI23[1..23]
exponent = UI8 [24..31]
sign = BS1[32]
Double 64-bit floating point number value truncated to type’s range
IEEE Standard 754 if required
-1.7 * 10308 to +1.7 * 10308
fraction = UI52[1..52]
exponent = UI11 [53..63]
sign = BS1[64]
Page | 212 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
If the same data type is mapped between Master and Slave component points, the database storage format is
not used and the native data type will be mapped exactly. The tables below may be used to determine how
values and quality flags are translated when a Slave Component point is mapped to a Master Component
point of a different data type. Simply locate the Master Component data type table below and note how the
values and quality flags are mapped into the SDG Database Storage format. Then locate the Slave
Component data type table below and identify how these values are mapped to the SDG Database Storage
format corresponding to the Master Component Data type.
For example: To determine the value and quality of an OPC Slave Component Boolean point when mapped to
an IEC 870-5-101 Master Component Double Point Information (DPI) with a value of 0 (indeterminate or
intermediate state), first locate the DPI table. The Master Component column shows a DPI value of 0 is
mapped to a SDG Database Storage value of Boolean 0 and STD_QLTY_IN_TRANSIT is set to TRUE.
Then locate the OPC Boolean table. The SDG Database Storage column contains a row with Standard
Quality Flag STD_QLTY_IN_TRANSIT set TRUE and this row in the Slave Component column shows the
OPC Quality Flag will be set to UNCERTAIN. The Boolean value will be set accordingly.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 213
SCADA Data Gateway | Implementers Guide
STD_QLTY_INVALID set
TRUE
Quality Descriptors: Standard Quality Flags: Quality Descriptors:
BL, SB, NT BL, SB, NT, IV BL, SB, NT
IV set TRUE STD_QLTY_REF_ERROR is
TRUE
IV set TRUE STD_QLTY_UNINITIALIZED
is TRUE
Page | 214 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
short float value short float short float value
Quality Descriptors: Standard Quality Flags: Quality Descriptors:
BL, SB, NT, IV, BL, SB, NT, IV, OV BL, SB, NT, IV, OV
OV
IV set TRUE STD_QLTY_REF_ERROR is
TRUE
IV set TRUE STD_QLTY_INTRANSIT is
TRUE
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 215
SCADA Data Gateway | Implementers Guide
Page | 216 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
4.33.7 IEC 60870-5-103
Time Tagged – Type IDs 1, 2
To From
SDG Database Storage Master Component
0 = not used
Boolean = 0 1 = determined state OFF
Boolean = 1 2 = determined state ON
Boolean =0 3 = not used
STD_QLTY_INVALID set
TRUE
Measurand – Type IDs 3, 9
13-bit normalized: range <-1 to 1-2-12>
To From
SDG Database Storage Master Component
short short
Time-Tagged measurand – Type ID 4
32-bit short floating point: range <-3.4*1038 to 3.4*1038>
To From
SDG Database Storage Master Component
short float short float
Command – Type ID 20
From To
SDG Database Storage Master Component
0 = not used
Boolean = 0 1 = determined state OFF
Boolean = 1 2 = determined state ON
3 = not used
4.33.8 DNP3
Binary Input, Object Group 1 and 2
To From
Slave Component or SDG Database Storage Master Component
Master Component
Binary command
State = 0 Boolean = 0 State = 0
State = 1 Boolean = 1 State = 1
Restart = 1 STD_QLTY_UNINITIALIZED On-Line = 0, Restart = 1
Communication Lost = 1 STD_QLTY_NOT_TOPICAL Communication Lost = 1
Remote Forced = 1 UPDTRSN_CTRL_BY_COMM Remote Forced = 1
Local Forced = 1 UPDTRSN_CTRL_AT_DEVICE Local Forced = 1
Chatter = 1 STD_QLTY_IN_TRANSIT Chatter = 1
Binary Output Status, Object Group 10
To From
Slave Component SDG Database Storage Master Component
State = 0 Boolean = 0 State = 0
State = 1 Boolean = 1 State = 1
Restart = 1 STD_QLTY_UNINITIALIZED On-Line = 0, Restart = 1
Communication Lost = 1 STD_QLTY_NOT_TOPICAL Communication Lost = 1
Remote Forced = 1 UPDTRSN_CTRL_BY_COMM Remote Forced = 1
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 217
SCADA Data Gateway | Implementers Guide
Page | 218 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Long, variation 1, 5 Unsigned Long Short, variation 2, 6
Long, variation 1, 5
Restart = 1 STD_QLTY_UNINITIALIZED On-Line = 0, Restart = 1
Communication Lost = 1 STD_QLTY_NOT_TOPICAL Communication Lost = 1
Remote Forced = 1 UPDTRSN_CTRL_BY_COMM Remote Forced = 1
Local Forced = 1 UPDTRSN_CTRL_AT_DEVICE Local Forced = 1
Over Range = 1 STD_QLTY_OVERFLOW Roll Over = 1
4.33.9 Modbus
Coil, Type 0
From To From To
Slave Component or SDG Database Storage Master Component
Master Component
Coil write
State = 0 Boolean = 0 State = 0
State = 1 Boolean = 1 State = 1
Discrete Input Register, Type 1
To From To From
Slave Component SDG Database Storage Master Component
State = 0 Boolean = 0 State = 0
State = 1 Boolean = 1 State = 1
Holding Register, Type 3
16 bit value
From To From To
Slave Component or SDG Database Storage Master Component
Master Component
Holding register
write
value Unsigned short value
Input Register, Type 4
16 bit value
To From To From
Slave Component SDG Database Storage Master Component
value Unsigned short value
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 219
SCADA Data Gateway | Implementers Guide
Page | 220 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
To From To From
OPC Server Slave Component SDG Database Storage OPC Client Master
or OPC Client Master Component
Component
VT_R8 double float VT_R8
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 221
SCADA Data Gateway | Implementers Guide
Predefined Internal MDOs may be read directly in OPC or mapped to other protocols in the Point-
Mapping file by listing them in the Master Component “User tagName” column and leaving the other
Master Component Point-Mapping file columns blank.
Predefined Internal MDOs may be either type String (Str), Integer (Int) or Binary (Bin).
Some Predefined Internal MDOs are specific to a Master or Slave component as shown in the table
below, so each session will not have all Predefined Internal MDOs.
If a Predefined Internal MDO is read/write (R/W), then it may be written to, or read from.
If the Predefined Internal MDO is read-only (R/O) its value may be read from, but not written to.
Predefined Internal MDOs marked “Error Count” are incremented each time an error is detected.
They may be preset to a specific value by writing the value to it or cleared by simply writing a value
of zero.
Reading a R/W Predefined Internal MDO returns the last value written to it.
The meaning of each Predefined Internal MDO is explained in the table below. Unless otherwise
noted, all Predefined Internal MDOs designated “R/W Int” may be set to any integer value.
The M/S column identifies whether the Predefined Internal MDO is applicable to a Master (M) or
Slave (S) component.
Page | 222 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
PREDEFINED INTERNAL MDOS M/S PROTOCOL TYPE DESCRIPTION
SOECounter M/S All R/W SOE Update Counter. Counts the
Int number of entries added to the SOE
event log since last reset
ChannelsOfflineCounter M/S All R/W Counts the total number of times all
Int sessions on all channels have gone
off line
ChannelsOnlineStatus M/S All R/O TRUE if all sessions on all channels
Bin are on line
DataBaseUpdateQSize M/S All R/O Int The current number of items in the
data base queue that have not been
processed yet
DbQsizeExceededErrorLimit M/S All R/O TRUE if the DataBaseUpdateQSize
Bin exceeds the DbQSizeErrorLimit
configuration parameter. If this
limit is exceeded items are not
added to the data base queue until
DataBaseUpdateQSize falls below
this limit. In other words if this
limit is exceeded data is lost.
DbQsizeExceededWarningLimit M/S All R/O TRUE if the DataBaseUpdateQSize
Bin exceeds the DbQSizeWarningLimit
configuration parameter
OPCClient_X.CurrentServerTim N/A N/A R/O Str The current time on the OPC Server
e that this client is connected to.
OPCClient_X.LastUpdateTime N/A N/A R/O Str The last time the OPC client was
updated by the OPC server.
OPCClient_X.NumGroups N/A N/A R/O Int The number of groups created on
the OPC server.
OPCClient_X.PercentBandWidth N/A N/A R/O Int A performance utilization indicator.
OPCClient_X.ServerOK N/A N/A R/O TRUE if the OPC client is
Bin connected to the OPC server.
OPCClient_X.ServerStartTime N/A N/A R/O Str The time the server was started.
OPCClient_X.ServerStatus N/A N/A R/O Str A textual description of the OPC
server status.
OPCClient_X.VendorInfo N/A N/A R/O Str The vendor of the OPC Server.
COMx.ChannelRedialLimitContr M/S All R/W Indicates true when modem re-dial
ol Bin limit reached, set to false to start
dialing again. This Tag is only
valid for Modem Pool Channels.
COMx.NumChecksumErrors M/S All R/W Error Count. Checksum errors
Int detected on the communication
channel
COMx.NumConfirmFailures M/S All R/W Error Count. Data link confirm
Int failures on this channel
COMx.NumLengthErrors M/S All R/W Error Count. Frame length errors
Int detected on the communication
channel
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 223
SCADA Data Gateway | Implementers Guide
Page | 224 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
PREDEFINED INTERNAL MDOS M/S PROTOCOL TYPE DESCRIPTION
COMx.Ly.SessionActiveControl M/S All R/W Control flag to force a session
* Bin active or inactive. Write true(1) to
this value to attempt to bring the
session active. Write false(0) to
make a session inactive. Note the
session and channel may or may not
actually go offline when this is set,
ie. The OnLineStatus MDO may or
may not go to false when this is set
to false. This setting ultimately
stops the session from responding
on its corresponding link layer and
originator address. It does not
directly turn off the session or the
channel because the protocol does
not support such functionality. The
lack of response may or may not
cause the session and channel to go
offline depending on the
configuration and protocol.
COMx.Ly.SessionOfflineCounte M/S All R/W Counts the number of times this
r Int session has gone offline
COMx.Ly.TotalErrors M/S All R/W Total number of errors on this
Int session
COMx.Ly.NumTxASDUs M/S All R/W Number of fragments transmitted
Int on this channel
COMx.Ly.NumRxASDUs M/S All R/W Number of fragments received on
Int this channel
COMx.Ly.CreateTagsAuto M All R/W Write true (1) to this point to send a
Bin general interrogation to the
connected slave device and create
the data types and tags for this
session. The session has to be
online and a previous general
interrogation can’t be pending.
This value will be reset to false (0)
when the operation completes.
COMx.Ly.ColdRestartNow M DNP3 R/W Write true(1) to this value to force a
Bin Cold Restart of the corresponding
DNP session.
COMx.Ly.WarmRestartNow M DNP3 R/W Write true(1) to this value to force a
Bin Warm Restart of the corresponding
DNP session.
COMx.Ly.DNPActionNow M DNP3 R/W See the description below for a
Int definition of the bits in this mask.
COMx.Ly.DNPActionMask0-4 M DNP3 R/W See the description below for a
Int definition of the bits in this mask.
COMx.Ly.DNPActionPrd0-4 M DNP3 R/W Time between actions defined in the
Int DNPActionMask0-4, specified in
milliseconds.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 225
SCADA Data Gateway | Implementers Guide
Page | 226 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
The IECActionNow and DNPActionNow masks allow the user to execute one or more of the supported
actions whenever the mask is modified. These actions are performed once when the mask is updated.
Writing the same value to the mask will execute the specified actions again. These masks allow the user to
control exactly when an operation is performed.
The IECActionMask0-4 and DNPActionMask0-4 masks and their corresponding periods (IECActionPrd0-
4 and DNPActionPrd0-4) allow the user to specify one or more actions to be performed periodically.
When the user writes a non-zero value to one of the action periods, the actions selected by the
corresponding mask will be performed and a timer is started which will repeat the selected operations at the
specified period. The user can change the IECActionMask0-4 or DNPActionMask0-4 masks at any point
and the new actions will be performed the next time the period expires or when the user writes a non-zero
value to the corresponding period. Writing to the IECAction0-4 or DNPAction0-4 masks will not cause the
action to be performed. You can terminate any periodic action by writing a value of 0 to the corresponding
action period.
Notes:
1) The DNP specification states a class 0 (static data) poll should be preceded by a class 1,2,3 (event
data) poll; hence bits 0, 1, and 2 should be set when bit 10 is set.
2) The DNP specification states a read of static data should be preceded by a read of change events. As
an example, if bit 12 is set to read binary inputs, bit 3 should also be set to read the binary input
change events. The same logic should be applied to the rest of the data types.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 227
SCADA Data Gateway | Implementers Guide
3) At gateway startup, if the action period has a non-zero value, the actions specified by the bit-mask
will be performed immediately and repeated at an interval specified by the period in milliseconds.
4) It is recommended that the GlobalCreateTagAutomatic INI file parameter be set to FALSE if the
‘Specific flag’ is set. Otherwise the SDG will automatically add all data points received from the
remote device to the local data base and hence poll for all the data points on the remote device in a
very inefficient manner.
5) Action mask command bits are not mutually exclusive; multiple bits can be set to cause the execution
of multiple commands. For example if bits 21,0,1,2,10 are set 2 messages will be sent. The first
message will be a clock sync, followed by a read of class 1-2-3-0 in the second message.
6) Normally bits 12-17 will cause a read of variation 0 with qualifier code 06 (all points). If the remote
device supports the range qualifier codes (00 and 01), the specific flag may be set to reduce the
response message size (assuming all the points in the remote device are not defined in the SDG
Database).
Typically this can be used to indicate the DNPActionNow has completed and a reason why. This can also
be useful to sequence a set of commands/requests on a serial multi-drop connection.
Page | 228 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Read all static binary input and analog input points once every 60 minutes:
The change event bit is set as well as the static input value bit, as recommended by the DNP
specification.
The following example will read the specific binary points at a frequency of 5 seconds and the analog
points at a frequency of 20 seconds. The corresponding change event bits are not set as the
assumption is that the DNP application does not support change events.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 229
SCADA Data Gateway | Implementers Guide
Notes:
At gateway startup, if the action period has a non zero value, the actions specified by the bit-mask will be
performed and repeated at the interval specified by the period in milliseconds.
Action mask command bits are not mutually exclusive; multiple bits can be set to cause the execution of
multiple commands. For example if bits 0 and 1 are set 2 messages are sent first a clock sync, followed by
a general interrogation request.
Notes:
1. At gateway startup, if the action period has a non zero value, the actions specified by the bit-mask will
be performed and repeated at the interval specified by the period in milliseconds.
2. Action mask command bits are not mutually exclusive; multiple bits can be set to cause the execution
of multiple commands. For example if bits 0 and 1 are set 2 messages are sent first a read coils,
followed by a read holding registers.
Page | 230 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
4.34 SDG Clock
The UseSystemClock configuration parameter allows you to configure the SDG to use the Windows system
clock or an internal clock maintained within the SDG. If UseSystemClock is set to TRUE the SDG will
always get the current date and time directly from the Windows system clock. This mode is useful if an
external clock synchronization mechanism is being used to synchronize the Windows system clock outside
the SDG. In this mode of operation clock synchronization requests from remote masters are parsed by the
SDG but the results are ignored.
The default mode of operation for the SDG is to use an internal clock managed by the SDG. The SDG will set
its internal clock from the Windows system clock at startup. After initialization the internal clock is a free
running clock that is maintained using a free running millisecond timer. Even though the internal clock is
independent from the Windows system clock the two clocks will initially report the same time since the
internal clock is updated using the same Windows millisecond timer used to maintain the Windows system
clock. The internal clock however will be adjusted by any clock synchronization requests received from any
remote master. After an external clock synchronization request the internal clock will remain at a fixed offset
from the Windows system clock.
By default, OPC data values, as well as data points generated by equations, use the ‘Update’ time as described
above. The reason that this is done is to provide a consistent time base for changes whether or not the data
was received with a time tag, and whether or not the time in the slave devices has been synchronized. OPC
only sees the "current value" of the data points, not an "event sequence", hence the time tag accuracy is not
critical.
The user can choose to override the default and report the ‘Reported’ time for OPC data values and equations
using the OPCAETimeSource, OPCTimeSource and EquationTimeSource INI file configuration parameters
and/or the OPCTIMEUPDATE, OPCTIMEREPORTED, EQTIMEUPDATE, EQTIMEREPORTED point
mapping file data point options. For more details on configuration parameters see the INI file description.
For more details on data point options see the data options field description in the point configuration file
section.
The SDG slave components and the sequence of events log file report time only if a valid time is reported by
the slave device. Hence, the default time for events to external masters talking to an SDG slave component or
a time recorded in a log file will be the ‘Reported’ time.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 231
SCADA Data Gateway | Implementers Guide
Optionally the SOE Queue can be enabled by setting EnableSOEQ to true in the INI file. When the queue is
enabled events are logged to a first in first out queue and an external application can remove the events from
the queue. See the example application SOEReader (a C++ application to pull records from the SOE Queue)
and SOEReaderCS (a C# application to pull records from the SOE Queue). The samples are located in the
Samples folder under the SDG install folder. The samples a shipped as Visual Studio projects that can be built
with Visual Studio 2010 or later after installation of the SDG.
The interface to the SOE Queue has the following methods. Which are available in SOEInterface.h and
SOEPInvoke.cs.
SOEInterface.h
/// <summary> Open the SOE Queue. </summary>
///
/// <returns> 1 for success, any other value is a failure. </returns>
/// <summary> set the starting SOE Queue record to retrieve. </summary>
///
/// <param name="h"> The handle to start at. </param>
///
/// <returns> 1 for success, any other value is a failure. </returns>
/// <summary> remove all acknowledged records from the SOE Queue. </summary>
///
/// <returns> 1 for success, any other value is a failure. </returns>
SOEPInvoke.cs
[DllImport("SOEQueue.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern Int32 SOEOpen();
Page | 232 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
SOEQueue.lib is located with the SOEReader source code. This library provides the interface into the
SOEQueue.dll for the operation of the application.
SOEReader and SOEReaderCS are dependent on the SOEQueue.dll for interfacing with the SOE Queue
in the SDG.
The basic idea is to open the queue i.e. SOEOpen(), and then repeatedly call SOEreadSOERecord() to
retrieve the queued records. As the records are retrieved they are also acknowledged in the queue for
later removal. The queue is back by a persistent disk storage file i.e. SOEQFileName INI param to
maintain the queued events between executions of the SDG. When retrieval of the records is complete
SOEClose() should be called to shut down the connection to the SDG. Note that SOE Queue reader
application must be executed on the same machine that the SDG is running on.
To prevent unbounded growth of the SOEQFileName, records are removed from this file automatically
if a reader application is not removing the records. The number of records maintained is specified with
MaxSOEQSize.
The parameters listed in the table below, and further described in subsequent sections of this document,
can be used to configure the event log file and queue capabilities of the Gateway. To set or change these
parameters, edit the INI file prior to execution of the Gateway software; the parameters are located in the
“Data Change Event Logging” section within the INI file.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 233
SCADA Data Gateway | Implementers Guide
EventLogFileName = “c:\mypath\GW%02ry2%02rmr%02rdm.log”
This will allow event records to be recorded in log files with names such as:
c:\mypath\GW090818.log
where 090818 represents a date (year is 00, month is 06, and day of month is 09). This example organizes
Sequence of Event log files based on the reported dates of events – there will be one log file for each day in
which an enabled event is reported.
Page | 234 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
4.35.2 Event Log Record Format
EventLogRecordFormat defines the format of event records stored in the Sequence of Event Log files. The
format contains “%xxx” property fields that are expanded when an event occurs to describe a unique property
of that event. The field names are included in the format using syntax very similar to the ‘C’ programming
language ‘printf’ function. More specifically, each property field begins with a “%” and is followed by an
optional field width, and a property name.
The tables in this section describe the property field names that can be used in event EventLogRecordFormat
(and also in EventLogFileName).
The following figure provides an example event log record format, and an example expansion of that format
for a specific event.
O
le D
le e)
_T O:
ab r M
ab lu
Ta ec
Ta nth
D
e
le
e
e
e
u s N_ v a
le
_T e
bl
bl
bl
VF t c M
_T fo
bl
T_ s
ab
R s e
N am
T_ y
ab
D .m
T_ o
Ta
e :s im
Ta
e ,e e
D a
N n
D r
D m
T
h
R d
VF he
R a
IF n
IF io
s e mm t
T_
se of f t
e ye
N
e ed
e ed
e g
e ipt
e y(
o
e
se r ta
se igit
se rt
t
hh rt
se cr
se lit
R
se r
on ue
po
o
po
s
:
/
p
d
qu
de
va
re
re
re
4
Field Event
Value Field Names Description
Name Property
The current value of a master data point (after the change which generated the
event). The representation of the value depends on the data type of the point.
val Value
Some values may be represented as character strings (e.g., “on”, “off”), while
others may be represented with integer or floating-point values.
The current value of a slave data point. The representation of the value depends
on the data type of the point. Some values may be represented as character
sval Value
strings (e.g., “on”, “off”), while others may be represented with integer or
floating-point values.
A hexadecimal number indicating the quality of the current value of the master
qly Quality
data point. The quality can indicate a combination of the following bits:
A hexadecimal number indicating the quality of the current value of the slave
data point. The quality can indicate a combination of the following bits:
sqly Quality 0x0000 Successful – no fault or other conditions
0x0001 Overflow or Rollover
0x0008 Elapsed Time Invalid
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 235
SCADA Data Gateway | Implementers Guide
Field Event
Value Field Names Description
Name Property
0x0010 Blocked
0x0020 Substituted (over-ride or forced)
0x0040 Off-line (not topical or not dated)
0x0080 Invalid
0x0100 Reference error
0x0200 In transit
0x0400 Un-initialized (not set since startup)
0x0800 Test mode
Indicates the reason the event was reported, detected, or generated.
Possible values are:
0x0001 The data is being updated for an unknown reason; e.g.,
reported through protocols that do not support cause-of-
transmission, or reported through IEC 60870-5-103 with a
COT of "test mode"
0x0002 The data was requested; no change event is necessarily
indicated.
0x0004 The data is being refreshed by the source of data (without
request); no change event is necessarily indicated.
0x0008 The source of data indicates this update is a change.
0x0010 The data was changed as a result of a control operation
through communications.
0x0020 The data was changed as a result of a control operation
executed locally at the device.
0x0040 Used for control points: A control operation has been initiated
(e.g., sent to a remote device). This could occur for the second
pass of a 2-pass operation, or it could occur for the only pass
Update of a 1-pass operation.
rsn
Reason 0x0080 Used for control points: A control operation has been
confirmed (e.g., the remote device sent confirmation of having
received a control operation). However, though confirmed,
the control operation may not yet be finished. When it is
finished, 0x0010 will be used.
0x0100 Used for control points: The first pass in a two-pass control
operation has been initiated (e.g., sent to a remote device)
0x0200 Used for control points: A first pass in a two-pass control
operation has been confirmed (e.g., the remote device sent
confirmation of having received the first-pass control
operation).
0x0400 Used for control points: The de-select operation (cancel of a
1st-pass select operation) has been initiated (e.g., sent to a
remote device)
0x0800 Used for control points: A de-select operation (cancel of a 1st-
pass select operation) has been confirmed (e.g., the remote
device sent confirmation of having de-selected the control
operation).
0x1000 Used for control points: An error occurred with the control
operation.
Page | 236 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Field Event
Value Field Names Description
Name Property
0x8000 Used by some protocols to indicate the point or device is
operating in a test mode
Table 7 Value Field Names - Describes properties which indicate an Event
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 237
SCADA Data Gateway | Implementers Guide
Page | 238 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
one in which the event was received because the reported
hour was near 0 and the current hour was near 23.
The date/time is being reported by the remote device as
I
being invalid.
U As reported in DNP3 object 2, variation 3.
N Need Time IIN is asserted by remote DNP3 device.
R The time was reported with the event.
Table 9 Reported Date and Time Event Description
Field
Event Property Identification Field Names Description
Name
dcr Description The description as entered for the point in the Point-Mapping
configuration file.
ptg Physical The physical tag name, which is a combination of some or all of
Tag Name communication channel name, link address, application address,
information object address (point number), data type, element
index, and/or function type.
utg User The user tag name as entered for the point in the Point-Mapping
Tag Name configuration file. If no user name is entered, the physical tag
name is used.
prt Communication Channel The name of the communication channel associated with this
Name point.
lnk Link Address The link address of the device from which the point is
communicated.
app Application The application layer address of the “sector” from which the
Address point is communicated. Not all protocols use application
addressing.
ioa Information Object The information object address of the point. Some protocols
Address refer to this as point number.
typ Data Type The data type, in numerical form, of the point.
pcl Protocol The protocol, in string form, through which the point is
communicated.
eli Element Index The element index of the point. Not all protocols use element
indexing.
ftp Function Type The function type of the point. Not all protocols use function
typing.
Table 10 Identification Field Names Event Description
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 239
SCADA Data Gateway | Implementers Guide
Escape sequence
Expanded as character code:
\a 7
\b 8 (common use: backspace)
\f 12
\n 10 (common use: line-feed, or new-line)
\r 13 (common use: carriage-return)
\t 9 (common use: tab)
\v 11
\0mm
\1mm
Octal equivalent (where m is 0-7)
\2mm
\3mm
\xhh hexadecimal equivalent (where h is 0-9, a-f, or A-F)
Table 11 Escape sequences in Event Log Records
Logging may be enabled for all kinds of events, enabled for only a selected few kinds of events, enabled for
only one kind of event, or disabled for all kinds of events associated with each data type. These combinations
are accomplished by adding together any or all of the kinds of events listed in the following table. A value of
zero will disable logging.
Page | 240 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
0x1000 A remote device has responded to indicate an error in a control operation.
0x8000 Either the data point or the remote device is operating in a test mode.
Table 12 List of Events and the Mask Value
4.36.1 Background
DNP3 Datasets are collections of data treated as a unit. They can be read and written through the SDG GUI.
Typically there is a 1 to 1 relationship between a dataset descriptor and its present values unless a dataset
prototype is referenced in a descriptor. When this is the case the prototype elements are expanded into the
present value. A descriptor needs to exist on the master and slave before the present values can be
transferred. The descriptors and prototypes are used to define the type information of the present values.
Descriptor and prototype definitions can be transferred between slave and master devices.
4.36.2 Prototypes
Prototypes can be thought of as a formal registered definition for the structure of a group of related data that
can be referenced by a descriptor. When a descriptor references a prototype it inherits the definition of the
elements in a prototype. As a result the elements in a prototype will be expanded into the data set present
value. In the descriptor the prototype is just shown as referenced. A prototype has a unique identifier called a
UUID which should be registered with a standards body. The UUID is also used to reference a prototype
from a descriptor.
To add a prototype to your configuration, a DNP3 session must already exist. Right-click on the DNP3
session, select Add Data Type and then select a T85 (Data Set Prototypes).
Next, right-click on the T85 data type and select Add DNP Prototype:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 241
SCADA Data Gateway | Implementers Guide
Complete the necessary fields and then click OK to add the new prototype to the T85 data type as shown in
the following screenshot:
To add an element to a prototype, right-click on the prototype (i.e. ‘C0’) and then select Add DataSet
Element to Prototype:
Page | 242 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Upon completing the definition of a prototype the SDG configuration window will look similar to this.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 243
SCADA Data Gateway | Implementers Guide
To edit a prototype or an element, right-click on the item and select Edit DNP Prototype, for prototypes, or
Edit DNP Dataset Element, for elements.
4.36.3 Descriptors
Descriptors are used to specify the actual definition for the elements in the dataset present value. The
definition can consist of individual elements and/or references to prototypes.
To add a descriptor to your configuration, a DNP3 session must already exist. Right-click on the DNP3
session, select Add Data Type and then select a T86 (Data Set Descriptors):
This will add the T86 and T87 data type to the configuration (see section 4.30.4 Dataset Preset Values for
more information on the T87 data type). Next, right-click on the T86 data type and select Add DNP
Descriptor:
Page | 244 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
Complete the necessary fields and then click OK to add the new descriptor to the configuration as shown in
the following screenshot:
To add an element to a descriptor, right-click on the descriptor (i.e. ‘S1’) and then select Add DataSet
Element to Descriptor:
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 245
SCADA Data Gateway | Implementers Guide
Upon completing the definition of a descriptor the SDG configuration window will look similar to the
configuration shown below (in this example, a prototype was referenced in the descriptor):
Because a prototype was referenced in the descriptor, the present values are expanded to show the elements of
the prototype as shown below:
Page | 246 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
4.36.4 Dataset Present Values
The T87(Data Set Present Values) data type are commonly treated as standard MDOs or SDOs in the SDG;
depending on whether they are part of a master or slave component. Present values obtain their type
information from the descriptor with the same point id. For example, descriptor element
mdnp.L3.T86.S0.D000 will define the type information for the data set present value MDO
mdnp.L3.T87.X0.P0. The present value points can not be directly added or deleted. Their lifetime is
controlled by the associated descriptor elements. As a result, slave present value points are treated differently
than normal SDOs in the SDG. They exist as a result of the slave descriptor object and are not created as a
result of a point mapping operation. The point mapping operation simply connects an MDO to the slave data
set present value point so it can be supplied with a value.
To map to a data set slave point, drag a MDO onto a data set slave present value data object (i.e.
sdnp.L4.T87.X0):
Next, use the dropdown box (1) to select the data set present value element that should have its value supplied
by this MDO. If you want to supply the data set present value element with the status value of the MDO,
click the ellipse button (2) to display the Options Editor dialog screen and then enable the
MAP_MDO_SATAUS option.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 247
SCADA Data Gateway | Implementers Guide
Data set present value MDOs can also be mapped to other SDOs in the SDG by dragging them to
the other SDOs.
Page | 248 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
5. Troubleshooting
The following information is provided to assist you with common problems encountered when setting up and
configuring the SDG.
5.1 Permissions
The SDG reads and writes several configuration files and log files during its course of configuration and
operation. The SDG will not function properly if it cannot read from or write to the directories it needs access
to. The user of the SDG needs to make sure they have permission to read from and write to the logging
directory and the ini file directory.
5.4 Errors in the Point Mapping File When Saving the SDG
These error messages are most likely related to errors discovered in the Point Mapping (CSV) file during
startup. Since the file could not be completely read on startup, the SDG will not overwrite it on exit in order
to ensure there is no loss of data.
To get more information related to these errors, ensure that you have “Errors” checked in the protocol
analyzer log filter and then restart the SCADA Data Gateway. You will most likely get an error message
stating that there are errors in the CSV file. However, the errors are now listed in the Protocol Analyzer along
with a line number that corresponds to the line in the CSV file where the error occurred.
These errors may be resolved by:
1. Exiting TMWgtway.exe
2. Editing either the Point Mapping file (CSV) or the INI file
3. Restarting TMWgtway.exe
5.5 Network: Network Driver Appears To Not Be Serving This Directory Dialog
On Windows NT/2000 run the setupex.exe program in the C:\Program Files\Common
Files\TriangleMicroWorks directory to install the required drivers for the SDG licensing software. This
step is not required for Windows 95/98/ME.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 249
SCADA Data Gateway | Implementers Guide
The message "physical layer error: Error opening channel" indicates that the device is unable to open the
specified channel and port. The cause of the message depends on whether the channel is a serial or TCP/IP
channel.
If you are still getting this message after your corresponding device attempts to open the port, then you
should check your configuration of both the Slave and Master device.
A "MODEM_CHANNEL: open failed" message is also typical when a dial-up connection is not
established, and will occur each time the above error message is displayed. This message occurs because
the SDG attempts to open the modem, but unless the dial up connection is established, the open will fail.
(This is the normal condition when the channel is idle).
5.5.2 Configuration
Verify the configuration of both the SDG and your remote device:
For a serial connection, verify the baud rate, parity, and number of stop bits are configured the same
for both devices.
For a TCP connection, verify the TCP and port address, as well as the client/server settings.
For either type of connection, verify that the link address and common address of ASDU (sector
address) match the addresses set in the remote device.
Page | 250 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
5.6 “Timeout waiting for application layer response fragment or restart." Message
is displayed
The "Timeout waiting for application layer response fragment or restart." message is normal behavior after a
warm restart command is sent.
If you are seeing this error at other times, it may indicate that the device with which you are communicating is
either slow or has not established a connection at all.
If you always receive this message, it probably indicates that the connection has not been established. In this
case, you should check your configuration. For a serial connection, verify the baud rate, parity, and number
of stop bits configured. For a TCP connection, verify the TCP and port address, as well as the client/server
settings. For either type of connection, you should verify the link addresses.
If the connection is established but you occasionally receive this message, then the device you are connected
to is probably slow to respond. You might try changing the ApplResponseTimeout parameter in the INI file.
To fix this problem, contact Triangle MicroWorks. We will send you a new msvcrt.dll with instructions
for where to load the file.
http://www.microsoft.com/en-us/download/details.aspx?id=8328
If you will be running the Service Monitor, then your computer must have the Microsoft .NET 4.0
redistributable installed. If it is not installed, the SDG installer will warn you. You can download
and install the redistributables from the Microsoft web site:
http://www.microsoft.com/en-us/download/details.aspx?id=17718
If your converter does not support Send Data control, you will need to acquire a different converter before
using the SDG in your project.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 251
SCADA Data Gateway | Implementers Guide
Triangle MicroWorks has tested the SDG using the “485SD9TB Port Powered RS-232 to RS-485
Converter” from B&B Electronics:
http://www.bb-elec.com/Products/Serial-Connectivity/Serial-Converters/Port-Powered-RS-232-to-RS-
485-Converters.aspx
A complete list of INI file configuration options is available in the SDG Application by selecting HelpINI File from
the menu.
The order is not important; when you save the INI file from the SDG, it will reorganize the parameters and add the
comments.
5.10 After installing Windows XP Service Pack 2, OPC Communications via DCOM
no longer work
Installing Windows XP Service Pack 2 with the default configuration will inhibit OPC communications via
DCOM. The OPC Foundation has prepared the following white paper with instructions for configuring
Service Pack 2 for use with OPC/DCOM communications:
http://www.opcfoundation.org/Archive/5a74033a-f99a-43eb-ad43-
78b889b8d6d0/White%20Papers/OPC,%20DCOM%20and%20Security.pdf
http://www.opcfoundation.org/Archive/5a74033a-f99a-43eb-ad43-
78b889b8d6d0/Using%20OPC%20via%20DCOM%20with%20XP%20SP2.pdf
http://www.opcfoundation.org/Archive/5a74033a-f99a-43eb-ad43-
78b889b8d6d0/Using%20OPC%20via%20DCOM%20with%20XP%20SP2%20v1.10.pdf
Page | 252 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
http://www.trianglemicroworks.com/SDGSupportRequest.aspx
Please be sure to complete all the requested information and to include your INI and CSV files for the
configuration along with the protocol analyzer log.
The INI and CSV files are typically located in the executable path of the SCADA Data Gateway; by default:
C:\Program Files\Triangle MicroWorks\SCADA Data Gateway
To save the protocol analyzer log to a file, click any where in the Protocol window and then select
FileSave As from the SDG menu.
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 253
SCADA Data Gateway | Implementers Guide
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 255
SCADA Data Gateway | Implementers Guide
7. Glossary of Terms
Term Description
APCI (Application The transport interface is a stream-oriented interface, which does not define
Protocol Control any start or stop mechanism for the ASDUs of IEC 60870-5-101. In order to
Information) detect the start and end of the ASDUs, each APCI includes delimiting
elements (i.e., a start char, specific length of the ASDU, and control field).
APDU (Application Contains an APCI and an ASDU. The 1st octet, which is subsequently the 1st
Protocol Data Unit) octet of the APCI, contains the length of the APDU (max 253).
Application Layer Layer 7 of the ISO model and one of the layers used in the EPA model. The
application layer contains a number of application functions that involve the
transmission of ASDUs between source and destination.
ASDU (Application The application user layer contains a Data Unit ID Data Unit Type
Service Data Unit) number of “Application Functions” that
involve the transmission of ASDUs
ASDU
between source and destination. The
ASDU is composed of a Data unit Information Information
identifier and one or more information Object Object ID
objects Time Tags
Information
baseband A type of digital data transmission in which each medium (wire) carries only
one signal, or channel, at a time. In contrast, broadband transmission enables a
single wire to carry multiple signals simultaneously.
Client A device that receives data on a communication link. Also referred to as
Master or SCADA node.
Comma Separated File A file format in which each object in the file is separated by a comma. When
(CSV) an object is to be omitted then two commas are side by side with no space in
between.
Communication Channels These may be physically discrete ports, or logically discrete ports that share a
physical connection, such as multiple TCP/IP “serial pipes”, each of which is a
separate logical port, even though they may share a single physical 10BaseT
interface.
control direction The direction of transmission from the controlling station to a controlled
station.
DNP or DNP3 Distributed Network Protocol
EPA (Enhanced A protocol reference model that provides (compared to the 7 layer ISO model
Performance architecture) a three-layer architecture for obtaining faster response times for
Architecture) the critical information but with service limitation.
Page | 256 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
FUN Function type
Function Type The 1st octet of the information object identifier/data unit identifier defines the
function of protection equipment.
IEC (International The IEC is a worldwide organization for standardization comprising all
Electrotechnical national electrotechnical committees. The object of the IEC is to promote
Commission) international co-operation on all questions concerning standardization in the
electrical and electronic fields.
IED Intelligent Electronic Device
Monitoring direction The direction of transmission from the controlled station to a controlling
station.
OLE Microsoft Windows™ platforms Object Linking & Embedding
OSI (Open System The reference model of ISO-CCITT, which subdivides communication into
Interconnection) seven layers. EPA uses a three-layer approach.
Physical Tag Name Each row in the Point-Mapping file has a “Physical tagName” field that is
generated from other entries (it is not entered by the user). When making
reference to a Master Component Point, either the User Tag Name (if one was
entered) or the Physical Tag Name may be used interchangeably to identify the
point.
Point A data entity. The lowest level of indivisible data collected or sent by the
SDG.
RTU Remote Terminal Unit
SCADA (Supervisory Unbalanced transmission procedures are used in SCADA systems in which a
Control and Data Master station controls the data traffic by polling outstations sequentially. In
Acquisition) this case the Master station is the primary station that initiates all message
transfers while the outstations are secondary stations that may transmit only
when they are polled
SDG SCADA Data Gateway
© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 257
SCADA Data Gateway | Implementers Guide
TCP/IP (Transmission A protocol developed for the Internet to get data from one network device to
Control Protocol/Internet another; "TCP uses a retransmission strategy to insure that data will not be lost
Protocol) in transmission".
Type ID Is a code, which unambiguously identifies the ASDU’s type within the
collection of all possible types, for a system or a profile. The Type ID enables
the receiving application service to send each data unit to the correct
application process for handling the indicated type of data unit. It also enables
the receiving application process to see what type of data is contained in the
data unit and to determine its structure from a local table.
User Tag Name The User Tag Name is a user-supplied text label that identifies the Master
Component Point. The User Tag Name should not contain spaces. Also
beware of using characters in tag names that may have special meaning to
OPC clients.
10 Base T One of several adaptations of the Ethernet (IEEE 802.3) standard for Local
Area Networks (LANs). The 10Base-T standard (also called Twisted Pair
Ethernet) uses a twisted-pair cable with maximum lengths of 100 meters. The
cable is thinner and more flexible than the coaxial cable used for the 10Base-2
or 10Base-5 standards.
Page | 258 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.