0% found this document useful (0 votes)
2 views

SDG Implementers Guide

The SCADA Data Gateway Implementation Guide provides detailed instructions on installing and using the SCADA Data Gateway software, including licensing options and terms. It outlines the legal agreement between the user and Triangle MicroWorks, detailing the responsibilities and limitations associated with software use. Additionally, the guide includes technical support resources and an overview of the system requirements and setup procedures.

Uploaded by

haingoc dinh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

SDG Implementers Guide

The SCADA Data Gateway Implementation Guide provides detailed instructions on installing and using the SCADA Data Gateway software, including licensing options and terms. It outlines the legal agreement between the user and Triangle MicroWorks, detailing the responsibilities and limitations associated with software use. Additionally, the guide includes technical support resources and an overview of the system requirements and setup procedures.

Uploaded by

haingoc dinh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 258

SCADA Data Gateway | Implementers Guide

SCADA Data Gateway


Implementation Guide
Software Release Version 3.05

Manual Revised: March 2017

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | i


SCADA Data Gateway | Implementation Guide

Property of Triangle MicroWorks, Inc.

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.

Page | ii © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

READ THIS BEFORE INSTALLING THE SOFTWARE


AND BEFORE ACCEPTING THE LICENSE AGREEMENT

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.

9. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL TRIANGLE MICROWORKS


BE LIABLE FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL OR PUNITIVE DAMAGES
WHATSOEVER, INCLUDING ANY CLAIMS FOR LOST PROFITS, BUSINESS INTERRUPTION, LOST
INFORMATION OR OTHER DAMAGES ARISING OUT OF THE USE OF INABILITY TO USE THE
SOFTWARE. IN NO EVENT SHALL TRIANGLE MICROWORKS HAVE ANY LIABILITY FOR ANY DATA
STORED OR PROCESSED WITH THIS SOFTWARE, INCLUDING THE COST OF RECOVERING ANY LOST
DATA. IN ALL EVENTS, TRIANGLE MICROWORKS’ SOLE OBLIGATION OR LIABILITY UNDER THIS
AGREEMENT IN THE AGGREGATE IS A REFUND OF THE MOST RECENT LICENSE FEE PAID FOR THE
SOFTWARE. THE PARTIES AGREE THAT THESE LIMITATIONS ARE AN ESSENTIAL PART OF THE
AGREEMENT AND THAT TRIANGLE MICROWORKS WOULD NOT ENTER INTO THE AGREEMENT
WTIHOUT THESE LIMITATIONS. THIS LIMITATION OF LIABILITY CLAUSE WILL SURVIVE FAILURE OF
ITS ESSENTIAL PURPOSE.

Page | iv © 1994 - 2017 Triangle MicroWorks, Inc. All rights


reserved.
SCADA Data Gateway | Implementers Guide

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

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | v


SCADA Data Gateway | Implementers Guide

How to Obtain Additional Assistance


Technical Support:
http://www.trianglemicroworks.com/SDGSupportRequest.aspx

SDG Quick Start Video:


http://www.trianglemicroworks.com/Videos/SDG Quick Start Video/player.aspx

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

Page | vi © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

Implementers Guide Contents


1. Overview ....................................................................................................................................................... 13
1.1 Purpose of this Manual ......................................................................................................................... 13
1.2 Introduction to SDG ............................................................................................................................. 13
1.3 SDG Components ................................................................................................................................. 15
1.3.1 Master/Client Components of the SDG................................................................................... 15
1.3.2 Slave/Server Components of the SDG .................................................................................... 15
1.3.3 Master / Slave Data Flow ........................................................................................................ 16
1.3.3.1 Sequence from remote Slave devices to Master Component data collection ............. 16
1.3.3.2 Command Sequence from Remote Master Devices ................................................... 16
1.4 Data Point Addressing .......................................................................................................................... 17
1.4.1 Communication Channels ....................................................................................................... 18
1.4.2 Sessions ................................................................................................................................... 18
1.4.3 Sectors ..................................................................................................................................... 19
1.4.4 External OPC Servers.............................................................................................................. 20
1.5 Modem Pools........................................................................................................................................ 21
2. Installation and Setup .................................................................................................................................. 23
2.1 System Requirements ........................................................................................................................... 23
2.2 SDG Performance................................................................................................................................. 23
2.3 Installing the SCADA Data Gateway ................................................................................................... 24
2.4 SCADA Data Gateway Licensing ........................................................................................................ 24
2.5 Running the SDG as a Service ............................................................................................................. 26
2.5.1 Installation, Removal and Setup.............................................................................................. 26
2.5.2 Service Configuration and Startup .......................................................................................... 26
2.5.3 Service Monitor ....................................................................................................................... 29
2.5.4 Service Events and Status Messages ....................................................................................... 29
3. User Interface ............................................................................................................................................... 31
3.1 Main Window ....................................................................................................................................... 31
3.2 Configuration Window Interface.......................................................................................................... 32
3.2.1 Refreshing the Display ............................................................................................................ 32
3.2.2 Configuration Toolbar Menus ................................................................................................. 33
3.2.3 Configuration Window Menu Items........................................................................................ 33
3.2.3.1 File Menu ................................................................................................................... 33
3.2.3.2 Edit Menu ................................................................................................................... 34
3.2.3.3 View Menu ................................................................................................................. 34
3.2.3.4 Window Menu ............................................................................................................ 35
3.2.3.5 Help Menu .................................................................................................................. 35
3.2.4 Context Menus ........................................................................................................................ 36
3.3 Protocol Analyzer ................................................................................................................................. 36
3.3.1 Protocol Analyzer Toolbar Menus .......................................................................................... 37
3.3.2 Protocol Analyzer Menu ......................................................................................................... 38
3.3.2.1 File Menu ................................................................................................................... 38
3.3.2.2 Edit Menu ................................................................................................................... 38
3.3.2.3 View Menu ................................................................................................................. 38
3.3.2.4 Options Menu ............................................................................................................. 39
3.3.2.5 Window Menu ............................................................................................................ 39
3.3.2.6 Help Menu .................................................................................................................. 40
3.3.3 Filters and Controls ................................................................................................................. 40
3.3.3.1 Filter Bar .................................................................................................................... 40
3.3.3.2 Device Filter ............................................................................................................... 41
3.3.4 Printing Analyzer Output ........................................................................................................ 41

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 7


SCADA Data Gateway | Implementers Guide

3.3.5 Setting the Analyzer Font ........................................................................................................42


3.3.6 Analyzer Buffer Settings..........................................................................................................43
3.4 Gateway Configuration Dialogs ...........................................................................................................43
3.4.1 SDG Options ............................................................................................................................43
3.4.2 Gateway Properties ..................................................................................................................45
3.4.2.1 Time Zone Names Values...........................................................................................49
3.4.3 Content Help ............................................................................................................................50
4. Configuration Reference ..............................................................................................................................51
4.1 Tmwgtway.ini Initialization File ..........................................................................................................51
4.1.1 Tmwgtway.ini Parameters .......................................................................................................51
4.1.2 Hidden INI parameters.............................................................................................................52
4.1.3 View All INI Parameters .........................................................................................................53
4.2 Point-Mapping File ...............................................................................................................................54
4.2.1 Saving the INI and CSV files...................................................................................................55
4.2.2 Selecting the INI during Start-up .............................................................................................56
4.3 Tags in the SDG ....................................................................................................................................56
4.3.1 Creating Tags Automatically ...................................................................................................57
4.4 Master Data Objects (MDOs) ...............................................................................................................58
4.5 Slave Data Objects (SDOs)...................................................................................................................59
4.5.1 Editing Tag Options .................................................................................................................60
4.6 Internal Predefined MDO Points ..........................................................................................................61
4.7 Internal User defined MDOs .................................................................................................................61
4.8 Equations ..............................................................................................................................................65
4.9 Adding Channels...................................................................................................................................66
4.9.1 Adding Modem Pools ..............................................................................................................66
4.9.1.1 Modem Pool Channel .................................................................................................69
4.9.2 Add TCP/IP Channel Dialog ...................................................................................................70
4.9.3 Serial Channel ..........................................................................................................................71
4.10 Adding Sessions ....................................................................................................................................72
4.10.1 Master Sessions........................................................................................................................73
4.10.1.1IEC 60870-5-101 ........................................................................................................73
4.10.1.2IEC 60870-5-103 ........................................................................................................76
4.10.1.3IEC 60870-5-104 ........................................................................................................78
4.10.1.4Master DNP3 ..............................................................................................................79
4.10.1.5Modbus Master ...........................................................................................................82
4.10.2 Slave Sessions ..........................................................................................................................83
4.10.3 IEC 60870-5-101 .....................................................................................................................83
4.10.4 IEC 60870-5-104 .....................................................................................................................84
4.10.5 Slave DNP................................................................................................................................85
4.10.6 Modbus Slave ..........................................................................................................................86
4.11 Adding Sectors ......................................................................................................................................87
4.12 Adding Data Types ...............................................................................................................................88
4.13 Action Masks ........................................................................................................................................88
4.13.1 IEC Action Mask .....................................................................................................................89
4.13.2 DNP Action Mask....................................................................................................................90
4.13.3 Modbus Read Action Mask .....................................................................................................92
4.13.4 Modbus Write Action Mask.....................................................................................................94
4.13.5 Modbus Master Dual Register .................................................................................................95
4.14 Multi Drop Polling strategies for DNP and Modbus ............................................................................97
4.14.1 Channel ActionMask ...............................................................................................................97
4.14.2 Prioritization of Unsolicited Responses ...................................................................................98
4.14.2.1Example 1. ..................................................................................................................98

Page | 8 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
4.14.2.2Example 2................................................................................................................... 98
4.14.3 Disabling Channels and Session.............................................................................................. 99
4.14.4 Supporting INI Configuration Parameters and MDOs ............................................................ 99
4.14.4.1DNPChannelResponseTimeout .................................................................................. 99
4.14.4.2ApplDNPAbsRespTimeout ........................................................................................ 99
4.14.4.3PhysOfflinePollPeriod ................................................................................................ 99
4.14.4.4MDNPunsolHoldOffTime .......................................................................................... 99
4.14.4.5ChannelActiveControl - MDO ................................................................................... 99
4.14.4.6SessionActiveControl - MDO .................................................................................... 99
4.15 IEC 61850 Client ................................................................................................................................ 100
4.15.1 Adding an IEC 61850 Report Control Block ........................................................................ 104
4.15.2 Adding an IEC 61850 Data Attribute from the Report Control Block.................................. 107
4.15.3 Adding an IEC 61850 Command Point ................................................................................. 109
4.15.3.1Changing an IEC 61850 Command Point ................................................................ 110
4.15.4 Other mechanisms to obtain Data from a 61850 Server........................................................ 110
4.15.4.1GOOSE Control Blocks ........................................................................................... 110
4.15.4.2Polled Data Sets ....................................................................................................... 111
4.15.4.3Polled Point Sets....................................................................................................... 111
4.15.5 IEC 61400-25 Alarms (Senvion/Re Power Turbine alarms, proposed addition to the IEC
61400-25 specification) ......................................................................................................... 111
4.15.5.1Configuring the SDG to use IEC 61400-25 Alarms ................................................. 112
4.15.5.2Adding the IEC 61400-25 Alarms Node .................................................................. 112
4.15.5.3Adding the IEC 61400-25 Alarms............................................................................ 114
4.15.5.4Alarm Processing ..................................................................................................... 116
4.16 IEC 61850 Server ............................................................................................................................... 116
4.16.1 Mapping Points to the IEC 61850 Server .............................................................................. 119
4.17 ICCP Client and/or Server .................................................................................................................. 122
4.17.1 Editing/Deleting a Client/Server ........................................................................................... 126
4.17.2 Connecting to a Server .......................................................................................................... 126
4.17.3 Creating/Editing Client Model .............................................................................................. 126
4.17.4 Adding a ICCP Data Set Transfer Set ................................................................................... 130
4.17.5 Adding a ICCP Data Attribute from the DS Transfer Set ..................................................... 132
4.17.6 Adding an ICCP Control Point.............................................................................................. 134
4.17.6.1Operating a ICCP Control Point............................................................................... 136
4.17.7 Other mechanisms to obtain Data from an ICCP Server ....................................................... 137
4.17.7.1Polled Data Sets ....................................................................................................... 137
4.17.7.2Polled Point Sets....................................................................................................... 138
4.18 ICCP/Gateway Quality ....................................................................................................................... 138
4.19 Standalone ICCP/ICCP Server ........................................................................................................... 139
4.19.1 Mapping Points from a Master device to the ICCP Server ................................................... 140
4.20 OPC Alarm and Event Client ............................................................................................................. 143
4.20.1 Adding OPC AE Client Items ............................................................................................... 146
4.20.2 OPC Alarm and Event MDO................................................................................................. 148
4.20.2.1Event MDO .............................................................................................................. 148
4.20.2.2Event Attribute MDOs ............................................................................................. 149
4.20.2.3OPC AE MDO Options ............................................................................................ 150
4.21 OPC Alarm and Event Server............................................................................................................. 154
4.21.1 Specifying and using the Event Space .................................................................................. 154
4.21.2 Example Configuration ......................................................................................................... 155
4.22 OPC Data Access Client..................................................................................................................... 157
4.22.1 OPC Client Items .................................................................................................................. 160

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 9


SCADA Data Gateway | Implementers Guide

4.23 ODBC Client.......................................................................................................................................164


4.23.1 Adding an ODBC Client ........................................................................................................165
4.23.2 Configuring a Data Source for the SDGs ODBC Client ........................................................166
4.23.3 Selecting an ODBC Data Source ...........................................................................................170
4.23.4 Adding an ODBC Query........................................................................................................171
4.23.5 Executing an ODBC Query ...................................................................................................175
4.23.6 Mapping a query MDO ..........................................................................................................175
4.23.7 Parameter Based Queries .......................................................................................................177
4.23.8 Mapping Items to Parameters Defined in a Query.................................................................179
4.23.9 "Triggering" the ExecuteQuery MDO ...................................................................................180
4.23.1 Polling the Data Source for Changes .....................................................................................185
4.24 Mapping Points from Master Components to Slave Components ......................................................185
4.25 Mapping Points from Master Components to Master Components ....................................................185
4.26 Mapping Points from Slave Components to Slave Components ........................................................187
4.27 Setting IEC 60870-5-101 and -104 Slave Data Types to use Time Stamps .......................................187
4.28 Setting DNP3 Event Types and Default Variations ............................................................................187
4.29 Internal OPC Server ............................................................................................................................188
4.29.1 OPC Server Registration for SDG Service and GUI .............................................................189
4.29.2 OPC Server Point Properties..................................................................................................190
4.30 Mapping Points to an External OPC Server........................................................................................192
4.31 Format of the Point-Mapping file .......................................................................................................192
4.31.1 Definition of Fields contained in the Point Mapping File .....................................................194
4.31.1.1Point Identification Fields .........................................................................................194
4.31.1.2Data Options Field ....................................................................................................194
4.31.1.3Table of Control Options and the Meaning ..............................................................194
4.31.1.4LOGMSKxxxx and OPCAE_LOGMSKxxxx Events used in the MDO option
field ...........................................................................................................................203
4.31.1.5Physical Tag Name ...................................................................................................203
4.31.1.6User Tag Name .........................................................................................................204
4.31.1.7Equation Field ...........................................................................................................204
4.31.1.8Supported Operators Used in Expressions................................................................206
4.31.1.9Examples of Valid Expressions ................................................................................206
4.31.1.10 Description Field.................................................................................................206
4.32 Master and Slave Component Columns ..............................................................................................207
4.33 Data Points ..........................................................................................................................................209
4.33.1 Modbus Point Numbering ......................................................................................................209
4.33.2 Point Initialization..................................................................................................................209
4.33.3 Translating data types between different protocols (Master to Slave mapping) ....................210
4.33.4 SDG Database Storage Formats.............................................................................................212
4.33.5 SDG Database Standard Quality Flags ..................................................................................212
4.33.6 IEC 60870-5-101 and IEC60870-5-104.................................................................................213
4.33.7 IEC 60870-5-103 ...................................................................................................................217
4.33.8 DNP3 217
4.33.9 Modbus ..................................................................................................................................219
4.33.10 OPC Reads .............................................................................................................................220
4.33.11 OPC Writes ............................................................................................................................221
4.33.12 Predefined Internal MDOs for Monitoring and Control ........................................................222
4.33.12.1 Characteristics of Predefined Internal MDOs .....................................................222
4.33.12.2 Action Mask and Period......................................................................................226
4.33.12.3 DNP Action Mask ...............................................................................................227
4.33.12.4 DNP Action Now Status .....................................................................................228
4.33.12.5 DNP Action Mask Examples ..............................................................................228

Page | 10 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
4.33.12.6 IEC Action Mask ................................................................................................ 229
4.33.12.7 Modbus Action Mask ......................................................................................... 230
4.34 SDG Clock ......................................................................................................................................... 231
4.34.1 Event Time Tags and Database Update Times...................................................................... 231
4.35 ‘Sequence of Event’ Log Files ........................................................................................................... 231
4.35.1 Event Log File Names ........................................................................................................... 234
4.35.2 Event Log Record Format ..................................................................................................... 235
4.35.2.1Value Field Names (VFN_Table) ............................................................................ 235
4.35.2.2Update Date and Time Field Names (UDTF_Table) ............................................... 237
4.35.2.3Reported Date and Time Field Names (RDT_Table)............................................... 237
4.35.2.4Identification Field Names (IFN_Table) .................................................................. 239
4.35.2.5Escape sequences within Event Log Record Formats (ELR_Table)........................ 239
4.35.3 Flush Period........................................................................................................................... 240
4.35.4 Log Mask............................................................................................................................... 240
4.36 DNP3 Datasets ................................................................................................................................... 241
4.36.1 Background ........................................................................................................................... 241
4.36.2 Prototypes .............................................................................................................................. 241
4.36.3 Descriptors ............................................................................................................................ 244
4.36.4 Dataset Present Values .......................................................................................................... 247
4.36.5 Dataset Present Value Mapping ............................................................................................ 247
5. Troubleshooting.......................................................................................................................................... 249
5.1 Permissions......................................................................................................................................... 249
5.2 Running the SDG on Windows Vista / Windows 7 ........................................................................... 249
5.3 Running the SDG on a Virtual Machine ............................................................................................ 249
5.4 Errors in the Point Mapping File When Saving the SDG................................................................... 249
5.5 Network: Network Driver Appears To Not Be Serving This Directory Dialog ................................. 249
5.5.1 “Physical layer error: Error opening channel” ...................................................................... 249
5.5.1.1 TCP/IP Connection .................................................................................................. 250
5.5.1.2 Serial Connection ..................................................................................................... 250
5.5.1.3 Modem Channels...................................................................................................... 250
5.5.2 Configuration ........................................................................................................................ 250
5.5.3 Other issues ........................................................................................................................... 250
5.6 “Timeout waiting for application layer response fragment or restart." Message is displayed ........... 251
5.7 Missing DLL Files.............................................................................................................................. 251
5.7.1 Missing Microsoft Visual C Run-time Components ............................................................. 251
5.7.2 Error Starting the GTWService - Missing Localization DLL (VC80.MCFLOC)................. 251
5.8 Using an RS-232/RS-485 Converter with the SCADA Data Gateway .............................................. 251
5.9 “Missing” Parameters in tmwgtway.ini file ....................................................................................... 252
5.10 After installing Windows XP Service Pack 2, OPC Communications via DCOM no longer work .. 252
6. SCADA Data Gateway Technical Support .............................................................................................. 253
7. Glossary of Terms ...................................................................................................................................... 256

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 11


SCADA Data Gateway | Implementers Guide

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

Page | 12 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

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.

1.1 Purpose of this Manual


This manual contains the necessary information required to install and configure the SCADA Data Gateway
(SDG) and provide descriptions of various aspects of configuring and using the SDG.

This manual covers the following topics:


 Introduction to the SDG
 Overview of SDG Components
 Configuration
 SDG licensing
 Making changes to the Initialization File tmwgtway.ini
 What to add to the Point-Mapping File
 How to use Equations
 Data Points
 What are Master and Slave Data Points
 How to map Data Points from one SDG Component to another
 How to associate OPC Tag names with Data Points
 Logging of Data Change Events
 Glossary of Terms

1.2 Introduction to SDG


The SDG is a Windows™ application that acts as an OPC Client/Server, Data Concentrator, and Protocol
Translator. The SDG supports the following protocol components: DNP3, IEC 60870-5-101, IEC 60870-5-
103, IEC 60870-5-104, Modbus, OPC Client, and OPC Server, ICCP/ICCP, 61850 Client, 61850 Server and
ODBC Client. In addition, it supports OPC (Data Access, XML Data Access, and Alarm & Events) for
interfacing with Windows PC-based SCADA Systems and HMIs.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 13


SCADA Data Gateway | Implementers Guide

Figure 1: SCADA Data Gateway

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.

Page | 14 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

Figure 2: SDG Software Architecture

Multiple connections to remote master or slave devices can be made with each protocol component.

1.3 SDG Components

1.3.1 Master/Client Components of the SDG


Master Components are used to:
 Read/Receive data from remote Slave/Server devices and to present this data to the SDG database for
use by SDG Slave/Server Components
 Pass event data to the internal database for use by Slave Components, the Sequence-of-event Log
File, and the OPC Alarm and Event Server
 Issue controls from Slave Components and OPC Writes
 Read and write data from/to external OPC Servers
 Monitor polling status of remote Slave devices

1.3.2 Slave/Server Components of the SDG


Slave Components are used to:
 Present data from the internal database to remote Master devices
 Accept controls from remote Master devices, and to pass the controls through the internal database to
Master Components

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 15


SCADA Data Gateway | Implementers Guide

 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 Master / Slave Data Flow


This section describes data flow from the various master and slave devices through the SDG.

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

Figure 3: Slave to Master Component Data Collection

1.3.3.2 Command Sequence from Remote Master Devices


1. The Slave Component will receive the command from a remote Master device.
2. The Slave Component stores the remote Master device command in the database manager.
3. The database manager passes the command to the appropriate Master Component.
4. The Master Component then transmits the commands to the appropriate remote Slave device.

Figure 4: Commands passed thru the SDG

Page | 16 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
1.4 Data Point Addressing
The following Point addressing discussion applies to the DNP3, IEC60870-5-101, IEC60870-5-103,
IEC60870-5-104 and Modbus protocols, note that for the other protocols supported the
Channel/Session/Sector metaphor does not apply. Points are the most indivisible level of data in the SDG.
Master Data Points may be defined automatically for OPC tags when the data is first received from a remote
device. This is accomplished by setting the following parameters in the tmwgtway.ini file:

 Set GlobalCreateTagAutomatic equal to TRUE


 Set PointMapFile to the desired filename (i.e. PointMapFile="C:\Program Files\Triangle
MicroWorks\SCADA Data Gateway\tmwgtway.csv")

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.

Figure 5: Connection and Identification of Data Points

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 17


SCADA Data Gateway | Implementers Guide

1.4.1 Communication Channels


The SDG exchanges data with remote devices through one or more Communication Channels (these may be
physically discrete channels, or logically discrete channels that share a physical connection, such as multiple
TCP/IP “serial pipes”, each of which is a separate logical channel, even though they may share a single
physical 10BaseT interface). Each communication channel is uniquely identified by a name, for example:
COM1, COM2, etc.

Figure 6 Communication Channels

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.

Page | 18 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

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.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 19


SCADA Data Gateway | Implementers Guide

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.

In the Point-Mapping file, the following identify the sector:


 Communication Channel
 Data Link Address
 ASDU Address

1.4.4 External OPC Servers


Connecting the SDG to an external OPC Server requires the specification of the following parameters in the
OPC Client section of the tmwgtway.ini file.
 OPCserverNode - refers to the machine where the external OPC Server has been installed. This
parameter can either be an IP address or the name of the machine as it appears on the network.
 OPCserverProgID - the Program ID of the external OPC Server. The Program ID of the OPC Server
is generally provided in the documentation from the manufacturer.
 OPCserverName - an optional parameter that may be used to create a user-defined name for the
external OPC Server for use in the SDG Point Mapping file (see Section 4.26.2). If not specified, the
OPCserverName defaults to the value specified for the OPCserverProgID parameter.
 OPCserverReconnectTime - specifies the number of milliseconds to wait until attempting a
reconnection with the OPC server should the connection be lost. If this time is set to zero a
reconnection will not be attempted.

Page | 20 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
1.5 Modem Pools
The SDG supports the concept of modem pools (a group of modems that can either receive or dial telephone
calls). Multiple modem pools can be configured in the SDG where each pool is a group of modems managed
by the pool. The modem pool acts as a dispatcher for the modems in its pool. For instance, when a Modem
Pool Channel decides it needs to send some data it asks the modem pool for a modem. If a modem is
available, the physical modem is connected to the modem pool channel. The modem pool channel then dials
its configured telephone number and establishes a connection with its peer device. If a modem in the pool
receives a call it will answer the call and establish a connection with the caller, receive the incoming data, and
then determine if the data is destined for any of the session/channels configured in the SDG. However, this
requires that the addressing information of all sessions in the SDG is unique regardless of the channel that
they are associated with. Addresses must be unique because the incoming message is parsed to determine
which session the message is intended for. In other words ensure that the Session and Sector addresses are
globally unique in the SDG.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 21


SCADA Data Gateway | Implementers Guide

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.

Page | 22 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

2. Installation and Setup


2.1 System Requirements
The Triangle MicroWorks SCADA Data Gateway (SDG) is a Windows based application and is supported
under the following operating systems:

 Windows XP Service Pack 3 (or later)


 Windows XP Embedded
 Windows Server 2003
 Windows 7 (32-bit and 64-bit)
 Windows Server 2008 (32-bit and 64-bit)
 Windows 8 (32-bit and 64-bit)
 Windows Server 2012 (64-bit)

The minimum system requirements for the host computer are:


 1.5 GHz processor; recommended: 2.4 GHz multi-core processor
 1 GB RAM; recommended: 4GB RAM
 Windows XP SP3
 Microsoft .NET 4.0 Framework

Note: the minimum requirements are for very small SDG configurations with very limited data throughput
requirements.

2.2 SDG Performance


The performance of the SDG depends on a number of factors, including the number of data points; the
number of channels/sessions/sectors; the frequency at which data changes; and the capabilities of the host PC.
Also, the number and types of other applications running on the host PC can also affect overall system
performance. Moreover, there are several INI configuration parameters that can have positive and negative
effects on performance. Consequently, it is difficult if not impossible to characterize the performance on
various systems.

Listed below is information on the limitations of the SDG to consider when trying determining system
performance:

 250 channels (per SDG)


 250 session (per SDG)
 64 sectors per session (for IEC60870-5)
 250 61850 clients
 250 61850 servers
 250 ICCP clients
 250 ICCP servers
 25 RCBs per 61850 client
 25 GCBs per 61850 client
 50 Polled Data Sets per 61850 client
 50 Polled Point Sets per 61850 client
 20 OPC clients

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 23


SCADA Data Gateway | Implementers Guide

 20 ODBC Database clients


 20 OPC-AE clients
 64 Modem Pools
 250 Modems

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.

2.3 Installing the SCADA Data Gateway


The SDG application is provided as a self-installing executable file (SDGvm.nn.xxxx.exe where m is the major
release, nn is the minor release, and xxxx is a build number). To begin installing the SDG application double-
click the SDGvm.nn.xxxx.exe file and follow the on-screen instructions.

In addition to installing the required files on your system, the installation application performs the following
steps:

1. Creates entries in the StartAll 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 StartAll Programs->Triangle MicroWorksSCADA 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.

2.4 SCADA Data Gateway Licensing


The SDG uses a software licensing mechanism, which supports the licensing of individual components of the
SDG product. When the SDG is run for the first time, a demo license will be generated which enables all of
the SDG components for 21 days. To obtain a permanent license specific to the components you have
purchased, please contact Triangle MicroWorks before the end of the evaluation period.

The SDG supports the following, individually licensable, components:

Component Symbol Status


IEC60870-5-101 Master M101 Currently Supported
IEC60870-5-102 Master M102 Future
IEC60870-5-103 Master M103 Currently Supported
IEC60870-5-104 Master M104 Currently Supported
IEC60870-5-101 Slave S101 Currently Supported
IEC60870-5-102 Slave S102 Future
IEC60870-5-103 Slave S103 Future
IEC60870-5-104 Slave S104 Currently Supported
IEC 61850 Client IEC 61850 Client Currently Supported
IEC 61850 Server IEC 61850 Server Currently Supported
ICCP/ICCP Client ICCP/ICCP Client Currently Supported
ICCP/ICCP Server ICCP/ICCP Server Currently Supported

Page | 24 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
Distributed Network Protocol Master MDNP Currently Supported
Distributed Network Protocol Slave SDNP Currently Supported
Modbus Master MMB Currently Supported
Modbus Slave SMB Currently Supported
OLE For Process Control (OPC) Server OPC Server Currently Supported
OLE For Process Control (OPC) Alarm OPC Alarm and Event Currently Supported
and Event Server Server
OLE For Process Control (OPC) Alarm OPC Alarm and Event Currently Supported
and Event Client Client
OLE For Process Control (OPC) Data OPC Client Currently Supported
Access Client
OPC XML Server XML Data Access Currently Supported
Server
OPC XML Client XML Data Access Future
Client
ODBC Database Client ODBC Client Currently Supported

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.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 25


SCADA Data Gateway | Implementers Guide

2.5 Running the SDG as a Service


This section describes how to run the SDG as a Windows Service. A Windows Service is a process that
runs in the background. Typically a service starts when the system boots, although this behavior can be
modified through the use of the service management console. Some advantages of running the SDG as a
service include:

 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.

2.5.1 Installation, Removal and Setup


The service executable files and additional installation setup files are installed as part of the normal
installation procedure of the SDG. In addition to installing the SDG, the following steps are required to
configure the SDG to run as a service.

Do the following as needed:

1. Select All ProgramsTriangle MicroWorksSCADA Data GatewayInstall SDG Service from


the Start Menu. This will install a small application that can be used to monitor the
communications of the SDG service through a protocol analyzer display. (This may require an
upgrade of the .NET framework; Windows Update can typically be used to accomplish this
update).
2. Should the SDG service need to be manually registered the following command line options are
available. GTWService.exe -RegServer and GTWService.exe -Service these commands register
the COM interfaces of the service and install it as a service respectively, they should be executed in
the order shown. Normally these commands are executed for you at SDG install time.
3. To remove the SDG service GTWService.exe -UnregServer can be used. This will remove
GTWService.exe from the service control panel and as a result GTWService.exe will not run as a
service any more.

2.5.2 Service Configuration and Startup


In most configurations the service settings INI file will be the same as the paths INI file (which is used for
the GUI SDG application). Use the SDG Options dialog box, to specify the INI file for the service. This
dialog box is accessed by select ViewOptions from the SDG main menu.

Page | 26 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

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 ProgramsTriangle MicroWorksSCADA Data GatewaySDG Service
ConfigurationStart or Stop SDG Service from the Start Menu. The service control panel is shown below:

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 27


SCADA Data Gateway | Implementers Guide

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:

Page | 28 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
The Startup type is used to specify how the service starts up. Automatic will cause the service to start
when the system boots; Manual is used if you want to manually start the service at a later time. Manual is
the recommended setting during SDG configuration and testing. See the help for the Windows Services
Control panel for explanations of the other configuration features of a service.

2.5.3 Service Monitor


The SDG Service Monitor application is used to display the protocol analyzer output of the SDG. This
application can be started and stopped without affecting the operation of the SDG Service. Filter options
are provided that operate in the same way as the protocol analyzer in the SDG GUI version. The service
monitor is started by selecting ProgramsTriangle MicroWorksSCADA Data GatewaySDG Service
Monitor from the start menu. Only a single instance of the service monitor is supported.

2.5.4 Service Events and Status Messages


Should the SDG service fail to startup or unexpectedly stop. Status and Event messages are logged to the
Windows Event Log. The event viewer is started by selecting ProgramsTriangle MicroWorksSCADA
Data GatewaySDG Service ConfigurationEvent Viewer from the start menu.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 29


SCADA Data Gateway | Implementers Guide

The Event log along with the protocol analyzer log should be used to troubleshoot problems.

Page | 30 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

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.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 31


SCADA Data Gateway | Implementers Guide

3.2 Configuration Window Interface


Below is the Configuration window expanded within the SDG’s main window:

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.

3.2.1 Refreshing the Display


In some circumstances the configuration window may not display the current state of the SDG. The
Refresh (F5) item in the View menu can be used to redraw the display.

Page | 32 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
3.2.2 Configuration Toolbar Menus

3.2.3 Configuration Window Menu Items


The following menu items are available for the Configuration Window:

3.2.3.1 File Menu

(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.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 33


SCADA Data Gateway | Implementers Guide

3.2.3.2 Edit Menu

(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.

3.2.3.3 View Menu

(1) Toolbar - Display/Hide the Configuration toolbar.


(2) Status Bar - Display/Hide the Status bar.
(3) Refresh - Updates and redraws each of the 3 panes in the Configuration window.
(4) Create Tags - **Sends a General Interrogation (GI) to all on-line sessions in the SDG
configuration.
(5) Options - Opens a dialog box for setting the Configuration window preferences.
**
Operation can be time consuming depending on the protocol and number
of connected devices.

Page | 34 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
3.2.3.4 Window Menu

(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.

3.2.3.5 Help Menu

(1) Help Topics - View the SDG Implementers Guide.


(2) Quick Start - View the SDG Quick Start Guide.
(3) SDG IEC 61850 Quick Start – View the IEC 61850 Client Quick Start Guide
(4) INI File - View detailed descriptions for each attribute in the INI file.
(5) Install/Update License - Install, update, or remove an SDG license.
(6) License Quote Request - Request a quote for the SDG and the protocols you require.
(7) TMW Website - Visit the Triangle MicroWorks website.
(8) What’s New - View the What’s New document for the SDG.
(9) Submit Support Request - Submit a support request to the Triangle MicroWorks support team.
(10) Watch Free Training Videos - Link to free Quick Start Videos for the SDG.
(11) About GTWconfig - View the SDG About dialog screen.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 35


SCADA Data Gateway | Implementers Guide

3.2.4 Context Menus


The SDG uses pop-up context sensitive menus for most configuration operations. Context menus can be
displayed by right-clicking on an item in the Configuration window. However, not all items have an
associated context menu.

3.3 Protocol Analyzer


The protocol analyzer window allows you to monitor communications between the SDG and external
devices. Below is the Protocol Analyzer window expanded within the main SDG window.

Page | 36 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

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.

3.3.1 Protocol Analyzer Toolbar Menus

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 37


SCADA Data Gateway | Implementers Guide

3.3.2 Protocol Analyzer Menu


When the Protocol Analyzer window is selected, the following menu items are available:

3.3.2.1 File Menu

(1) Save - Saves the Protocol Analyzer Log to a file.


(2) Save As - **Displays a dialog box which allows you to select the file name and location for
saving the Protocol Analyzer Log.
(3) Print - Prints the Protocol Analyzer Log.
(4) Print Preview – Opens the print preview dialog window.
(5) Print Setup – Opens the printer setup dialog window.
(6) Exit with Save - Exits the SDG and saves the INI and CSV files.
(7) Exit without Save - Exits the SDG without saving the INI and CSV files.

**
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.

3.3.2.2 Edit Menu

(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.

3.3.2.3 View Menu

Page | 38 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

(1) Toolbar – Display/Hide the Protocol Analyzer toolbar.


(2) Status Bar – Display/Hide the Status Bar.
(3) Filter Bar – Display/Hide the Filter Bar.
(4) Device Filter Bar – Display/Hide the Device Filter.

3.3.2.4 Options Menu

(1) Set Buffer – Controls the size of the Protocol Analyzer log buffer.
(2) Font – Set the font for the Protocol Analyzer display.

3.3.2.5 Window Menu

(1) New Analyzer Window - Adds a new Analyzer window.


(2) New Configuration Window - Adds 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.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 39


SCADA Data Gateway | Implementers Guide

3.3.2.6 Help Menu

(1) Help Topics - View the SDG Implementers Guide.


(2) Quick Start - View the SDG Quick Start Guide.
(3) SDG IEC 61850 Quick Start – View the IEC 61850 Client Quick Start Guide
(4) Install/Update License - Install, update, or remove an SDG license.
(5) License Quote Request - Request a quote for the SDG and the protocols you require.
(6) TMW Website - Visit the Triangle MicroWorks website.
(7) What’s New - View the What’s New document for the SDG.
(8) Submit Support Request - Submit a support request to the Triangle MicroWorks support team.
(9) Watch Free Training Videos - Link to free Quick Start Videos for the SDG.
(10) About GTWconfig - View the SDG About dialog screen.

3.3.3 Filters and Controls

3.3.3.1 Filter Bar

The Filter Bar is divided into four major areas:

 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.

Page | 40 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
3.3.3.2 Device Filter
The Device Filter Bar controls which devices are displayed in the Protocol Analyzer display window.
The bar consists of a hierarchy as shown below.

The Clear All and Set All buttons (1) provide a convenient means of selecting or clearing all devices layers.

The device filter includes the connected devices’:


 Channel (2)
 Session (3)
 Sector (4)

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.

3.3.4 Printing Analyzer Output


The Print dialog box is displayed by the Print and Print Setup items on the File menu.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 41


SCADA Data Gateway | Implementers Guide

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.

3.3.5 Setting the Analyzer Font


The Font item on the Options menu controls the font in the Protocol Analyzer output window. Selecting
this item displays the following dialog screen, which can be used to select a font and style:

Page | 42 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
3.3.6 Analyzer Buffer Settings
The Set Buffer item on the Options menu displays the following dialog screen:

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

3.4 Gateway Configuration Dialogs

3.4.1 SDG Options


The following dialog is used to set the SDG options. To display the SDG Options dialog box, click on
ViewOptions from the SDG menu:

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 43


SCADA Data Gateway | Implementers Guide

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.

Page | 44 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
Max Threads in Thread This setting is related to SDG performance. If the SDG detects that it
Pool may need more threads to process the work item queue, it may increase
the number of threads servicing this queue. This setting is the max
number of threads to create.
Enable Use of Paths causes the SDG to look in the specified directory during startup for the
tmwgtway.ini file, if checked. By default during installation these paths
are initialized to the location of the SDG executable file. To change the
path of the INI file, click on the ellipse next to the INI File parameter and
select the location of the INI file.

* 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.

3.4.2 Gateway Properties


To display the SDG Properties dialog box, click on EditProperties from the SDG menu:

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 45


SCADA Data Gateway | Implementers Guide

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.

Page | 46 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
Accept Clock Syncs If set to true and UseSystemClock is true, the Windows system clock will
be adjusted by a time sync received from an external master device. If set
to false, the time syncs will not adjust the Windows system clock. When
using a simulated clock, this setting has no effect and clock syncs are
always accepted and adjust the simulated clock.
Use Reported Time for If true the client MDOs will display the updated time of the point as
MDOs reflected by the server. Otherwise the client MDO will display the
gateways time of the actual update.
Use Specific Time Zone If true display the date and time for the SDG in the specified
TimeZoneName.
Time Zone Selector The name of the time zone to use for the SDG display time (empty
(TimeZoneName) string/default will set to UTC). Note: SDG uses UTC for internal times.
UseTimeZoneClock must be true.
Ignore DST If true and UseTimeZoneClock is true changes in Day Light Savings time
are ignored for display of time
Auto Save Period Maximum amount of time between saving the INI and CSV application
configuration files. The INI file is only saved if a change has been made.
A value of 0 will disable saves.
Initial Window Mode Specifies whether the SDG starts minimized normal, or maximized.
Equation Time Source - Specifies the source of the time tag for data points which are generated as
the result of an equation. The possible values are Update or Reported
where Update means the time, relative to the SDG system clock, at which
the equation was last calculated, Reported specifies the reported time of the
most recent event that caused the equation's result 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. It is important to note that static data polling, or
received events which do not specify a reported time, may cause a specific
data point's value to change without its event time being modified. Based
on system polling rates and other parameters this could result in
discontinuous times being reported, especially in equations that have inputs
from multiple slave devices.

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]

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 47


SCADA Data Gateway | Implementers Guide

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

Point Map Section


Global Create Tags If TRUE, tags (and storage space) will automatically be created upon
Auto reception of new data points within incoming response messages from
remote devices.
Point Map File Specifies Point Data Mapping file.
Save Unmapped Points If TRUE, unmapped tags will be saved to the point mapping file.
Read Point Map At If TRUE, the point mapping file will be read at startup.
Startup
Log Masks Section
Log Masks The log mask is a bitmap of the values. The mask can be applied to the
‘Event Log File’ and/or the ‘OPC Alarm and Event’ Server.
Possible values are:
0x0001 The data is being updated, but the reason for the update is
unknown.
0x0002 The data is being updated because it was requested.
0x0004 The data is being updated by the source of data without direct
request. No change is necessarily indicated.
0x0008 A change in the data is indicated by the source of data.
0x0010 A change in the data is indicated due to a request through
communications.
0x0020 A change in the data is indicated due to action at the device.
0x0040 A control request has been transmitted to a remote device.

Page | 48 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
0x0080 A control request has been confirmed by a remote device, but
is not yet complete.
0x0100 A 1st pass in a 2-pass control operation has been transmitted
to a remote device.
0x0200 A 1st pass in a 2-pass control operation has been confirmed by
a remote device.
0x0400 A cancel operation has been transmitted to a remote device to
abort a 2-pass control operation between the 1st and 2nd
passes.
0x0800 A cancel operation has been confirmed by a remote device.
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.

The Log Masks are grouped as follows:

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

3.4.2.1 Time Zone Names Values


These names apply to both the session time zone as well as the gateway time zone (INI file parameters
SessionRemoteTimeZoneName and TimeZoneName). The value specified for the INI parameter should
be exactly as specified in the Windows string. I.E. “(UTC-04:00) Atlantic Time (Canada)”. Note that
time zone strings are language specific i.e. English versions are not the same as French versions of time
zone strings.

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

3.4.3 Content Help


To display additional information on a particular field or parameter, first click on the Help button (1)

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).

Page | 50 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

4. Configuration Reference
This section discusses the configuration of the SDG. The SDG application configuration is specified in a
file, called tmwgtway.ini.

4.1 Tmwgtway.ini Initialization File


The SDG is configured using a configuration file. By default this file is named tmwgtway.ini. The file
includes comments describing the purpose of each parameter, the range of values, and the default value.
The tmwgtway.ini file must be located in the same directory as the SDG executable, and changes should be
made when the SDG software program is NOT running (closed). Tmwgtway.ini is overwritten with any
parameter changes made during the program execution when the SDG terminates. Comments in
tmwgtway.ini should not be altered, since they will be set back to the original text when the SDG saves the
file.

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.

4.1.1 Tmwgtway.ini Parameters


Tmwgtway.ini may be modified with a standard ASCII text editor to match the target application equipment
prior to running the SDG although most setting can be modified through SDG’s graphical interface. The
following table shows basic parameters that should be set prior to establishing a connection. The
configuration parameters required depend on the protocol used for each communication session.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 51


SCADA Data Gateway | Implementers Guide

Parameter DNP 101 103 104 MB Description


PhysComChannel COM port or remote TCP/IP
X X X X X
address
PhysComBaud X X X X COM port baud rate
PhysComParity X X X X COM port parity
PhysComDataBits X X X X Number of COM port data bits
PhysComStopBits X X X X Number of COM port stop bits
PhysComIpPort X X X TCP/IP port number
PhysComIpMode X X X TCP/IP connection mode
SessionLinkAddress Data link address of the slave
X X X X
component or remote device
SessionLocalAddress X Data link address of the local device
PhysComProtocol X X X X X Protocol for master or slave channel
SessionCommIndex Index of PhysComChannel for each
X X X X X
session
LinkConfirmMode Remote device will send a data link
X
confirm of the last frame sent
LinkSizeAddress Number of octets (bytes) in link
X X
Address field
LinkMode Balanced or unbalanced data link
X X
mode
DbasSectorAddress ASDU address of each sector within
X X X
a session
ASDUsizeCmnAddr Number of bytes in Common
X X
Address of ASDU (sector address)
ASDUsizeCot Number of bytes in Cause Of
X X Transmission (COT) field of
ASDU.
ASDUsizeIOA Number of bytes in Information
X X
Object Address field

4.1.2 Hidden INI parameters


These are INI parameters that do not have a direct GUI interface for configuration (list not complete).

MMBSessUpdateTimeOnValueChangeOnly Only update time if the value


X of an MDO changes. Session
level parameter.
DbasSectorFileToExecuteOnReset 101/104 Slave parameter. Path
X X to the file to exectute on a
reset with qrp equal to one.
DoNotChangeQualityOnDisconnect Do not change to quality at all
X X
when a disconnect occurs.
OPCServerTimeZoneIndex OPC only: TimeZone index
for OPC server.
OPCServerTimeZoneIgnoreDST OPC only: Ignore DST
changes in timezone for the
OPC Server times.
SessionOutgoingTimeZoneIndex Timezone index of slave
X X X X X devices when data changes
occur.
SessionOutgoingTimeZoneIgnoreDST If true and
X X X SessionOutgoingTimeZoneIndex
is not 199 changes in Day Light

Page | 52 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
Savings time are ignored for the
supplied times of the tags in the
session

4.1.3 View All INI Parameters


ALL INI parameters and their descriptions can be viewed by selecting “INI File” from the Help menu (see
below). The INI File parameter Help Dialog will pop up with all INI parameter names and descriptions (see
below).

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 53


SCADA Data Gateway | Implementers Guide

4.2 Point-Mapping File


The Point-Mapping file (tmwgtway.csv) identifies how the value for each data point in a Slave Component
is obtained. This could be a direct mapping to a Master Data Point, or an equation, which incorporates
multiple Master Data Points. If the OPC server is the only Slave Component in the target application, it
may not be necessary to create a point-mapping file. Creating a point map file with only the required
points will improve efficiency.

Page | 54 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

Organization of Point Mapping File Data

4.2.1 Saving the INI and CSV files


The configuration (INI) file and point mapping (CSV) files are saved each time the SDG exits unless the
Disable Save On Exit option has been selected. This option will prevent the files from automatically being
saved when the SDG exits, but the configuration can still be saved manually by use the Save option under
the File menu (FileSave):

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 55


SCADA Data Gateway | Implementers Guide

4.2.2 Selecting the INI during Start-up


You can specify which INI file to use with the SDG during start-up. This is very useful for testing various
configurations and settings with your SDG configuration. To select a specific INI file to use with the SDG
during start-up, you will need to add a “$” argument to shortcut used for starting the SDG.

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 (ViewOptions from the SDG menu)

4.3 Tags in the SDG


Tags are added to a data type in the configuration interface. Tags can be MDOs, SDOs, Equations, or
OPC Client items. Slave Data Objects are created indirectly by mapping MDO, Equations, Internal
Points, or OPC Client items to them. See section 4.26.5 Definition of Fields contained in the Point
Mapping File for additional information about the fields on the below dialog boxes.

Page | 56 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
4.3.1 Creating Tags Automatically
When a Master component is defined in the SDG, sometimes it is convenient to obtain all the tags that
are defined in the connected slave device. To automatically create tags, right-click on the session and
select the ‘Auto Create Tags’ context menu option will send a General Interrogation to the Slave device,
as the slave point data returns to the Master component, Data Types and Tags are created for each of the
points received. This operation is available for both sessions and sectors (only for IEC).

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 57


SCADA Data Gateway | Implementers Guide

4.4 Master Data Objects (MDOs)


Master Data Objects (MDOs) are points that obtain their value from an external Slave device or send
commands to an external slave device. To add MDO points to a Master device, right-click on the session
and select Add MDO:

Next, the Add a MDO dialog screen is displayed:

Enter the Point Number (1) for this MDO and click the ellipse button (2) to select any require options for
this MDO.

Page | 58 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

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:

4.5 Slave Data Objects (SDOs)


Slave Data Objects (SDOs) are points that provide a value to external master devices. SDOs also receive
commands from external devices. A monitor SDO point receives its value from a mapped MDO point.

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:

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 59


SCADA Data Gateway | Implementers Guide

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 SDO is now added to the Slave Data Type:

4.5.1 Editing Tag Options

The following dialog screen facilitates editing the options field for tags (i.e. MDO, SDO, OPC Client,
Equation).

Page | 60 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

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.

4.6 Internal Predefined MDO Points


Internal points or predefined points are MDOs that provide certain status and control operations for the
SDG. (See section 4.27.12 Predefined Internal MDOs for Monitoring and Control for additional
information about these points). Since many of these points are for status and control of the SDG, they
are not editable in the configuration tool. Below are the points that are editable in the configuration tool.

4.7 Internal User defined MDOs


Internal User defined MDOS are MDOs that can be used to store temporary point values. Internal User
MDOs are added to the configuration by right-clicking on the Gateway node and selecting Add Internal
MDO:

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 61


SCADA Data Gateway | Implementers Guide

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:

Page | 62 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
One use of Internal MDOs is to facilitate mapping of SDO points to other SDO points. Another use is to
provide a user modifiable source of data in the SDG. To use an Internal MDO to map between two slave
points, first create the Internal MDO of the desired type, then drag and drop the internal MDO onto the
desired command SDO (this will provide a value for the MDO), and then drag and drop the same internal
MDO onto the desired monitor SDO point (this will provide a value for the monitor SDO), see the diagram
below.

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:

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 63


SCADA Data Gateway | Implementers Guide

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.

Page | 64 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
4.8 Equations
Equations are MDOs that obtain their value based on a calculation performed on one or more other points
in the configuration. To add an Equation MDOs to the configuration, right-click on the Gateway node and
select Add Equation:

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.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 65


SCADA Data Gateway | Implementers Guide

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.

4.9 Adding Channels


Channels have a protocol associated with them, as a result all sessions associated with a channel will have
the same protocol. In the user interface, channels are containers for sessions. A channel can be TCP/IP,
Serial, or a Modem Pool Channel.

4.9.1 Adding Modem Pools


To add a modem pool to the configuration, right click on the modem pool node icon ( ) and enter the
Modem Pool Name in the Add Modem Pool dialog box, then click OK.

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:

Page | 66 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

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

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 67


SCADA Data Gateway | Implementers Guide

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.

Quick Reference for AT Commands


Command Meaning
AT Attention!
+++ Escape Sequence
, Pause
A/ Repeat Sequence
ATA Answer Mode
Bn Select Communication Protocol
Cn Transmission Carrier
Dn Dial Control
En Echo
Fn Data Mode Echo
Hn Hook Select
In Report Modem Information
Ln Set Speaker Volume
Mn Set Speaker Mode
Nn Automode Selection/Detection
On Retrain Selection
P Pulse Dialing
Qn Result Codes to DTE
Sn=x Status Registers
T Tone Dialing
Vn Format of Result Code
Wn Extended Result Codes
Xn Result Codes for Call Progress
Yn Long Space Disconnect
Zn Soft Reset and Restore

Page | 68 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
All modems on the computer system required by the SDG need to be configured in this way. The modems
will have to be available in the Operating System prior to adding them to the SDG.

Once the modem pool configuration is complete, the SDG configuration window will display these items
under the ModemPools node as shown below:

4.9.1.1 Modem Pool Channel

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 69


SCADA Data Gateway | Implementers Guide

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

4.9.2 Add TCP/IP Channel Dialog

Page | 70 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

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

4.9.3 Serial Channel

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.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 71


SCADA Data Gateway | Implementers Guide

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

4.10 Adding Sessions


The session dialog boxes are protocol specific, only the configuration parameters required for the
selected protocol on the Channel configuration dialog box are displayed.

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

Page | 72 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
4.10.1 Master Sessions

4.10.1.1 IEC 60870-5-101

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

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 73


SCADA Data Gateway | Implementers Guide

delay (in milliseconds) after sending request for class 2 data


when an application layer response is not pending for this
session. This parameter may be used to limit the bandwidth on
a shared media like Ethernet or to prevent taxing the target
device with unnecessary communication overhead. This
parameter only applies to IEC 60870-5-101 and IEC 60870-5-
103 Master Sessions
Class 2 Pending 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 pending for this session.
This parameter may be used to limit the bandwidth on a shared
media like Ethernet or to prevent taxing the target device with
unnecessary communication overhead. This parameter only
applies to IEC 60870-5-101 and IEC 60870-5-103 Master
Class Pending Count For an unbalanced master communication link, the total
number of consecutive class 1 and class 2 request frames that
may be sent to one device when an application layer response
message is pending from this device before moving on to the
next device on a multi-drop network. This parameter has no
effect if only one device is configured for a communication
channel. If this parameter is set to zero, the device is still
polled as described for parameter
M870CNFG_LINK_CLASS1_POLL_CNT.This parameter
only applies to IEC 60870-5-101 and IEC 60870-5-103 Master
Sessions
Class 1 Poll Delay For an unbalanced master communication link, the minimum
delay in milliseconds after sending request for class 1 data
when an application layer response is not pending for this
session. This parameter may be used to limit the bandwidth on
a shared media like Ethernet or to prevent taxing the target
device with unnecessary communication overhead. This
parameter only applies to IEC 60870-5-101 and IEC 60870-5-
103 Master Sessions
Class 1 Pending Delay For an unbalanced master communication link, the minimum
delay in milliseconds after sending request for class 1 data
when an application layer response is pending for this session.
This parameter may be used to limit the bandwidth on a shared
media like Ethernet or to prevent taxing the target device with
unnecessary communication overhead. This parameter only
applies to IEC 60870-5-101 and IEC 60870-5-103 Master
Sessions
Class 1 Poll Count For an unbalanced master communication link, the total
number of consecutive class 1 request frames that may be sent
to one device before moving on to the next device on a multi-
drop network (class 2 is always limited to one request frame
unless an application layer response is pending). This
parameter has no effect if only one device is configured for a
communication channel. In a multi-drop network topology,
this parameter is used to balance polling between all devices
and prevent one device from capturing all of the polling
messages. This parameter only applies to IEC 60870-5-101

Page | 74 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
and IEC 60870-5-103 Master Sessions
ASDU COT Size Number of octets (bytes) in Cause of Transmission (COT) field
of ASDU. This parameter is only used for master and slave
sessions using the IEC 60870-5-101 or IEC 60870-5-104
protocol profiles. Possible values are 1 or 2
ASDU Address Size Number of octets (bytes) in Common Address of ASDU
(sector address) field. This parameter is only used for master
and slave sessions using the IEC 60870-5-101 or IEC 60870-5-
104 protocol profiles. Possible values are 1 or 2
Originator Address Originator address (for 2-octet COT). This parameter is only
used for master and slave sessions using the IEC 60870-5-101
or IEC 60870-5-104 protocol profiles. Possible values are
from 0 to 255
ASDU IOA Size Number of octets (bytes) in Information Object Address (point
number) field. This parameter is only used for master and
slave sessions using the IEC 60870-5-101 or IEC 60870-5-104
protocol profiles. Possible values are from 1 to 3

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 75


SCADA Data Gateway | Implementers Guide

4.10.1.2 IEC 60870-5-103

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

Page | 76 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
parameter may be used to limit the bandwidth on a shared media like
Ethernet or to prevent taxing the target device with unnecessary
communication overhead. This parameter only applies to IEC 60870-
5-101 and IEC 60870-5-103 Master Sessions
Class 2 Pending 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 pending for this session. This parameter
may be used to limit the bandwidth on a shared media like Ethernet
or to prevent taxing the target device with unnecessary
communication overhead. This parameter only applies to IEC 60870-
5-101 and IEC 60870-5-103 Master
Class Pending Count For an unbalanced master communication link, the total number of
consecutive class 1 and class 2 request frames that may be sent to one
device when an application layer response message is pending from
this device before moving on to the next device on a multi-drop
network. This parameter has no effect if only one device is
configured for a communication channel. If this parameter is set to
zero, the device is still polled as described for parameter
M870CNFG_LINK_CLASS1_POLL_CNT.This parameter only
applies to IEC 60870-5-101 and IEC 60870-5-103 Master sessions
Class 1 Poll Delay For an unbalanced master communication link, the minimum delay in
milliseconds after sending request for class 1 data when an
application layer response is not pending for this session. This
parameter may be used to limit the bandwidth on a shared media like
Ethernet or to prevent taxing the target device with unnecessary
communication overhead. This parameter only applies to IEC 60870-
5-101 and IEC 60870-5-103 Master Sessions
Class 1 Pending Delay For an unbalanced master communication link, the minimum delay in
milliseconds after sending request for class 1 data when an
application layer response is pending for this session. This parameter
may be used to limit the bandwidth on a shared media like Ethernet
or to prevent taxing the target device with unnecessary
communication overhead. This parameter only applies to IEC 60870-
5-101 and IEC 60870-5-103 Master Sessions
Class 1 Poll Count For an unbalanced master communication link, the total number of
consecutive class 1 request frames that may be sent to one device
before moving on to the next device on a multi-drop network (class 2
is always limited to one request frame unless an application layer
response is pending). This parameter has no effect if only one device
is configured for a communication channel. In a multi-drop network
topology, this parameter is used to balance polling between all
devices and prevent one device from capturing all of the polling
messages. This parameter only applies to IEC 60870-5-101 and IEC
60870-5-103 Master Sessions

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 77


SCADA Data Gateway | Implementers Guide

4.10.1.3 IEC 60870-5-104

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

Page | 78 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
4.10.1.4 Master DNP3

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

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 79


SCADA Data Gateway | Implementers Guide

0x002 integrity poll upon RESTART IIN


0x004 integrity poll upon LOCAL IIN on-then-off
0x008 integrity poll upon timeout of previous request
0x010 integrity poll upon BUFFER OVERFLOW IIN
0x020 use delay measurement within time synchronization
0x040 perform time synchronization upon NEED TIME IIN
0x080 request class 1, 2, or 3 data upon CLASS 1, 2, or 3 IINs
0x100 enabled unsolicited messaging initial unsolicited
0x200 disable unsolicited messages upon restart and upon
reception of unexpected unsolicited message
0x400 Enable/Disable automatic generation of application layer
confirmations
Enable Unsolicited Event
Class
Create from Device
Create Tags from XML
File
DNP3 Secure Enables DNP3 Secure Authentication for this session. Possible
Authentication values are 0, 1, 'FALSE', or 'TRUE'. If TRUE, the DNP3 Secure
Authentication Settings dialog screen is displayed.

4.10.1.4.1 DNP3 Secure Authentication Settings

Page | 80 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

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.

For Slave: Expected session key interval and count.


When this amount of time elapses or this quantity of
Authentication messages are sent or received, the
session keys for this user will be invalidated. Interval
and count should be 2 times the master key change
interval and count. For systems that communicate
infrequently, DNPAuthKeyChangeInterval may be set
to zero, using only the DNPAuthMaxKeyChangeCount
to determine when keys should be considered old and
should be invalidated.
Max Key Change Count Session Authentication ASDU count since last key
change, When this number of authentication ASDUs is
transmitted or received since the last key change,
session keys will be updated.
Aggressive Mode Enable Aggressive mode.
Extra Diagnostics Output extra diagnostics to protocol analyzer.
Max Error Count Number of error messages to be sent before disabling
error message transmission.
User Key (hex 16, 24, or 32 User Key (must be 16, 24, or 32 hex values). For each
bytes) key there must be unique user number
DNPAuthUserNumber.
User Number User Number: Configuration for each user
specification says default user number is 1; configures
it as first user in array. Add any other user numbers.
For each user number in the INI file there must be a
DNPAuthUserKey.

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

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 81


SCADA Data Gateway | Implementers Guide

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.

4.10.1.5 Modbus Master

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

Page | 82 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
4.10.2 Slave Sessions

4.10.3 IEC 60870-5-101

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

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 83


SCADA Data Gateway | Implementers Guide

4.10.4 IEC 60870-5-104

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

Page | 84 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
4.10.5 Slave DNP

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.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 85


SCADA Data Gateway | Implementers Guide

4.10.6 Modbus Slave

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

Page | 86 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
4.11 Adding Sectors

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

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 87


SCADA Data Gateway | Implementers Guide

4.12 Adding Data Types

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.

4.13 Action Masks


The following dialog screen is used to edit various masks used in the SDG. The contents of the dialog
screen are different depending on which mask is being edited. These dialog screens are typically
accessed by clicking the ellipse button ( ) next to a mask value. Select the appropriate checkboxes to
generate the Mask Value:

Page | 88 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

4.13.1 IEC Action Mask


The IEC Action Mask Editor is used to define the mask and period of each of the IEC Action Masks. It is
also used to define the mask for the IECActionNow predefined point. It is accessed by right-clicking on
one of the IEC action mask predefined points under an IEC sector, in the configuration window, and then
selecting Edit IEC Action:

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:

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 89


SCADA Data Gateway | Implementers Guide

4.13.2 DNP Action Mask


The DNP Action Mask Editor is used to define the mask and period of each of the DNP Action Masks. It
is also used to define the mask for the DNPActionNow predefined point. It is accessed by right-clicking on
one of the DNP action mask pre-defined points, in the configuration window under a DNP session, and
selecting Edit DNP Action:

Page | 90 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

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:

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 91


SCADA Data Gateway | Implementers Guide

Status Value Description


0 (success) Indicates the request has completed successfully
1 (intermediate) Indicates a response was received but the requested command is not yet
complete. This could mean the response is part of a multi-fragment response
and did not have the FINAL bit set. Or this could be a request such as a select
operate that requires multiple requests and responses.
2 (failure) Indicates that the transmission of the request failed
3 (mismatch) The response to a select or an execute did not echo the request.
4 (statuscode) The response to a select or an execute echoed the request, except the status
code was different indicating a failure.
5 (iin) The response to the request had IIN bits set indicating the command failed.
6 (timeout) This indicates that the request has timed out. This could either be an
incremental timeout indicating we received no link layer frame from the device
in the specified time, or an application response timeout indicating this
particular request did not complete in the specified time.
7 (canceled) This indicates either that the user asked that the request be canceled by calling
dnpchnl_cancelFragment or that a second duplicate request has been made and
therefore this first one is canceled.

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.

4.13.3 Modbus Read Action Mask


The Modbus Read Action Mask Editor is used to define the mask and period of each of the Modbus Action
Masks. It is also used to define the mask for the MBActionNow predefined point. It is accessed by right-
clicking on one of the Modbus action mask pre-defined points, in the configuration window under a
Modbus session, and selecting Edit Modbus Action:

This will display the Modbus Action Mask Editor dialog screen:

Page | 92 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide

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.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 93


SCADA Data Gateway | Implementers Guide

4.13.4 Modbus Write Action Mask

Page | 94 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
The SDG also has periodic and single write Actions as seen above. The Write Action dialog should be self-
explanatory. Note the indices entered must already exist.

4.13.5 Modbus Master Dual Register

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 95


SCADA Data Gateway | Implementers Guide

Page | 96 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
The SDG supports Master side Dual Register MDOs to concatenate two 16 bit Holding Registers into a 32 bit
integer or floating point number. Currently these are only supported in the OPC Server to support monitoring
such points. They cannot be mapped to any other point types in this release.

4.14 Multi Drop Polling strategies for DNP and Modbus

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.

4.14.1 Channel ActionMask


The SCADA Data Gateway has a set of Action Masks on each session. The ActionMasks are used to schedule
various activities. For example, in DNP3, the Action Masks are used to schedule Event Reads, Integrity Polls,
etc. For each session, the SDG issues the specified commands at the specified interval.

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).

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 97


SCADA Data Gateway | Implementers Guide

4.14.2 Prioritization of Unsolicited Responses


When using a combination of Unsolicited Responses, polled data, and commands. These messages need to be
prioritized in order to minimize collisions on the multi-drop network. The preferred priority (from Highest to
Lowest) is:
• User Commands
• Unsolicited Responses
• Polling

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].

Page | 98 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.


SCADA Data Gateway | Implementers Guide
4.14.3 Disabling Channels and Session
It is desirable to have a mechanism to independently and completely disable a channel or a session. When so
disabled, the configuration settings will be remembered, but otherwise the SDG acts as if the channel/session
does not exist. This feature is very helpful during testing and deployment. For example, using this method, an
unused channel may be disabled, and the SDG will not issue “Physical Layer Error: Error opening channel”
messages. Similar, if a session is disabled, it will be omitted from the round robin polling scheme on that
channel.

4.14.4 Supporting INI Configuration Parameters and MDOs


To support this, the following configuration parameters are required.

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.

4.14.4.5 ChannelActiveControl - MDO

When this parameter is set, the SDG will remember the configuration parameters, but otherwise will treat
the channel as if it is not present.

4.14.4.6 SessionActiveControl - MDO

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.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 99


SCADA Data Gateway | Implementers Guide

4.15 IEC 61850 Client


To add an IEC 61850 Client to your configuration, right-click on the Gateway node and select Add IEC
61850 Client:

When prompted to use a SCL/ICD/CID file for the configuration, click the Yes or No button:

Select No to connect directly to an IEC 61850 server for discovery.


Select Yes to configure the IEC 61850 client form an icd, iid, cid, scl, scd, ssd, or sed file.

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

ChannelActiveControl – If the channel is active and ready to connect


ConnectedToServer – “On” means connected, “Off” means not connected
Disconnect Count
NumDisconnects – The number of time the client has disconnected from the server
NumGooseDrops – The number of dropped GOOSE messages
NumGooseEvents – The number of GOOSE control block updates received
NumGooseTimeOuts – The number of GOOSE timeouts that have occurred
NumIntegrity – The number of Integrity updates from the server
NumReadResponse – The number of reads completed from the server
NumReportMessages - The number of report control block updates received
ServerOK – If true the client is connected to the server
TotalBufferOverflows – The number of buffer overflows that have occurred in buffered report control
blocks

4.15.1 Adding an IEC 61850 Report Control Block


To add an IEC 61850 Report Control Block to your configuration, right-click on the 61850Client node and
select Add 61850 Report Control Block:

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:

RCBName_GI – use this MDO to initiate a General Interrogation on the RCB


RCBName_PURGE – use this MDO to purge the RCB clearing the buffered data

Writing any value to these MDOs will initiate the operation.

© 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:

4.15.3.1 Changing an IEC 61850 Command Point


To change the value of the command point, right-click on the point and select Change Value of MDO:

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.

4.15.4 Other mechanisms to obtain Data from a 61850 Server


As the configuration of the following data gathering methods are very similar to the Report Control Block.
We will not waste space with a detailed explanation of how to configure these. Instead we will simply
describe their use and operation.

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.

4.15.4.1 GOOSE Control Blocks


In order to use GOOSE Control Blocks a GOOSE adapter must be specified for the client. A GOOSE
Control block has a Data Set associated with it that describes the data that is updated by the Control
Block. The data attributes in the dataset can be mapped to SDG MDOs and will be updated as the GCB
performs updates. GOOSE Control Blocks are typically used for providing high speed control and
interlocking between equipment in a substation. As a result they are not as well suited to typical
SCADA Process data as a Report Control Block would be.

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.

4.15.4.3 Polled Point Sets


The last mechanism to obtain data from a server is a Polled Point Set. This mechanism is very similar to
a Polled Data Set except that it does not require a Data Set. This mechanism basically issues a read on
all the points in the Polled Point set at the period specified. Note that with this mechanism there is a
MDO that can be used to trigger the read operation in addition to the timer.

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.

4.15.5.1 Configuring the SDG to use IEC 61400-25 Alarms

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.

Figure 9 IEC 61850 Client in the SDG

4.15.5.2 Adding the IEC 61400-25 Alarms Node


To add the IEC 61400-25 Alarms node, right-click on the IEC 61850 Client node and select Add IEC
61400-25 Alarms (WALM node):

Page | 112 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide

Figure 10 Add IEC 61400-25 Menu Item

This will display the Add IEC 61400-25 Alarms dialog screen:

Figure 11 Add IEC 61400-25 Alarm 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

Figure 12 Find Alarms Array dialog screen


This screen allows you to select the desired array from the list. To add an array, simply select it from the
list and then click OK. Note, each array must be added to the configuration separately and given a unique
name.

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:

Figure 13 Alarms Array Node

4.15.5.3 Adding the IEC 61400-25 Alarms


To add an IEC 61400-25 alarm, right-click on the Alarms Array node and select Add Alarm MDO:

Page | 114 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide

Figure 14 Add Alarm Context Menu

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

Figure 15 Add Alarm MDO dialog screen

After the MDOs are added to the SDG configuration, they will be displayed in the GUI as shown below:

Figure 16 Configured Alarm MDOs


Note that these alarm MDOs can be treated as any other MDO in the SDG as related to mapping, equations,
etc.

4.15.5.4 Alarm Processing


As changes in the elements of the selected status array (i.e., ‘WALM1.AlmSt.actSt’) or event array (i.e.,
‘WALM1.AlmEvl.actSt’) are received by SDG, the SDG will process these changes and generate change
events (set/clear/generate) on the MDOs. These changes will then propagate to SDOs mapped to the MDO.
For example, if a change in the array occurs for status code 201 (i.e. an element in the array has the value of
201), then the MDO with the Status Code of 201 will become TRUE. In the next update of the array, if the
element with status code 201 is no longer available, the MDO with Status Code 201 will be set to FALSE.
In addition, when the MDO is set to TRUE, the timestamp of the array status code will be used. When the
status code is no longer in the array, the timestamp of the updated array (i.e. when the change of the array
was received) will be used for the timestamp of the Alarm MDO.
As a result, there will be one MDO in the SDG for every Status Code of interest in the Senvion/Re Power
turbine.

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.

4.16 IEC 61850 Server


To add a IEC 61850 Server to your SDG configuration, right-click on the Gateway node and select Add
IEC 61850 Server:

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

The Create 61850 Server Dialog should be self explanatory.

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

4.16.1 Mapping Points to the IEC 61850 Server


To map points from MDOs to the IEC 61850 Server, simply drag-and-drop an MDO from the onto the IEC
61850 Server node:

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

4.17 ICCP Client and/or Server


To add an ICCP Client and/or Server to your configuration, right-click on the Gateway node and select
Add IEC ICCP Client/Server:

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.

The security dialog box looks like the following:

“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.

4.17.1 Editing/Deleting a Client/Server


To edit or delete a client and/or a server, right click on the client or server and select Edit ICCP … or
Delete ICCP ...

4.17.2 Connecting to a Server


To connect the client to a ICCP server, select Connect to Server in the above menu and the ICCP client will
initiate a connection to its server establishing either a unidirectional or bidirectional connection.

4.17.3 Creating/Editing Client Model


In general, the ICCP client should not discover its server model, although it is possible by bringing up the
ICCP Client Model and selecting the Clear Model button and then connecting to the server. Therefore a
client should define its own model before connecting to a server by selecting Edit ICCP Client Model
which will bring up the ICCP Client Model dialog (below). To use the ICCP Client Model dialog, a user
must first create a .csv file defining the model as follows:

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

The Gateway supports the following ICCP data types:


• Discrete
• DiscreteExtended
• DiscreteQ
• DiscreteQTimeTag
• DiscreteQTimeTagExtended
• Real
• RealExtended
• RealQ
• RealQTimeTag
• RealQTimeTagExtended
• State
• StateExtended
• StateQ
• StateQTimeTag
• StateQTimeTagExtended

And supports the following ICCP Control types:


• ControlCommand
• DiscreteSetPoint
• RealSetPoint

An example CSV file would be:

CSV file contents:


ICC1/RealPoint,Real
ICC1/RealExtendedPoint,RealExtended
ICC1/RealQPoint,RealQ
ICC1/RealQTimeTagPoint,RealQTimeTag
ICC1/RealQTimeTagExtendedPoint,RealQTimeTagExtended

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.

4.17.4 Adding a ICCP Data Set Transfer Set


To add a ICCP DS Transfer Set to your configuration, you must first connect the client by right-clicking on
the client and selecting Connect To Server and then right-click on the ICCP Client again and select Add
ICCP Data Set Transfer Set:

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

Next, click the Add button to add the DS Transfer Set.

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

Writing any value to these MDOs will initiate the operation.

4.17.5 Adding a ICCP Data Attribute from the DS Transfer Set


Once a DS Transfer Set is defined we can start adding points (Data Attributes) as MDOs to the SDG. To
add a ICCP Item, right-click on the DS Transfer Set and select Add ICCP Item:

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.

4.17.6 Adding an ICCP Control Point


To add a ICCP Control Point to your client, create a ICCP Client as described above and then right-click on
the ICCP client node and select Add ICCP Control Point:

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:

4.17.6.1 Operating a ICCP Control Point


To operate the control point, right-click on the point and select Operate ICCP Control:

Page | 136 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide

The Operate Control Dialog will appear:

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.

4.17.7 Other mechanisms to obtain Data from an ICCP Server


As the configuration of the following data gathering methods are very similar to the DS Transfer Set, we
will not waste space with a detailed explanation of how to configure these. Instead we will simply describe
their use and operation.

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.

4.17.7.1 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.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 137
SCADA Data Gateway | Implementers Guide

4.17.7.2 Polled Point Sets


The last mechanism to obtain data from a server is a Polled Point Set. This mechanism is very similar to
a Polled Data Set except that it does not require a Data Set. This mechanism basically issues a read on
all the points in the Polled Point set at the period specified. Note that with this mechanism there is a
MDO that can be used to trigger the read operation in addition to the timer.

4.18 ICCP/Gateway Quality


Gateway quality is defined in the following table:

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).

4.19 Standalone ICCP/ICCP Server


To add a standalone ICCP Server see the above instructions and select the “Server” ICCP Configuration in
the Create ICCP Client/Server Dialog

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

The ICCP server should now be visible in the SDG configuration:

4.19.1 Mapping Points from a Master device to the ICCP Server


To map points from other protocols to the ICCP Server, simply drag-and-drop an MDO from the other
protocol onto the Domain of the ICCP Server:

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.

4.20 OPC Alarm and Event Client


To add an OPC AE Client to your configuration, right-click on the Gateway node and select Add OPC AE
Client:

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.

Next, enter an Alias Name and then 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

parameter. Specifies the max size for the OPC AE Server


subscription.
Reconnect Time (msecs) Specifies the reconnect timeout for the OPC AE Server (0 = no
reconnect).
Reconnect Re-try Count Specifies the reconnect re-try count for the External OPC AE 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 AE server.

4.20.1 Adding OPC AE Client Items


To add an OPC AE Client item, right-click on the OPC AE Client node and Select Add OPC AE
Client Item.

The following dialog screen will be displayed:

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

The event is now added to the configuration:

4.20.2 OPC Alarm and Event MDO


An OPC AE MDO represents a source of events in the OPC AE Server. As events are sent on this event
source the MDO will be updated with the event message, quality and time stamp. This behavior can be
overridden by specifying some of the options below.

4.20.2.1 Event MDO


The event MDO (i.e. source_name.Event) represents the base OPC AE event object. This MDO will
receive updates as the event source changes in the OPC AE Server.

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:

The following dialog screen will be displayed:

To browse for an Event Attribute, click on the nodes to expand the tree and then click Add to add the
desired item.

The event is now displayed in the SDG Configuration window:

© 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.

4.20.2.3 OPC AE MDO Options


To edit the OPC AE MDO options, right-clicking on an MDO and Selecting Edit OPC AE MDO.

This will display a dialog screen with selected OPC AE item:

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

4.21 OPC Alarm and Event Server


The OPC Alarm and Event Server component provides events to OPC Alarm and Event clients running on
this machine or other machines on the network. Events are propagated from Master components in SDG to
the OPC Alarm and Event Server Slave component. As events arrive at a Master component they are queued
to the OPC Alarm and Event Server. The Server then provides these events to any connected OPC Alarm and
Event client. Due to the nature of this queuing process, all data changes received at the Master component
will be propagated to the OPC Alarm and Event client. This differs from the operation of the OPC Data
Access Server in that it will not provide all changes to a connected client, should these changes occur more
rapidly than the polling interval. The time stamp of the event is provided based on the setting of
OPCAETimeSource parameter in the INI file (see section 4.28.1 Event Time Tags and Database Update
Times on page 231 for additional information). Currently by default, all points are reported as an Event Type
of 'Condition', Event Category of 'Discrete', and a condition type of 'COS' (change of state). In addition, the
attribute 'CV' (current value) allows the client to see the value at the time the event was reported.

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).

4.21.1 Specifying and using the Event Space


The following INI file parameters can be used to define an Event Space for the SDGs OPC AE Server.

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.

OPCAeCatCondName - Specifies the name of the OPCAE condition.

OPCAeCatSubCondName - Specifies the name of the OPCAE sub condition.


OPCAeCatSubCondSeverity - Specifies the OPCAE sub condition severity.
OPCAeCatSubCondDescription - Specifies the description of the OPCAE sub condition.
OPCAeCatSubCondDefinition - Specifies the definition of the OPCAE sub condition.

In addition the CSV file supports the following option fields related to OPC AE Server definition:

OPCAESEVERITY – the severity of the condition

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

Note the ‘:’ is used to separate the fields.

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.

OPCAEUseSimpleEvents – ini file parameter


OPCAE_LOGMASK – MDO specific option

4.21.2 Example Configuration


Note this configuration section will need to be manually added to the SDG INI file. Just paste this into the
INI file and make any required changes to it.

//*****************************************************************************
// OPC AE Server
//*****************************************************************************

OPCAeCatID[0]=5 // Specifies the id of the OPCAE category.


// DEFAULT: 5 id
// INDICES: [catIndex=0-9]
OPCAeCatMsg[0]="msg 1" // Specifies the name of the OPCAE
// category.
// DEFAULT: ""
// INDICES: [catIndex=0-9]
OPCAeCatCondName[0][0]=cond1 // Specifies the name of the OPCAE
// condition.
// DEFAULT: ""
// INDICES: [catIndex=0-9][condIndex=0-9]

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 155
SCADA Data Gateway | Implementers Guide

OPCAeCatSubCondName[0][0][0]=sub1 // Specifies the name of the OPCAE sub


// condition.
// DEFAULT: ""
// INDICES:
// [catIndex=0-9][condIndex=0-9][subcondIndex=0-9]
OPCAeCatSubCondSeverity[0][0][0]=25 // Specifies the OPCAE sub condition
// severity.
// DEFAULT: 100 num
// INDICES:
// [catIndex=0-9][condIndex=0-9][subcondIndex=0-9]
OPCAeCatSubCondDescription[0][0][0]="sub1 descp" // Specifies the description
// of the OPCAE sub condition.
// DEFAULT: description
// INDICES:
// [catIndex=0-9][condIndex=0-9][subcondIndex=0-9]
OPCAeCatSubCondDefinition[0][0][0]="sub1 definition" // Specifies the
// definition of the OPCAE sub condition.
// DEFAULT: definition
// INDICES:
// [catIndex=0-9][condIndex=0-9][subcondIndex=0-9]

As an example of a simple configuration an internal bit can be configured to publish an OPC AE


Alarm/Event:

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.

4.22 OPC Data Access Client

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.

4.22.1 OPC Client Items

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:

This will display the Add Item dialog screen:

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:

myAND,,,,,,,,,test,Refresh,,1,,,,"myPB && 1",,,,OPC

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.

OPC Client Tag Properties


Properties of OPC tags can be used as MDOs. In order to use this feature the OPC Client tag MDO
must first exist (as described above). Once this tag is added, right-click on the tag and select Edit
OPCDA MDO to add the property as an MDO:

The Item Properties dialog screen is now displayed:

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.

4.23 ODBC Client


The ODBC Client allows you to store and retrieve data from any ODBC data source including: SQL
Server, Access, Excel, and text files.

Page | 164 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide

The following features are currently available:

 Automatic generation of MDOs related to fields and parameters in a SQL query


 SQL based query supported
 Support for SQL Server, Access, Excel, and text files (CSV, tab delimited, text)
 Supports read and write access to ODBC compliant databases through INSERT, UPDATE,
DELETE and SELECT SQL Clauses
 Ability to single step or directly select a record in a record set
 Supports parameter substitution for flexible queries
 Test/Verification mode to help during query development

Note that some of the features listed above may not be available on all ODBC Client driver
implementations.

4.23.1 Adding an ODBC Client


To add an ODBC Client to your configuration, right-click on the Gateway node and select Add ODBC Client.

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

Click on Find ODBC Server to locate or create an ODBC data source.

4.23.2 Configuring a Data Source for the SDGs ODBC Client

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.

4.23.3 Selecting an ODBC Data Source

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.

4.23.4 Adding an ODBC Query


After adding an ODBC data source, you will need to define the query for retrieving data from your data
source. To add an ODBC query, right-click on the ODBC Client and select Add ODBC Query.

© 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

Command Description Example


SELECT Retrieves data from a table SELECT * FROM table_name
SELECT Retrieves data from a table using a SELECT * FROM table_name WHERE
(with parameters) parameter ID = ?
INSERT Adds rows to an existing table INSERT INTO table_name (field1, field2,
field3) VALUES (‘test’, 3.45, NULL)
UPDATE Modifies a set of existing rows in UPDATE table_name SET field1=’new
the table value’ WHERE field2 = 3.45
DELETE Removes existing rows from a table DELETE FROM table_name WHERE
field2 = 3.45
The Validate SQL button (5) executes the SQL commands entered in the SQL statement textbox.
The Results pane (6) displays the results of the query defined in the SQL statement textbox.

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:

4.23.6 Mapping a query MDO


Mapping a query MDO is performed the same as mapping other MDOs and points in the SDG. Click
and hold on the MDO you wish to map and then drag and drop it to the appropriate node in the tree:

© 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:

4.23.8 Mapping Items to Parameters Defined in a Query


You can map MDOs, equations, and points to the parameters created in your query statement in the
same way you map other items in the SDG.
To map an item, for example an MDO, simply drag-and-drop the MDO on the Gateway node:

© 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):

4.23.9 "Triggering" the ExecuteQuery MDO


You can configure the SDG to automatically trigger the ExecuteQuery MDO using the onchange equation.
This is beneficial when you want to capture the data based on the value of a particular point when it
changes and update your tables accordingly.

Page | 180 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide
The onchange equation has the following structure:

onchange(expr1, expr2, expr3)

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 values can be used for Expr3:


Value Description
0 copy value on positive change of Expr1
1 copy value on negative change of Expr1
2 copy value on any change of Expr1

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:

The equation (UpdateSQL) is now mapped to the ExecuteQuery MDO:

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.

4.23.1 Polling the Data Source for Changes


To poll the data source for changes, you need to use the Square equation as follows:

square( 0,1,5000)

Next, map the above equation to the ExecuteQuery MDO of the ODBC Client.

4.24 Mapping Points from Master Components to Slave Components


To map points from Master Components to Slave Components, simply drag-and-drop an MDO on a data type
of a slave device. When the MDO is dropped on the slave data type, the following dialog box is displayed:

This dialog box is used to set the appropriate parameters of the slave data point.

4.25 Mapping Points from Master Components to Master Components


Mapping of MDOs to MDOs is only supported for monitor points as the source and command points as the
destination. For OPC client points the destination point must be a read/write 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.26 Mapping Points from Slave Components to Slave Components


Mapping of SDOs to other SDOs is accomplished by the use of Internal User Defined MDOs. See section 4.7
Internal User defined MDOs for more information.

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:

MSPNA_timeFormat[*][*]=CP56 // Selects the time format used to report


// MSPNA change events. This parameter is
// only used for slave sessions using the
// IEC 60870-5-101 or IEC 60870-5-104
// protocol profiles. Possible values are
// 'CP24', 'CP56', or 'NONE'.
// DEFAULT: CP56
// INDICES:
// [sessionIndex=0-249][sector=0-63]

For Double Points, use MDPNA_timeFormat, for Step Position use MSTNA_timeFormat, etc.

4.28 Setting DNP3 Event Types and Default Variations


DNP3 event types (e.g., Type 2, Binary Input Events) are not configured directly in the SCADA Data
Gateway. These types are automatically determined from the data types of the associated static data types.

© 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):

Obj01DfltVariation=2 // Variation in which Object 1 binary


// inputs will be returned when queried
// using variation 0. This parameter is
// only used for slave sessions using the
// DNP3 protocol. Possible values are 1 or 2.
// DEFAULT: 2 variation

Obj02DfltVariation=2 // Variation in which Object 2 binary input


// events will be returned when queried
// using variation 0. This parameter is
// only used for slave sessions using the
// DNP3 protocol. Possible values are
// from 1 to 3.
// DEFAULT: 2 variation

4.29 Internal OPC Server


With large point sets it is recommended they be broken into individual OPC groups when an OPC client
requests data from the SDG OPC server. This will allow better utilization of resources required by the SDG.

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 StartRun 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

DCOM Identity (from the dcomcnfg tool)

© 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.

4.29.2 OPC Server Point Properties


The SDG OPC Server exposes several properties of the Master Data Objects (MDO). These allow access
to the quality, description and other properties of a MDO.

The following properties are supported:

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

4.30 Mapping Points to an External OPC Server


The OPC Client in the SDG is a master component. It receives data from an external OPC Server and makes
it available to the slave components in the SDG. The SDG Point Mapping file is used to describe this data
flow.

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.

4.31 Format of the Point-Mapping file


The Point-Mapping data is stored in a Comma Separated Value (CSV) format. It may be derived from
existing data files describing the target application or generated from the SDG configuration editor. The
following table lists the order and usage of the fields in the Point-Mapping file.

Item Component Attribute


1 Master User Tag Name / OPC Tag Name / IEC 61850 Tag Name / IEC 61850 Data Set
Alias Name
2 Master Communication Channel / OPC Server Name/ IEC 61850 Client Name / IEC
61850 Data Set Logical Node Name/ ODBC Client Name

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

4.31.1 Definition of Fields contained in the Point Mapping File

4.31.1.1 Point Identification Fields


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 table applies to both Master and
Slave Component points; however, some of these fields are only applicable to specific protocols.

4.31.1.2 Data Options Field


The options field allows the default properties of a point to be over-ridden. For some options, a global
setting in the INI file defines the default behavior. The options field allows point properties to be
specifically enabled on a point-by-point basis.

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:

4.31.1.3 Table of Control Options and the Meaning


The option field provides a means of specifying various properties of a point, and has different values
depending on the type of point. The options supported for each protocol are listed below:

Component Operation Option Name Meaning


All protocols:
Master Log file LOGMSKxxxx Record (do not record) changes/events
See ‘Table of Events’ in the on this point in the log file.
section following this section.
Master OPC Alarm OPCAE_LOGMSKxxxx Provide (do not provide) changes/events
and Events See ‘Table of Events’ in the on this point through the OPC Alarm
section following this section. and Event Server.
Master Control WRITE_PERIOD xxxx **DEPRECATED**

Specifies the period xxxx at which to


write the control point in (ms). This will

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

EQTIMEREPORTED The event time used for this equation is


the reported time from the remote device
of the last event that caused the
equation’s value to change. 1
UPDATE_IF_NO_CHANGE If this option is specified, when an
equation is calculated regardless of
whether it’s resulting value changes or
not the resulting value of the equation
will be passed on to any mapped points.
OPC DA/AE Name ALIAS xxxx Specify an ALIAS name for the OPC
Client DA or AE Client point. This is the name
that the SDG will use internally for this
OPC Client tag. It has the same usage as
the User Tag Name.
OPC DA Write WRITE_INVERTED Specifies that when the OPC Boolean
Client point is written it should be written with
a value of TRUE if it is FALSE and
FALSE if it is TRUE.
OPC DA Write WRITE_TRUE_AS_ONE Specifies that when the OPC Boolean
Client point is written it should be written with
a value of 1 if it is TRUE instead of -1
which is the numeric value of TRUE in
OPC.
OPC AE Event EVENT_VALUE Used to specify/override the default
Client message value for the event. (i.e.
EVENT_VALUE true will cause the
MDO value to be true when the event is
received)
OPC AE Event EVENT_TRUE_MSG Used to parse the message string of the
Client event and look for the string specified if
the string is found the MDO value will
be set to true.
OPC AE Event EVENT_FALSE_MSG Used to parse the message string of the
Client event and look for the string specified if
the string is found the MDO value will
be set to false.
OPC DA Event AE_INIT_VALUE_MDO Used to specify the OPC AE MDO that
Client will be initialized with the value, quality
and time stamp of the Data Access MDO
once initialized the VQT will not be
applied again unless the OPC AE Client
disconnects from its server.
OPC DA Event AE_RESET_VALUE_MDO Used to specify the OPC AE MDO that
Client will receive a VQT from the OPC DA
MDO if the AE MDO value is different
from the DA MDO value.
OPC DA Event AE_RESET_VALUE In association with
Client 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

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

Binary In PROVIDE_AS_RAW Provide the value of the double point as


Double follows:
Point 0 - "Transit"
(Type ID 3) 1 - "Off"
2 - "On"
3 - "Indeterminate"

Normally (when this option is not


specified) the value is provided as
true/false with the quality describing the
additional states.
Analog In SCALE rawMin rawMax Provide scaling value for the point. The
(Type ID eguMin eguMax raw analog input value will be scaled as
9,11,13) follows:
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 points.

Analog In DEADBAND value If this parameter is specified for a master


(Type ID device, the value of an analog point read
9,11,13) 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.

Step ALLOW_UP Allows the configuration of selective


Command ALLOW_DOWN blocking of commands passed on to
(Type ID ALLOW_ANY external slave devices. For instance
46) ALLOW_UP will block a down
command and ALLOW_DOWN will
block an up command. Command
values are typically received form
mapped slave data objects and passed on
to the external slave device.
Double ALLOW_ON Allows the configuration of selective
Command ALLOW_OFF blocking of commands passed on to
(Type ID ALLOW_ANY external slave devices. For instance
47) ALLOW_ON will block an off
command and ALLOW_OFF will block
an on command. Command values are
typically received form mapped slave
data objects and passed on to the
external slave device.
Slave Monitored G01, G02, G03, …, G16 Point is included in (excluded from)
Data (!G01, !G02, …, !G16) response to Group xx Interrogation
request (where Gxx identifies group: 01

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"

Normally (when this option is not


specified) the value is accepted as
true/false with the quality describing the
additional states.
Binary In PROVIDE_AS_RAW Provide the value of the double point as
Double follows:
Point 0 - "Transit"
(Type ID 1 - "Off"
1,2) 2 - "On"
3 - "Indeterminate"

Normally (when this option is not


specified) the value is provided as
true/false with the quality describing the
additional states.
Master Binary Data RTZ “Return to Zero”: generate a 1–0
(Type ID transition whenever a 0–1 transition is
1,2) received

© 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

Master Coil write ALLOW_ON Allows the configuration of selective


ALLOW_OFF blocking of commands passed on to
ALLOW_ANY external slave devices. For instance
ALLOW_ON will block an off
command and ALLOW_OFF will block
an on command. Command values are
typically received form mapped slave
data objects and passed on to the
external slave device.
Master Coil write INVERTED_WRITE Inverts the value written to the external
slave device connected to SDG Modbus
master. For instance if the value
received from a mapped SDO is true the
value written will be false.

Master and Holding SIGNED Allows the specification of a holding


Slave Register, register or input register as a signed 16-
Input bit value. The default is that these types
Register are unsigned 16-bit values. This only
changes the way that the SDG interprets
the bits in the register. If this option is
specified for a point and the point is
mapped to a different component the
“mapped to component” will see the
value of the point as a signed value.

Modbus Holding FLOAT xxx Allows the specification of 2


Slave Register, consecutive holding registers or input
Input registers as a 32-bit floating point value.
Register The value can be both written and read.

The xxx has the following options:


0x01 : 1st register (word) is least
significant
0x02 : 1st register (word) is most
significant

When this option is specified IEEE-754


Floating-Point format is used for the
values.

When writing a floating point value (i.e.


as 2 words) the writing of the 2nd word
will cause any up-down stream data to
be affected.
Table 2 Point-Mapping file options field

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.

Mask Value Type of Event


0x0001 The data is being updated, but the reason for the update is unknown.
0x0002 The data is being updated because it was requested.
The data is being updated by the source of data without direct request. No change is
0x0004
necessarily indicated.
0x0008 A change in the data is indicated by the source of data.
0x0010 A change in the data is indicated due to a request through communications.
0x0020 A change in the data is indicated due to action at the device.
0x0040 A control request has been transmitted to a remote device.
0x0080 A control request has been confirmed by a remote device, but is not yet complete.
0x0100 A 1st pass in a 2-pass control operation has been transmitted to a remote device.
0x0200 A 1st pass in a 2-pass control operation has been confirmed by a remote device.
A cancel operation has been transmitted to a remote device to abort a 2-pass control operation
0x0400
between the 1st and 2nd passes.
0x0800 A cancel operation has been confirmed by a remote device.
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 3 Types of Events used in the SOE Logger and the OPC Alarm and Event Server

4.31.1.5 Physical Tag Name


Each row that defines a Master Component data point has a “Physical Tag Name” field that is
automatically generated from the other fields (it is not entered by the user). Slave Component points do not
have Tag Names.

When a physical tag name is generated, the component fields in the tag name have field identifier prefixes
as follows:

Field Prefix Example


Data Link Address L L3
ASDU Address A A44
Type ID/Object Group T T1
Point Address P P231
Element Index (103 only) (none) 6
Function (103 only) F F160

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)

4.31.1.6 User Tag Name


In addition to the Physical Tag Name, a User Tag Name may be defined for each Master Component Point.
Slave Component points do not have Tag Names. The User Tag Name is a user-supplied ASCII text string
that identifies the Master Component Point (e.g., “BreakerReclose”) in a human readable manner. The
User Tag Name is case sensitive, should not contain spaces (underscores are allowed), and each one must
be unique.
Since the User Tag Name is passed through the SDG OPC Server to an external OPC Client application,
care should be taken when using characters in tag names that may have special meaning to the OPC client
application. Some OPC clients may interpret characters such as (! % @ . etc.), in the user tag name with
special meaning. Therefore, please check the manual for the OPC client if these characters are to be used.
The User Tag Name is also used to specify the name of a tag in an external OPC Server when configuring a
Master Data Point that should connect to the external OPC server. The name specified should be the fully
qualified name as would be used to connect to the server using any other generic client (i.e.
“Device1.Group2.CloseBreaker”).
The User Tag Name may be systematized to reflect the Master Point addressing if the user does not impose
some other naming system. The User Tag Name is optional and this field may be left blank. If a Master
Component Point is not assigned a User Tag Name, it may be referred to by its physical tag name, which
reflects its communication protocol-specific identifiers.
If a Master Component point is associated with more than one Slave Component point, the first instance of
a Slave Component point normally appears on the same line as the definition of the Master Component
point. Subsequent Slave Component point definitions reference the Master Component point with the
‘User tag Name’ or ‘Physical tag Name’ that was assigned to the Master Component point.

4.31.1.7 Equation Field


The equation field is used to logically or arithmetically operate on one or more Master Component points
referenced in the equation expression. Either a Physical Tag Name or a User Tag Name may be specified
in the equation field. The result of evaluating the equation parameter field is used as the value of the
Master Point. This value will be assigned to a Slave Component point defined on the same line, or other
Slave Component points referring to the assigned User Tag Name.

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:

If the tag _intR4 is an internal MDO of type R4;

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.

For example, the following OPC Client Tag:

/SUBESTACAO_P/INPUT/00_00_10/Message_2_3.m11

should be enclosed in (single quotes) as follows:

‘/SUBESTACAO_P/INPUT/00_00_10/Message_2_3.m11’

This allows it to be used as an argument in an equation.

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.

Expression Parameters Definition


Physical Tag Name Physical Tag Names previously defined in the Point-Mapping
configuration file
User Tag Name User Tag Names previously defined in the Point-Mapping file
numerical constant Any integer, floating point, or hexadecimal value; (e.g., 23, 14.5e-05, or
0xffa782b respectively)
(expression) Any combination of Physical or User Tag Name, and supported operators
enclosed within parenthesis.
expression op expression Any expression operated with another expression. Only
supported operators may be used (the list of supported operators are listed
below)
function(expression-list) Where function is a supported function as listed below, and expression-list
is one or more expressions separated by commas.

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 205
SCADA Data Gateway | Implementers Guide

4.31.1.8 Supported Operators Used in Expressions

Operator Evaluates to:


&& Logical “and” of the expressions on either side of the operator
|| Logical “or” of the expressions on either side of the operator
& Bit Wise “and” of the expressions on either side of the operator
| Bit Wise “or” of the expressions on either side of the operator
- Arithmetic result of subtracting the expressions on either side of the operator
+ Arithmetic result of adding the expressions on either side of the operator
* Arithmetic result of multiplying the expressions on either side of the operator
/ Arithmetic result of dividing the expressions on either side of the operator
== Compares the left and right side of the ‘==’ and returns true if they are the same value
Compares the left and right side of the ‘!=’ and returns true if they are not the same
!=
value
Compares the left and right side of the ‘>’ and returns true if the left side is greater than
>
the right side
Compares the left and right side of the ‘<’ and returns true if the right side is greater than
<
the left side
Compares the left and right side of the ‘>=’ and returns true if the left side is greater than
>=
or equal to the right side
Compares the left and right side of the ‘<=’ and returns true if the left side is greater than
<=
or equal to the right side
‘ (single Used to allow special equation operator characters as part of the name of an MDO that is
quote) used as an argument in the equation. The MDO name must be enclosed in single quotes.

4.31.1.9 Examples of Valid Expressions

 COM1.L2.A2.T1.P48.F128 && COM1.L2.A2.T1.P49.F128


 COM1.L2.A2.T11.P300.F128 * 5.43 + 20
 OR(COM1.L2.A2.T1.P48.F128, LineEarthFault, BusEarthFault)
 AND(LineEarthFault,NOT(COM1.L2.A2.T1.P49.F128))
 GET_FLAGS(MDNP.L4.T1.P0)
 TEST_BIT(MDNP.L4.T30.P0,2)
 RAND(0,100,1000)
 DIV(COM2.L3.A4.T9.P500, 32768)
 if(mdnp.L4.T30.P0 > mdnp.L4.T30.P1, mdnp.L4.T30.P0, mdnp.L4.T30.P1)
 (0 - COM1.L2.A2.T11.P301) * 2
 pulse( 0,50,ulong(not(myBool)),ulong(myInt),1)

4.31.1.10 Description Field


The Description field permits comments to be entered about the point.

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

Figure 17 Example of Master to Slave and Master to Master Association

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.

4.33 Data Points

4.33.1 Modbus Point Numbering


Some Modbus devices use 0-based numbering, whereas other devices use 1-based addressing.

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:

Above convention SDG


000001 – 065535 Type x 0 – 65535
100001 – 165535 Type y 0 – 65535
Etc.

4.33.2 Point Initialization


When it is first started, the SDG creates storage space in its internal database for the points it will receive from
the remote device. However, since the point values have not yet been received from the device, the SDG sets
the initial value of the points to “0” and sets the quality flag for the points to “invalid”
(STD_QLTY_INVALID).

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.

Figure 18 TMW Simple OPC Client

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

4.33.4 SDG Database Storage Formats

Type Range Conversion


Boolean unsigned char if value=0 then FALSE
0 = FALSE, 1 = TRUE else TRUE
Short signed 16-bit integer value, value truncated to type’s range
-32,768 to 32,767 if required
Unsigned unsigned 16-bit integer value, value truncated to type’s range
Short 0 to 65,535 if required
Long signed 32-bit integer value, value truncated to type’s range
-2,147,483,648 to 2,147,483,647 if required
Unsigned unsigned 32-bit integer value value truncated to type’s range
Long 0 to 4,294,967,295 if required

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]

4.33.5 SDG Database Standard Quality Flags


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

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.

4.33.6 IEC 60870-5-101 and IEC60870-5-104


Single Point Information (SPI) – Type IDs 1 (MSPNA), 2 (MSPTA), 30 (MSPTB)
Master component can provide: SPI, boolean
Slave component request order: SPI, boolean
To  From To  From
Slave Component or SDG Database Storage Master Component
Master Component
Single point
command
0 = determined state OFF Boolean = 0 0 = determined state OFF
1 = determined state ON Boolean = 1 1 = determined state ON
Quality Descriptors: Standard Quality Flags: Quality Descriptors:
BL, SB, NT, IV BL, SB, NT, IV BL, SB, NT, IV
IV set TRUE STD_QLTY_REF_ERROR is
TRUE
IV set TRUE STD_QLTY_UNINITIALIZED
is TRUE
IV set TRUE STD_QLTY_INTRANSIT is
TRUE

Double Point Information (DPI) – Type IDs 3 (MDPNA), 4 (MDPTA), 31 (MDPTB)


Master component can provide: DPI, boolean
Slave component request order: DPI, boolean
To  From To  From
Slave Component or SDG Database Storage Master Component
Master Component
Double point
command
0 = indeterminate or Boolean = 0 0 = indeterminate or intermediate state
intermediate state STD_QLTY_IN_TRANSIT set
TRUE
1 = determined state OFF Boolean = 0 1 = determined state OFF
2 = determined state ON Boolean = 1 2 = determined state ON
3 = indeterminate state Boolean = 0 3 = indeterminate state or IV

© 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

Measured Value (normalized) – Type IDs 9 (MMENA), 10 (MMETA), 34 (MMETD)


Signed 16 bit integer: range <-1 to 1-2-15>
Master component can provide: short
Slave component request order: short
To  From To  From
Slave Component or SDG Database Storage Master Component
Master Component
Normalized value
command
normalized value short normalized 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

Measured Value (scaled) – Type IDs 11 (MMENB), 12 (MMETB), 35 (MMETE)


Signed 16 bit integer: range <-32,768 to +32,767>
Master component can provide: short
Slave component request order: short
To  From To  From
Slave Component or SDG Database Storage Master Component
Master Component
Scaled value
command
scaled value short scaled 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

Measured Value (short float) – Type IDs 13 (MMENC), 14 (MMETC), 36 (MMETF)


32-bit short floating point: range <-3.4*1038 to 3.4*1038-1>
Master component can provide: short float
Slave component request order: short float, short
To  From To  From
Slave Component or SDG Database Storage Master Component
Master Component
Float value
command

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

Bitstring – Type IDs 7 (MBONA), 8 (MBOTA), 33 (MBOTB)


32 bit unsigned long: range <0 to 2*1032-1>
Master component can provide: unsigned long
Slave component request order: unsigned long
To  From To  From
Slave Component or SDG Database Storage Master Component
Master Component
Bitstring command
unsigned long value unsigned long value unsigned long 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

Integrated Totals – Type IDs 15 (MITNA), 16 (MITTA), 37 (MITTB)


32 bit long: range <-2*1031 to 2*1031-1>
Master component can provide: long
Slave component request order: long
To  From To  From
Slave Component SDG Database Storage Master Component
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

Single Command – Type IDs 45 (CSCNA), 58 (CSCTA)


From  To From  To
Slave Component SDG Database Storage Master Component
0 = command state OFF Boolean = 0 0 = command state OFF
1 = command state ON Boolean = 1 1 = command state ON
QU_USE_DEFAULT BIN_CTRL_MODE_NONE QU_USE_DEFAULT
QU_SHORT_PULSE if < BIN_CTRL_MODE_PULSE QU_SHORT_PULSE
max. short pulse time
QU_LONG_PULSE if >= BIN_CTRL_MODE_PULSE QU_LONG_PULSE
to max short pulse time
QU_PERSISTENT BIN_CTRL_MODE_LATCH QU_PERSISTENT)
Double Command – Type IDs 46 (CDCNA), 59 (CDCTA)
From  To From  To
Slave Component SDG Database Storage Master Component
1 = command state OFF Boolean = 0 1 = command state OFF
2 = command state ON Boolean = 1 2 = command state ON
QU_USE_DEFAULT BIN_CTRL_MODE_NONE QU_USE_DEFAULT
QU_SHORT_PULSE if < BIN_CTRL_MODE_PULSE QU_SHORT_PULSE
max. short pulse time
QU_LONG_PULSE if >= BIN_CTRL_MODE_PULSE QU_LONG_PULSE
to max short pulse time
QU_PERSISTENT BIN_CTRL_MODE_LATCH QU_PERSISTENT
Regulating Step Command – Type IDs 47 (CRCNA), 60 (CRCTA)
From  To From  To
Slave Component SDG Database Storage Master Component
1 = command state OFF Boolean = 0 1 = command state OFF
2 = command state ON Boolean = 1 2 = command state ON
QU_USE_DEFAULT BIN_CTRL_MODE_NONE QU_USE_DEFAULT
QU_SHORT_PULSE if < BIN_CTRL_MODE_PULSE QU_SHORT_PULSE
max. short pulse time
QU_LONG_PULSE if >= BIN_CTRL_MODE_PULSE QU_LONG_PULSE
to max short pulse time
QU_PERSISTENT BIN_CTRL_MODE_LATCH QU_PERSISTENT
Set-Point Command (normalized value) – Type IDs 48 (CSENA), 61 (CSETA)
Signed 16 bit integer: range <-1 to 1-2-15>
From  To From  To
Slave Component SDG Database Storage Master Component
normalized value short normalized value
Set-Point Command (scaled value) – Type IDs 49 (CSENB), 62 (CSETB)
Signed 16 bit integer: range <-32,768 to +32,767>
From  To From  To
Slave Component SDG Database Storage Master Component
scaled value short scaled value
Set-Point Command (short float value) – Type IDs 50 (CSENC), 63 (CSETC)
32-bit short floating point: range <-3.4*1038 to 3.4*1038>
From  To From  To
Slave Component SDG Database Storage Master Component
short float value short float short float value
Bitstring Command (short float value) – Type IDs 51 (CBONC), 64 (CBOTA)
32 bit unsigned long: range <0 to 2*1032-1>
From  To From  To
Slave Component SDG Database Storage Master Component
unsigned long value unsigned long value unsigned long value

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

Local Forced = 1 UPDTRSN_CTRL_AT_DEVICE Local Forced = 1


Binary Output Control, Object Group 12
 To  From
Slave Component SDG Database Storage Master Component
Code = NUL Boolean = 0 Code = NUL
BIN_CTRL_MODE_NONE
Code = Latch Off Boolean = 0 Code = Latch Off
BIN_CTRL_MODE_LATCH
Code = Latch On Boolean = 1 Code = Latch On
BIN_CTRL_MODE_LATCH
Code = Pulse Off Boolean = 0 Code = Pulse Off
BIN_CTRL_MODE_PULSE
Code = Pulse On Boolean = 1 Code = Pulse On
BIN_CTRL_MODE_PULSE
Trip/Close = 1 (Close) Boolean = 0 Trip/Close = Close
BIN_CTRL_MODE_PAIRED
Trip/Close = 2 (Trip) Boolean = 1 Trip/Close = Trip
BIN_CTRL_MODE_PAIRED
Analog Input, Object Group 30 and 32
 To  From
Slave Component or SDG Database Storage Master Component
Master Component
Analog command
Long, variation 1, 3 Long Short, variation 2, 4
Long, variation 1, 3
Short float, variation 5 Short Float Short float, variation 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 Over Range = 1
Reference Check = 1 STD_QLTY_REF_ERROR Reference Check = 1
Analog Output Status, Object Group 40
 To  From
Slave Component SDG Database Storage Master Component
0 Boolean = 0 0
1 Boolean = 1 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

Analog Output Control, Object Group 41


 To  From
Slave Component SDG Database Storage Master Component
Short, variation 2, 4 Long Long, variation 1, 3
Long, variation 1, 3
Short float, variation 5 Short Float Short float, variation 5

Binary Counters, Object Group 20, 21, 22, and 23


 To  From
Slave Component SDG Database Storage Master Component

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

4.33.10 OPC Reads


The following flags are used with all OLE Variant data types:
To  From To  From
OPC Server Slave Component SDG Database Storage OPC Client Master
Component
Any of
OPC_QUALITY_NOT_CONNECTED STD_QLTY_UNINITIALIZED OPC_QUALITY_NOT_CONNECTED
set TRUE is TRUE OPC_QUALITY_CONFIG_ERROR
set TRUE
OPC_QUALITY_OUT_OF_SERVICE STD_QLTY_BLOCKED is OPC_QUALITY_OUT_OF_SERVICE
set TRUE TRUE set TRUE
Any of
STD_QLTY_INVALID is OPC_QUALITY_BAD
OPC_QUALITY_BAD set TRUE
TRUE OPC_QUALITY_SUB_NORMAL
set TRUE
OPC_QUALITY_SENSOR_CAL set STD_QLTY_REF_ERROR is OPC_QUALITY_SENSOR_CAL set
TRUE TRUE TRUE
OPC_QUALITY_EGU_EXCEEDED STD_QLTY_OVERFLOW is OPC_QUALITY_EGU_EXCEEDED
set TRUE TRUE set TRUE
Any of
OPC_QUALITY_LAST_USABLE
OPC_QUALITY_LAST_KNOWN
OPC_QUALITY_LAST_USABLE set STD_QLTY_NOT_TOPICAL OPC_QUALITY_OUT_OF_SERVICE
TRUE is TRUE OPC_QUALITY_COMM_FAILURE
OPC_QUALITY_SENSOR_FAILURE
OPC_QUALITY_DEVICE_FAILURE
set TRUE
OPC_QUALITY_UNCERTAIN set STD_QLTY_IN_TRANSIT is OPC_QUALITY_UNCERTAIN set
TRUE TRUE TRUE
Any of
OPC_QUALITY_LOCAL_OVERRIDE STD_QLTY_SUBSTITUTED OPC_QUALITY_LOCAL_OVERRIDE
set TRUE is TRUE
set TRUE
Boolean OLE Variant Type
TOleBool
To  From To  From
OPC Server Slave Component SDG Database Storage OPC Client Master
or OPC Client Master Component
Component
VT_BOOL Boolean VT_BOOL
Short OLE Variant Type
Smallint
To  From To  From
OPC Server Slave Component SDG Database Storage OPC Client Master
or OPC Client Master Component
Component
VT_I2 Short VT_I2
Short Float OLE Variant Type
Single
To  From To  From
OPC Server Slave Component SDG Database Storage OPC Client Master
or OPC Client Master Component
Component
VT_R4 short float VT_R4
Double Float OLE Variant Type
Double Float

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

Long OLE Variant Type


Longint
To  From To  From
OPC Server Slave Component SDG Database Storage OPC Client Master
or OPC Client Master Component
Component
VT_I4 long VT_I4

Unsigned Long OLE Variant Type


Unsigned Longint
To  From To  From
OPC Server Slave Component SDG Database Storage OPC Client Master
or OPC Client Master Component
Component
VT_UI4, VT_R8 unsigned long VT_UI4, VT_R8

4.33.11 OPC Writes


Boolean OLE Variant Type
ToleBool
From  To  To
From
OPC Server Slave SDG Database OPC Client Master
Component Storage Component
VT_BOOL Boolean VT_BOOL

Short OLE Variant Type


Smallint
From  To  To
From
OPC Server Slave SDG Database OPC Client Master
Component Storage Component
VT_I2 Short VT_I2
Short Float OLE Variant Type
Single
From  To  To
From
OPC Server Slave SDG Database OPC Client Master
Component Storage Component
VT_R4 short float VT_R4
Double Float OLE Variant Type
Double Float
From  To  To
From

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 221
SCADA Data Gateway | Implementers Guide

OPC Server Slave SDG Database OPC Client Master


Component Storage Component
VT_R8 double float VT_R8

Long OLE Variant Type


Longint
From  To  To
From
OPC Server Slave SDG Database OPC Client Master
Component Storage Component
VT_I4 long VT_I4
Unsigned Long OLE Variant Type
Unsigned Longint
From  To  To
From
OPC Server Slave SDG Database OPC Client Master
Component Storage Component
VT_UI4, VT_R8 unsigned long VT_UI4, VT_R8

4.33.12 Predefined Internal MDOs for Monitoring and Control


Predefined Internal MDOs give the OPC Server and other Slave Components access to internal SDG status
and operation. The tag name is assigned based on the specific communication channel, session, or sector that
it applies to. The format of names for Predefined Internal MDOs is:
Channel.LinkAddress.ASDUAddress.Name, shown below as COMx.Ly.Az.Name.

4.33.12.1 Characteristics of Predefined Internal MDOs

 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.

PREDEFINED INTERNAL MDOS M/S PROTOCOL TYPE DESCRIPTION


GatewayOnline M/S All R/O True (1) whenever the gateway
Bin program is running. Inserts an
event into the event buffer
indicating the SDG’s startup time

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

PREDEFINED INTERNAL MDOS M/S PROTOCOL TYPE DESCRIPTION


COMx.NumSyncErrors M/S All R/W Error Count. Frame
Int synchronization errors detected on
the communication channel
COMx.NumTimeoutErrors M/S All R/W Error Count. Data link timeouts on
Int this Session
COMx.TotalErrors M/S All R/W Total number of errors on this
Int channel
COMx.NumPhysCharTimeoutEr M/S All R/W Total number of Character Timeout
rors Int Errors on this channel
COMx.NumPhysXmitErrors M/S All R/W Total number of Transmit errors on
Int this channel
COMx.NumRxBytes M/S All R/W Total number of bytes received on
Int this channel
COMx.NumTxBytes M/S All R/W Total number of bytes transmitted
Int on this channel
COMx.NumTxFrames M/S All R/W Count of message frames
Int transmitted
COMx.NumRxFrames M/S All R/W Count of valid message frames
Int received
COMx.ChannelSessionsOnLineS M/S All R/O TRUE if all sessions on this channel
tatus Bin are on line
COMx.SessionsOfflineCounter M/S All R/W Counts the number of times any
Int session on this channel has gone
offline
COMx.T1AckTime M 104 R/O Int The current amount of time elapsed
between sending a frame and
receiving an acknowledge
COMx.T1MaxAckTime M 104 R/W The maximum amount of time that
Int has elapsed between sending a
frame and receiving an
acknowledge. This value can be
used to tune the value of T1
(LinkCnfmTimeout).
COMx.NumTxFragments M/S DNP R/W Number of fragments transmitted
Int on this channel
COMx.NumRxFragments M/S DNP R/W Number of fragments received on
Int this channel
COMx.Ly.OnLineStatus * M/S All R/O Status bit that reflects the current
Bin online status for this session. A
true(1) value means the session is
currently online and
communicating. A false(0) value
means the session if currently
offline. This will occur at system
startup, when the
SessionActiveControl point is set to
false(0), or when the master does
not receive a data link confirm
within the specified timeout period
for the specified number of retries.

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

PREDEFINED INTERNAL MDOS M/S PROTOCOL TYPE DESCRIPTION


COMx.Ly.Az.IECActionNow M 101, 103, R/W See the description below for a
104 Int definition of the bits in this mask.
COMx.Ly.Az.IECActionMask0-4 M 101, 103, 104 R/W Int See the description below for a
definition of the bits in this mask.
COMx.Ly.Az.IECActionPrd0-4 M 101, 103, 104 R/W Int Time between actions defined in the
IECActionMask0-4, specified in
milliseconds.
COMx.Ly.Az.CreateTagsAuto M 101,103,104 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 sector. 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.Az.Reset101RemoteNow M 101, 104 R/W Int Write QRP value to send to IEC 60870-
* 5-101 Slave when issuing application
layer command Type ID 105. Refer to
IEC 60870-5-101 clause 7.2.6.27.
Normally the QRP value will be 1
(reset Slave) or 2 (clear event buffers).
COMx.Ly.Az.Reset103RemoteNow M 103 R/W Write true (1) to issue a data link Reset
Bin CU command to an IEC 60870-5-103
Slave.
COMx.Ly.Az.ClearEventBuffers * S 101, 104 R/W Write true (1) to clear the sector’s event
Bin buffers.
COMx.Ly.Az.ResetCountersNow M 101, 104 R/W Write true (1) to issue an application
Bin level reset counters command.
COMx.Ly.Az.FreezeCountersNow M 101, 104 R/W Write true (1) to issue an application
Bin level freeze counters command.
COMx.Ly.Az.TestNow M 101, 104 R/W Write true (1) to issue an application
Bin level test command. Write false(0) to
issue an application level test command
with an invalid sequence number (i.e.
test will fail).
COMx.Ly.Az.NumMissingResponse M 101, 103, 104 R/W Int Error Count. Responses to this sector
s* that have been lost.
COMx.Ly.Az.TotalEventOverflows S 101, 104 R/W Int Error Count. Number of events in this
* sector that have not been reported
because of buffer overflow.
COMx.Ly.Az.Tt.NumEventOverflo S 101, 104 R/W Int Error Count. Number of events of this
ws * type in this sector that have not been
reported because of buffer overflow.
Table 5 Predefined Internal MDOs
* Link Address not used for IEC 60870-5-104, Sector Address not used for DNP3

4.33.12.2 Action Mask and Period


The user can interactively, or periodically, issue various commands from the SDG master components
through a set of masks and corresponding periods. The specific commands that can be performed are
defined in the tables below. A command, or action, is selected by setting the corresponding bit in the
appropriate mask to 1.

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.

4.33.12.3 DNP Action Mask


Bit Action
Position
0 (LSB) Read Class 1 Change Events
1 Read Class 2 Change Events
2 Read Class 3 Change Events
3 Read Binary Input Change Events
4 Read Analog Input Change Events
5 Read Running Counter Change Events
6 Read Frozen Counter Change Events
7–9 Not Used
10 Read Class 0 Static Data (See note 1)
11 Specific flag – only request points in the SDG database for the data type(s) selected in bits
12-17 (See notes 2, 4, 6)
12 Read Binary Inputs (See notes 2, 6)
13 Read Analog Inputs (See notes 2, 6)
14 Read Running Counters (See notes 2, 6)
15 Read Frozen Counters (See notes 2, 6)
16 Read Binary Output Status (See note 6)
17 Read Analog Output Status (See note 6)
18 – 20 Not Used
21 Send a Clock Synchronization Request
22 Send a Freeze Counters Command
23 Send a Freeze and Clear Counters Command
24 – 31 Not Used
(MSB)

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).

4.33.12.4 DNP Action Now Status


The DNPActionNow has a completion status MDO associated with it called DNPActionNowStatus. This
MDO is used to display the current status of the DNPActionNow request. The following describes the
meaning of the values:

Status Value Meaning


0 (success) Indicates the request has completed successfully
1 (intermediate) Indicates a response was received but the requested command is not yet complete.
This could mean the response is part of a multi-fragment response and did not
have the FINAL bit set. Or this could be a request such as a select operate that
requires multiple requests and responses.
2 (failure) Indicates that the transmission of the request failed
3 (mismatch) The response to a select or an execute did not echo the request.
4 (statuscode) The response to a select or an execute echoed the request, except the status code
was different indicating a failure.
5 (iin) The response to the request had IIN bits set indicating the command failed.
6 (timeout) This indicates that the request has timed out. This could either be an incremental
timeout indicating we received no link layer frame from the device in the
specified time, or an application response timeout indicating this particular
request did not complete in the specified time.
7 (canceled) This indicates either that the user asked that the request be canceled by calling
dnpchnl_cancelFragment or that a second duplicate request has been made and
therefore this first one is canceled.

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.

4.33.12.5 DNP Action Mask Examples

4.33.12.5.1 Periodic Class Data Polls


The following action mask and period settings will cause a periodic integrity data poll (class 1,2,3,0)
at a frequency of 60 minutes and a report by exception data poll (class 1,2,3) every 2 seconds.

DNPActionMask0[*] = 0x0407 // bits 0, 1, 2, 10


DNPActionPrd0[*] = 3600000 // 60 minutes * 60 seconds * 1000 milliseconds

Page | 228 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide

DNPActionMask1[*] = 0x0007 // bits 0, 1, 2


DNPActionPrd1[*] = 2000 // 2 seconds * 1000 milliseconds

4.33.12.5.2 Binary and Analog Points


Typically binary input change events are read more frequently than analog input change events.

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.

DNPActionMask0[*] = 0x3018 // bits 3, 4, 12, 13


DNPActionPrd0[*] = 3600000 // 60 minutes * 60 seconds * 1000 milliseconds

Read binary input change events once every 2 seconds:

DNPActionMask1[*] = 0x0008 // bit 3


DNPActionPrd1[*] = 2000 // 2 seconds * 1000 milliseconds

Read analog input change events once every 20 seconds:

DNPActionMask2[*] = 0x0010 // bit 4


DNPActionPrd2[*] = 20000 // 20 seconds * 1000 milliseconds

4.33.12.5.3 Specific Points


For DNP applications that do not support report by exception, the recommended way to reduce
bandwidth requirements is to use the specific flag. Specific mode only requests data for the current
Master data objects in the gateway of the type specified by the bit-mask.

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.

Read specific binary points once every 5 seconds:

DNPActionMask0[*]= 0x1800 // bits 11, 12


DNPActionPrd0[*]= 5000 // 5 seconds * 1000 milliseconds

Read specific analog points once every 20 seconds:

DNPActionMask1[*]= 0x2800 // bits 11, 13


DNPActionPrd1[*]= 20000 // 20 seconds * 1000 milliseconds

4.33.12.6 IEC Action Mask

Bit Position Action


0 (LSB) Send a clock synchronization request
1 Send general interrogation request

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 229
SCADA Data Gateway | Implementers Guide

2 Send group 1 interrogation request


3 Send group 2 interrogation request
4 Send group 3 interrogation request
5 Send group 4 interrogation request
6 Send group 5 interrogation request
7 Send group 6 interrogation request
8 Send group 7 interrogation request
9 Send group 8 interrogation request
10 Send group 9 interrogation request
11 Send group 10 interrogation request
12 Send group 11 interrogation request
13 Send group 12 interrogation request
14 Send group 13 interrogation request
15 Send group 14 interrogation request
16 Send group 15 interrogation request
17 Send group 16 interrogation request
18 Send general counter interrogation request
19 Send counter group 1 interrogation request
20 Send counter group 2 interrogation request
21 Send counter group 3 interrogation request
22 Send counter group 4 interrogation request
23 – 31 (MSB) Not Used

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.

4.33.12.7 Modbus Action Mask

Bit Position Action


0 (LSB) Read Coils
1 Read Holding Registers
2 Read Discrete Inputs
3 Read Input Registers
4 – 31 (MSB) Not Used

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.

4.34.1 Event Time Tags and Database Update Times


There are two ways that the SDG can assign a time to generated events. The first is to record the value of the
SDG internal clock when the database object is updated. This is referred to as the ‘Update’ time. The second
option is the ‘Reported’ time. This is the time reported to the SDG master component as part of the incoming
message from remote slave devices. This time is relative to the current time on the remote device and hence
there is the possibility of an inconsistent time base when using this approach with multiple slave devices.

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.

4.35 ‘Sequence of Event’ Log Files


The ‘Sequence of Event’ (SOE) Log file contains records describing events reported to, detected by, and/or
generated by the Gateway software. Each record describes one reported, detected, or generated event
associated with a Master Component Point. External software applications may actively use the data within
the log file simultaneously with the Gateway updating the file.

© 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>

extern "C" long SOEQUEUE_API __cdecl SOEOpen(void);

/// <summary> Close the SOE Queue. </summary>


///
/// <returns> 1 for success, any other value is a failure. </returns>

extern "C" long SOEQUEUE_API __cdecl SOEClose(void);

/// <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>

extern "C" long SOEQUEUE_API __cdecl SOEsetStartingSOERecord(int h);

/// <summary> retrieve a record from the SOE Queue. </summary>


///
/// <param name="buf"> [in,out] A buffer for the retrieved record. </param>
/// <param name="h"> [in,out] If non-null, the returned record handle. </param>
///
/// <returns> 1 for success, any other value is a failure. </returns>

extern "C" long SOEQUEUE_API __cdecl SOEreadSOERecord(LPSTR buf, int *h);

/// <summary> remove all acknowledged records from the SOE Queue. </summary>
///
/// <returns> 1 for success, any other value is a failure. </returns>

extern "C" long SOEQUEUE_API __cdecl SOEremoveAllAckedRecords();

SOEPInvoke.cs
[DllImport("SOEQueue.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern Int32 SOEOpen();

[DllImport("SOEQueue.dll", CallingConvention = CallingConvention.Cdecl)]


public static extern Int32 SOEClose();

[DllImport("SOEQueue.dll", CallingConvention = CallingConvention.Cdecl)]


public static extern Int32 SOEsetStartingSOERecord(Int32 handle);

Page | 232 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.
SCADA Data Gateway | Implementers Guide

[DllImport("SOEQueue.dll", CallingConvention = CallingConvention.Cdecl)]


public static extern Int32 SOEreadSOERecord([MarshalAs(UnmanagedType.LPStr)]StringBuilder
receiveddata, out Int32 receivedhandle);

[DllImport("SOEQueue.dll", CallingConvention = CallingConvention.Cdecl)]


public static extern Int32 SOEremoveAllAckedRecords();

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.

Parameter Name Description of What Events Are to Be Logged


SOEQFileName Sequence Of Events Queue File Name and Path
EnableSOEQ If true the SOE Queue will be enabled.
The maximum number of items allowed in the SOE Queue. If this limit is exceeded
MaxSOEQSize
oldest items are removed.
The rate at which acknowledged items are removed from the SOE Queue. When
SOEQCleanupRate this number of items has been added to the queue a cleanup is initiated. All
acknowledged items will be removed from the queue at this rate.
EventLogFileName The name of the file or files into which events are to be logged
EventLogRecordFormat The format of records within log files and the SOE queue
The maximum amount of time after an event record has been written to a log file in
EventLogFileFlushPrd which the log file will be “flushed,” allowing external software applications to read
the updated log file records.
Errors_logMask The type of error events to be logged
Diagnostics_logMask The type of diagnostic events to be logged
GatewayControl_logMask The type of events associates with internal Gateway control points to be logged
Equations_logMask The type of events associated with internally calculated equation points to be logged
MSPNA_logMask The type of 60870-5-101/104 single point events to be logged
MDPNA_logMask The type of 60870-5-101/104 double point events to be logged
MSTNA_logMask The type of 60870-5-101/104 step position events to be logged
MMENA_logMask The type of 60870-5-101/104 normalized measurand events to be logged
MMENB_logMask The type of 60870-5-101/104 scaled measurand events to be logged

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 233
SCADA Data Gateway | Implementers Guide

Parameter Name Description of What Events Are to Be Logged


MMENC_logMask The type of 60870-5-101/104 floating point measurand events to be logged
MEINA_logMask The type of 60870-5-101/104 end of initialization events to be logged
CSCNA_logMask The type of 60870-5-101/104 single command events to be logged
CDCNA_logMask The type of 60870-5-101/104 double command events to be logged
CRCNA_logMask The type of 60870-5-101/104 regulating step command events to be logged
CSENA_logMask The type of 60870-5-101/104 normalized set point command events to be logged
CSENB_logMask The type of 60870-5-101/104 scaled set point command events to be logged
CSENC_logMask The type of 60870-5-101/104 floating point set point command events to be logged
CCSNA_logMask The type of 60870-5-101/104 clock synchronization events to be logged
103_M103Type1_logMask The type of 60870-5-103 type 1 events to be logged
103_M103Type2_logMask The type of 60870-5-103 type 2 events to be logged
103_M103Type4_logMask The type of 60870-5-103 type 4 events to be logged
103_M103Type5_logMask The type of 60870-5-103 type 5 events to be logged
103_M103Type9_logMask The type of 60870-5-103 type 9 events to be logged
103_M103Type20_logMask The type of 60870-5-103 type 20 general commands events to be logged
MDNPType1_logMask The type of DNP Binary Input events to be logged
MDNPType10_logMask The type of DNP Binary Output Status events to be logged
MDNPType12_logMask The type of DNP Binary Output Control events to be logged
MDNPType20_logMask The type of DNP Counter events to be logged
MDNPType21_logMask The type of DNP Frozen Counter Input events to be logged
MDNPType30_logMask The type of DNP Analog Input events to be logged
MDNPType40_logMask The type of DNP Analog Output Status events to be logged
MDNPType41_logMask The type of DNP Analog Output Control events to be logged
Table 6 List of Parameters on what to log for Events

4.35.1 Event Log File Names


EventLogFileName defines the file name, including path, base filename, and extension in which to store
event log records. The filename can contain the same %xxx property fields defined for event record format,
described in Section 4.29.2 below. These fields effectively allow multiple log files; the file in which a
specific event will be logged is determined when the event occurs by expanding the %xxx property fields for
that event. This feature helps organize Sequence Of Event Log files based on any of the event properties.

For example, consider the following:

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.

An example format string:


EventLogRecordFormat = “%ry4-%02rmr-%02rdm %rtm,%val,%qly,%utg,%dcr”

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

ry4 rmr rdm rtm val qly utg dcr

%ry4 %02rmr %02rdm %rtm, %val, %qly, %utg, %dcr


2000 11 30 11:53:58.216, on, 0, com1.L12.A41.T1.P100, Feeder Breaker

Figure 19 Event Log Record Format

4.35.2.1 Value Field Names (VFN_Table)


The following fields describe data point properties, which, if changed, usually indicate an event.

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

4.35.2.2 Update Date and Time Field Names (UDTF_Table)


The update date and time property fields describe the date and time when an event is detected or updated
within the SDG. The timestamp is based on the clock used by SDG. The distinction between the update
date and time and the reported date and time, which is described next, is important. The following table
describes format fields that correspond to update date and time event properties.

Field Name Event Property Update Date and Time Description


Update Date The update date of the event. Formatted as dd-mmm-yyyy, where
udt dd is day of month, mmm is a 3-character abbreviation for month,
and yyyy is the year.
Update Time The update time of the event. Formatted as hh:mm:ss.iiii, where hh
utm
is hour (0-23), mm is minute, ss is second, and iii is milliseconds.
uy2 Update 2-digit Year The update year of the event, from 0-99 of the event
uy4 Update 4-digit Year The update year of the event, from 1901 to 2099
umr Update Month The update month of the event, from 1 to 12
Update Month Name The update month of the event; using 3 character abbreviations for
ume
month names
udm Update Day of Month The update day of the event, from 1 to 31
Update Day of Week The update day-of-week of the event, using 3 character
udw
abbreviations for day names.
uhr Update Hour The update hour of the event, from 0 to 23
umn Update Minute The update minute of the event, from 0 to 59
usc Update Second The update second of the event, from 0 to 59
ums Update Milliseconds The update milliseconds of the event, from 0 to 999
A hexadecimal number indicating the quality of the updated date and
time of the event.
The time quality can indicate any combination of the following bits:
Utq Update Time Quality
Successful – no fault or other conditions are associated
(none)
with the update time.
The update date/time is invalid, which may occur if a
I
particular data point has never been updated.
Table 8 Update Date and Time Event Description

4.35.2.3 Reported Date and Time Field Names (RDT_Table)


The reported date and time property fields describe the date and time of an event as reported by the device
reporting the event. It is based on the clock of the reporting device, which is not necessarily synchronized
with the clock used by the SDG. If the reporting device did not include a date and time with the report of
the event, then the update date and time will be used. The following table describes format fields that
correspond to reported date and time event properties:

© 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved. Page | 237
SCADA Data Gateway | Implementers Guide

Field Name Event Property Reported Date and Time Description


The reported date of the event. Formatted as dd-mmm-yyyy, where dd
rdt Reported Date is day of month, mmm is a 3-character abbreviation for month, and
yyyy is the year.
The reported time of the event. Formatted as hh:mm:ss.iiii, where hh is
rtm Reported Time
hour (0-23), mm is minute, ss is second, and iii is milliseconds.
Reported
ry2 The reported year of the event, from 0-99 of the event
2-digit Year
Reported
ry4 The reported year of the event, from 1901 to 2099
4-digit Year
rmr Reported Month The reported month of the event, from 1 to 12
Reported The reported month of the event; using 3 character abbreviations for
rme
Month Name month names
Reported
rdm The reported day of the event, from 1 to 31
Day of Month
Reported The reported day-of-week of the event, using 3 character abbreviations
rdw
Day of Week for day names
rhr Reported Hour The reported hour of the event, from 0 to 23
rmn Reported Minute The reported minute of the event, from 0 to 59
rsc Reported Second The reported second of the event, from 0 to 59
Reported
rms The reported milliseconds of the event, from 0 to 999
Milliseconds
Reported A hexadecimal number indicating the quality of the reported date and
Rtq
Time Quality time of the event.
The time quality can indicate any combination of the following bits:
Successful – no fault or other conditions are associated with
(none)
the update time.
All fields of the date and time were assumed based on the
A date and time the event was received (the update time was
used).
The hour and date were assumed based on the date and time
H the event was received. The minutes, seconds and
milliseconds are as reported from the remote device.
The event was assumed to have occurred in the hour
previous to the one in which the event was received because
-H
the reported minutes were significantly greater than the
current minutes.
The event was assumed to have occurred in the hour after
the one in which the event was received because the
+H
reported minutes were near 0 and the current minutes were
near 59.
The date was assumed based on the date and time the event
D was received. The time is as reported from the remote
device.
The event was assumed to have occurred in the day
previous to the one in which the event was received because
-D
the reported hours were significantly greater than the
current hours.
+D The event was assumed to have occurred in the day after the

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

4.35.2.4 Identification Field Names (IFN_Table)


The following fields describe properties of a data point that identify the point:

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

4.35.2.5 Escape sequences within Event Log Record Formats (ELR_Table)


Escape sequences are sequences of characters that begin with an escape character (the back-slash
“\”character) followed by one or more other characters. The escape sequences supported within
EventLogRecordFormat are listed in the table below. Escape sequences are not supported within
EventLogFileName. The reason for this is that escape sequences are not useful in file names, and the
escape character (a back-slash) conflicts with file directory separators.

© 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

4.35.3 Flush Period


EventLogFileFlushPrd defines the maximum amount of time after an event is recorded in a log file in which
that file will be flushed. This may allow external software applications to access the data stored in the log file
soon after the event is generated and stored in the log file.

4.35.4 Log Mask


The tttt_logMask configuration parameters (where tttt represents any of the data types listed in the table in
Section ‘Sequence of Event’ Log Files section 4.29 page 231) specify the type of events for all points of each
type that are to be logged in Sequence of Event Log Files. (The LOGMSKxxxx point option described in
may be used to override tttt_logMask for a specific point.)

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.

Mask Value Type of Event


0x0001 The data is being updated, but the reason for the update is unknown.
0x0002 The data is being updated because it was requested.
The data is being updated by the source of data without direct request. No change is
0x0004
necessarily indicated.
0x0008 A change in the data is indicated by the source of data.
0x0010 A change in the data is indicated due to a request through communications.
0x0020 A change in the data is indicated due to action at the device.
0x0040 A control request has been transmitted to a remote device.
0x0080 A control request has been confirmed by a remote device, but is not yet complete.
0x0100 A 1st pass in a 2-pass control operation has been transmitted to a remote device.
0x0200 A 1st pass in a 2-pass control operation has been confirmed by a remote device.
A cancel operation has been transmitted to a remote device to abort a 2-pass control
0x0400
operation between the 1st and 2nd passes.
0x0800 A cancel operation has been confirmed by a remote device.

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 DNP3 Datasets


It is highly recommended that the user be familiar with the document ‘DNP Technical Bulletin TB2004-004e
Data Sets’ prior to using this feature of the SDG. This document will provide the required background to
effectively use and configure data sets in the SDG.

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

This will display the Add a DNP Prototype dialog screen:

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

This will display the Dataset Element Editor dialog screen:

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:

This will display the Add a DNP Descriptor dialog screen:

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:

This will display the Add a Dataset Element dialog screen:

© 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.

4.36.5 Dataset Present Value Mapping


Dataset present values can be mapped to other points in the SDG and can also show up in an OPC client
connected to the SDGs OPC server.

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.2 Running the SDG on Windows Vista / Windows 7


When using these operating systems, you install the SCADA Data Gateway by first saving the file locally and
then right-clicking on it and select "Run as Administrator." Next, right-click on the SDG shortcut icon and
then select the Compatibility tab. Select "Run this program as an Administrator" then click OK; after that,
starting the SCADA Data Gateway from the shortcut should run it as an Administrator. In addition, you can
disable the User Account Control Settings in the Control Panel.

5.3 Running the SDG on a Virtual Machine


The evaluation versions of the SCADA Data Gateway will not run in a Virtual Machine (VM). Only a fully
licensed copy can run in a VM.

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.

5.5.1 “Physical layer error: Error opening channel”

© 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.

5.5.1.1 TCP/IP Connection


With TCP/IP, you will normally get this message until the corresponding device also opens the port. It is
not unusual to see several of these messages while the other device starts up and opens the port.

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.

The typical settings that can cause this problem are:


 address: the Master (client) must specify the TCP/IP address of the Slave device. The Slave must
either specify the TCP/IP address of the client or use an address of "*.*.*.*". (The *.*.*.* address
instructs the server to accept a connection from any client.)
 port: both the Master and Slave must use the same port; for DNP3, you would normally use port
20000
 mode: typically, the Slave should be a Server and the Master should be a Client.

5.5.1.2 Serial Connection


With serial connections, this message usually indicates that the port cannot be opened. If the specified port
is installed in the computer, then this is error is usually caused by another program using the serial port,
preventing it from being opened. PDA “hotsync” programs are frequently the problem.

5.5.1.3 Modem Channels


The "physical layer error: Error opening channel" message is normal for modem channels; it occurs
because the channel attempts to open a physical connection, but this attempt will fail until a successful dial-
up connection is established. As a result, this message will display about every 10 seconds when the
channel is idle.

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.

5.5.3 Other issues


 Verify that the desired protocol is licensed.
 Verify the physical connection.
 Turn on the Physical Layer in the Protocol Analyzer window and verify that bytes are sent and
received and that the “Physical layer error: Error opening channel” message is not being issued.

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.

5.7 Missing DLL Files

5.7.1 Missing Microsoft Visual C Run-time Components


If you receive an error message indicating that the msvcrt.dll file is missing, then Microsoft Visual C
Run-time Components have not been fully installed on your computer. These files are normally part of
all Microsoft Windows Operating System installations.

To fix this problem, contact Triangle MicroWorks. We will send you a new msvcrt.dll with instructions
for where to load the file.

5.7.2 Error Starting the GTWService - Missing Localization DLL (VC80.MCFLOC)


If you are experiencing issues when trying to run the SDG as a service, the localization DLL may be corrupt
or missing. To correct this, you will need to download and install the Microsoft Visual C++ 2010 SP1
Redistributable Package using the following URL:

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

5.8 Using an RS-232/RS-485 Converter with the SCADA Data Gateway


The SDG is compatible with any RS-232/RS-485 converter using Send Data (SD) control. If you experience
communication problems when using the SDG with an RS-232/RS-485 converter, make sure that your
converter is configured for Send Data control.

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

5.9 “Missing” Parameters in tmwgtway.ini file


Note that not all parameters are written to the INI file by default. For some parameters, if the current setting is the default
setting, the parameter is not written to the INI file. To change the value of these parameters, you may simply add the
parameter to the INI file.

A complete list of INI file configuration options is available in the SDG Application by selecting HelpINI 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

6. SCADA Data Gateway Technical Support


The best method for receiving technical support for the SDG is to complete a support request ticket on the
Triangle MicroWorks website. This request is submitted directly to the technical support department. To
access this page, click on HelpSubmit Support Request from the SDG’s main menu (requires an internet
connection). To access this page directly, please use the following link:

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
FileSave 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.

Defined to use Layers: 1 (Physical), 2 (Data Link Layer) and 7 (Application


Layer), along with a ‘User defined Layer’ at the top.
Ethernet A local-area network (LAN) protocol developed by Xerox Corporation in
cooperation with DEC and Intel in 1976. Ethernet uses a bus or star topology
and supports data transfer rates of 10 Mbps. The Ethernet specification served
as the basis for the IEEE 802.3 standard, which specifies the physical and
lower software layers. A newer version of Ethernet, called 100Base-T (or Fast
Ethernet) now exists.
F-Code Function code

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

IEC 101 IEC 60870-5 protocol standard

Information Object A component of the ASDU. Consists of an information object identifier,


which may include the information object type, information object address,
and a set of information elements along with a time tag of information object.
IOA (Information Object Specifies the associated address of the first information element of the
Address) sequence of information elements in the ASDU.
INF (Information The INF is used when IEC60870-5-103 protocol is selected. The INF is an
Number) octet, which is part of the Information Object Identifier in the Information
Object of the ASDU.
interoperability The ability of software and hardware on different machines from different
vendors to share data.
ISO (International Communication protocol widely used for SCADA and process control
Organization for applications originally developed by Modicon. The Modbus protocol is now
Standardization) in the public domain.

Monitoring direction The direction of transmission from the controlled station to a controlling
station.
OLE Microsoft Windows™ platforms Object Linking & Embedding

OPC OLE for Process Control

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.

Cables in the 10Base-T system connect with RJ-45 connectors. A star


topology is common with 12 or more computers connected directly to a hub or
concentrator. The 10Base-T system operates at 10 Mbps and uses baseband
transmission methods.
100 Base T A networking standard that supports data transfer rates up to 100 Mbps (100
megabits per second). 100Base-T is based on the older standard.

Page | 258 © 1994 - 2017 Triangle MicroWorks, Inc. All rights reserved.

You might also like