Beruflich Dokumente
Kultur Dokumente
Doc ID RSSQL-UM001D-EN-P
Technical Support Telephone1-440-646-5800 World Wide Webwww.software.rockwell.com 2003 Rockwell Software Inc., a Rockwell Automation company. All rights reserved. Printed in the United States of America. Portions copyrighted by the Allen-Bradley Company, LLC, a Rockwell Automation company. This manual and any accompanying Rockwell Software products are copyrighted by Rockwell Software Inc. Any reproduction and/or distribution without prior written consent from Rockwell Software Inc. is strictly prohibited. Please refer to the license agreement for details.
Trademark Notices
The Rockwell Software logo, RSLinx, RSLogix 5, RSLogix 500, ControlLogix, RSSql, RSView32, RSView, AdvanceDDE, RSBizWare Production Client including the RSBizWare Historian and RSBizWare PlantMetrics modules, and RSBizWare Enterprise Manager are trademarks of Rockwell Software Inc., a Rockwell Automation company. Microsoft, MS-DOS, Windows, Windows NT, Windows 98, Windows 95, Windows ME, Visual Basic, Visual C++, SQL Server, Microsoft Access, and Visual SourceSafe are registered trademarks of the Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. SAP, SAP Logo, mySAP.com, R/2, R/3, ABAP, and BAPI are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. OLE for Process Control (OPC) is a registered trademark of the OPC Foundation. Ethernet is a registered trademark of Digital Equipment Corporation, Intel, and Xerox Corporation. Pentium is a registered trademark of the Intel Corporation. All other trademarks are the property of their respective holders and are hereby acknowledged.
Warranty
This Rockwell Software product is warranted in accord with the product license. The product's performance will be affected by system configuration, the application being performed, operator control and other related factors. The product's implementation may vary among users. This manual is as up-to-date as possible at the time of printing; however, the accompanying software may have changed since that time. Rockwell Software reserves the right to change any information contained in this manual or the software at anytime without prior notice. The instructions in this manual do not claim to cover all the details or variations in the equipment, procedure, or process described, nor to provide directions for meeting every possible contingency during installation, operation, or maintenance.
ii
Contents
1 Welcome to RSSql
What is RSSql? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What can RSSql do for me? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data logger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Business rules and quality enforcement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Understanding RSSql concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Introducing FactoryTalk. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FactoryTalk Automation Platform components . . . . . . . . . . . . . . . . . . . . . . . . . . . Intended audience. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where can I go for help? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Online help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Product manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Assistance on the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Technical support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . On-site support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Consulting services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Contact us . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1 1 1 1 2 3 4 4 5 5 5 5 6 6 7 7 7
2 Installing RSSql
Before you begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Hardware requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Copy protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 License options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Installing RSSql software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Distributed RSSql installations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
15
15 16 17 18 19 20
iii
Configuration Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 1 - Define configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 2 - Define connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 3 - Define data points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 4 - Define data objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 5 - Define transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other user interface topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Verify transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Starting configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stopping configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration and connector status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Monitoring configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RSSql external files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using the RSBizWare Enterprise Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Security/privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20 22 22 23 23 23 24 24 24 24 25 25 25 26 26 27
4 RSSql Services
Control connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RSLinx OPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RSView32. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Generic OPC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FactoryTalk Live Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enterprise database connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ODBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Oracle OCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Microsoft OLE DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enterprise application connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RSBizWare PlantMetrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Microsoft COM+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Time-series data compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enterprise connector options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Transaction Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Transaction Control Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
29 29 29 30 30 30 31 31 32 32 32 32 32 32 33 33 34 34
iv
CONTENTS
35
35 35 36 36 36 38 39 39 40 41 41 41 42 42 42 43 44
47
47 47 48 48 48 48 49 49 51 51
7 Creating Transactions
Transaction types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Unidirectional transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bidirectional transactions with transaction result bindings . . . . . . . . . . . . . . . . . Bidirectional transactions with input/output bindings . . . . . . . . . . . . . . . . . . . . . Transaction timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Transaction completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cached transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Real-time transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
53
53 53 54 55 56 56 57 57
Transactions with outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Transactions with bound transaction results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Database triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Expression Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Logical and mathematical operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Time functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data point range and advanced functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parse function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
57 57 57 58 58 58 58 59
8 Online Edits
Introducing online edits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Understanding online edit concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Online edits workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edit enabled configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Current and pending edits definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Assembling pending edits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Canceling pending edits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pending edit alerts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating an edit enabled configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Editing data points in a running, edit enabled configuration . . . . . . . . . . . . . . . . Editing transactions in a running, edit enabled configuration . . . . . . . . . . . . . . . New elements on the main RSSql UI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration tree. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . States. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Status bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
61
61 61 62 63 64 64 65 66 67 68 71 74 74 74 75 75
9 Advanced Topics
Remote user interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Distributed configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Licensing required for a distributed configuration . . . . . . . . . . . . . . . . . . . . . . . . Security/privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a distributed configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Browsing for data objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Increasing performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Control system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RSSql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hardware and operating environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
77
77 77 78 78 78 78 81 81 81 82 83
vi
CONTENTS
85
87
87 88 88 89 89 90 90 91 91 92 93
C Glossary Index
95 99
vii
viii
Welcome to RSSql
What is RSSql?
RSSql is a transaction engine that shares data between your shop floor systems and your enterprise applications. RSSql can transfer data to enterprise applications such as corporate databases, SAP, or COM+. Shop floor systems that RSSql can interact with include Human Machine Interfaces (HMI), Programmable Logic Controllers (PLC), and Distributed Control Systems (DCS).
Data logger
RSSql can move large amounts of data in a fast and robust manner. In addition, RSSql has built-in fault tolerance and the ability to optimize reading and writing of both control and enterprise data. You can use RSSql to automate the following types of processes: Monitoring performance of control systems such as machine usage Tracking product information such as Work in Progress status and raw material availability Updating real-time information such as material consumption
The Transaction Manager interfaces with the industrial control system device via a control connector. A control connector is a Microsoft Windows 2000 service that collects data from a data server such as a PLC and sends it to the RSSql Transaction Manager. You can use the following types of control connectors: FactoryTalk Live Data, DDE, RSLinx OPC, RSView32, and Generic OPC. Control connectors can be used to create data points, which are memory locations within your control or shop floor system such as tags from an RSView32 application. In an edit enabled configuration, the Transaction Control Manager performs the duties of the Transaction Manager, inherits the functionality of the FactoryTalk Live Data control connector and communicates exclusively with FactoryTalk data servers. For more information about the role of the Transaction Control Manager, refer to Online Edits.
1 WELCOME TO RSSQL
The Transaction Manager interfaces with enterprise systems such as databases via an enterprise connector. An enterprise connector is a Windows 2000 service that receives data from the RSSql Transaction Manager and logs it to a database. You can use the following types of enterprise connectors: Open Database Connectivity (ODBC), Oracle Call Interface (OCI), Microsoft OLE DB, Microsoft COM+, RSBizWare PlantMetrics, and SAP. Enterprise connectors can be used to create data objects that point to elements in your enterprise system such as a stored procedure in Microsoft SQL Server. The RSSql Configuration Server is a Microsoft Windows NT/2000 service that continuously runs to provide a single interface to the configuration (.dat) files that make up RSSql. This service simplifies access to configuration files by filtering all changes to the files and interfacing with other RSSql services. A collection of all changes that affect a configuration can be recorded in an audit trail. Finally, RSSql creates transactions, or discrete operations that transfer data from your control system to or from the enterprise system. For example, a single transaction can download data from an Oracle stored procedure to tags in a ControlLogix processor. Alternately, a transaction can send multiple data points from a distributed control system to an IBM DB/2 database to be logged for reporting. The transaction model organizes the task of data management. RSSqls flexibility provides many options for customizing all aspects of a transaction. RSSql can manage many transactions at once, allowing for sophisticated manufacturing data collection and control applications. RSSql can also monitor, modify, and enable or disable individual transactions making the development and implementation of an application easier. Transactions are elements in a configuration.
Introducing FactoryTalk
FactoryTalk is a manufacturing information platform that integrates plant-wide control systems and connects the enterprise with the production facility. Integrate. FactoryTalk eliminates both functionality gaps and overlaps by providing common services (such as diagnostics and access to real-time data) and by sharing plant resources (such as tags and graphic displays) throughout a production facility. Communicate. FactoryTalk transforms plant-floor data into useful information and delivers it to the people who need it, from maintenance engineers to enterprise planners. Collaborate. FactoryTalk allows defining plant-floor resources once, and then allows simultaneous access to those resources across system boundaries.
Intended audience
We assume that you are a control engineer or database administrator, and that you are familiar with some of the following: Intel personal computers Microsoft Windows NT/2000 operating systems DDE or OPC servers (for example, RSLinx or RSView32) Configuration of database connection systems such as ODBC, OCI, or Microsoft OLE DB Microsoft COM+
1 WELCOME TO RSSQL
Online help Product manual Assistance on the Web Training Technical support
Online help
The online help provides general overview information, comprehensive step-by-step
procedures, quick start topics, and context-sensitive control definitions (for example, text boxes, drop-down lists, and option buttons) for working with all of the features in RSSql. You can view online help in RSSql by using any of the following methods:
select Help > RSSql Help on the main RSSql user interface click Help on any RSSql dialog click the What's This? icon in the upper-right corner of a RSSql dialog, then click on any control to open a definition of that control
Product manual
You can gain immediate access to product documentation by selecting Help > Product Manuals > RSSql Users Guide from within RSSql. Throughout this document a number of style conventions are used to help identify material. New terms and concepts may be emphasized by use of italics or bold; file menu paths are in bold with a (>) separating the entries (e.g., go to File > New); text you are asked to type is shown in Courier Bold (e.g., in this field, type Work Week), and dialog and button names are shown in bold (e.g., click OK).
Training
One of the best ways to increase your proficiency at using Rockwell Software products is
to attend Rockwell Software training programs. Our training programs can help you master the basics and show you how to unleash the full potential of our software.
We offer a wide range of training programs, from regularly scheduled classes conducted at Rockwell Software facilities, to custom-tailored classes conducted at your enterprise. The size of each class is kept small intentionally to maximize student engagement. If you would like more information about our training programs, visit the Rockwell Software site on the World Wide Web or contact the Rockwell Software training coordinator. Our World Wide Web address and telephone numbers appear on the inside front cover of this guide.
Technical support
Rockwell Softwares support team of outstanding professionals provides top-notch technical support-monitoring and tracking your experience with our products to pave the road to your success in understanding and improving your factory performance. Rockwell Software provides full support for the entire RSBizWare suite of products, which includes Historian, PlantMetrics, RSSql, Scheduler, and Arena Factory Analyzer from the Arena product suite. Questions concerning installation and the use of the software are handled by the Rockwell Automation Customer Support Center, staffed every day - except U.S. holidays - from 8 AM to 5 PM in your time zone for calls originating within the U.S. and Canada. To reach the Customer Support Center, call 440-646-5800 and follow the prompts. For calls originating outside the U.S./Canada, locate the number in your country by visiting http://support.rockwellautomation.com/contactinformation. WHEN YOU CALL When you call you should be at your computer and prepared to give the following information: product serial number and version number, which can be found in the client software by selecting Help > About
type of hardware you are using exact wording of any errors or messages that appeared on your screen
description of what happened and what you were doing when the problem occurred
description of how you attempted to solve the problem
1 WELCOME TO RSSQL
On-site support
Rockwell Automation field support engineers are located around the globe to provide assistance with special projects, unexpected problems, or emergency situations on-site. Field support engineers are available for dispatch 24x7x365 and can arrive at many locations the same day. To learn more about this and other support services, visit the Rockwell Automation web site at http://support.rockwellautomation.com.
Consulting services
Rockwell Automation provides expert consulting and turnkey implementation of the RSBizWare suite of products. Please contact your local representative for more information.
Contact us
We strive to help all of our customers become successful in their manufacturing improvement efforts. Toward this objective, we invite you to contact your local representative or Rockwell Software at any time that we may be of service to you.
Installing RSSql
Before you begin
You should know about the following prerequisites before you install RSSql: hardware requirements software requirements copy protection
Hardware requirements
To use RSSql software effectively, your personal computer must include the following minimum requirements: Intel Pentium II processor (1 GHz or faster recommended) 256 MB of RAM recommended minimum 34 MB of available hard disk space a CD ROM drive a 3.5-inch diskette drive (to install master license disk) Video card and monitor capable of 1074 x 768 resolution
Software requirements
To use RSSql 7.0 effectively, your personal computer must include the following software programs: Microsoft Windows NT 4.0 Server Service Pack 6a, or Windows 2000 Server Service Pack 4. (RSSql does not support earlier versions of Windows NT, Windows 95, Windows 98, Windows 3.x, or Windows Millennium Edition operating systems). DDE server and/or OPC server software. If you are using the RSView32 control connector, you must have RSView32 version 6.10.16 or later. RSView32 version 6.5 is recommended. If you are using the RSLinx OPC connector, you must have RSLinx version 2.10.118 or later. RSLinx version 2.42 is recommended. RSLinx must be configured to start as a Windows service. If you are using ODBC, you must have ODBC Manager and ODBC drivers version 2.x or later. If you are using Oracle OCI, you must have SQL*NET version 2.3.x, Net 8 or 9 to connect to an Oracle database version 7.3, 8 or 9, respectively. If you are using Microsoft OLE DB, you must have Microsoft SQL Server 2000 Service Pack 3.
If you are using Microsoft COM+, your COM+ connector and the RSSql configuration using it must reside on a computer running Windows 2000. Windows NT/2000 simple TCP/IP services must be configured. Microsoft Data Access Components (MDAC) is updated to version 2.7 Service Pack 1 during the RSSql installation. Minimum video resolution of 1024 x 768.
Copy protection
Rockwell Software uses a software key to implement copy protection for Windows-based software products. Every copy-protected software product has a unique key. The key is located in an activation file, which is on a master diskette that was shipped with the software. RSSql software consists of several components. The RSSql Transaction Manager service is copy protected, which means that you can install this service on only one computer, per license, at a time. The Microsoft COM+ and SAP enterprise application connectors are also copy protected. If you have RSSql Professional, you may install copies of any of the other connectors on as many computers as necessary. If you are performing a complete install, the Setup program prompts you to insert the RSSql master diskette after you install the RSSql Transaction Manager. Insert the diskette into your disk drive. The Move Activation utility moves a unique key from the RSSql master diskette to your hard disk. If, at a later date, you want to move the activation to another computer or just remove it altogether, you must move the key back onto the RSSql master diskette.
License options
Licensing RSSql software is determined by two factors: whether the control and enterprise connectors can be distributed among several computers and the maximum number of tags (data points) that the Transaction Manager will support. RSSql previously was sold without a restriction on the number of tags. Although this option can no longer be purchased, customers who own this version can continue without a tag restriction. The RSSql software runs in Demo mode if no license is installed. Demo mode is limited to two hours and ten data points. You can create transactions in RSSql Lite using either RSBizWare PlantMetrics or RSBizWare Historian. The Microsoft COM+ and SAP connectors require separate licenses. The table shows the level of distribution and the maximum number of tags supported for each RSSql license. Yes in the Availability
10
2 INSTALLING RSSQL
column denotes that a product is still available for sale. No designates that a product is no longer available for sale.
Catalog Number 9356-PRO2400 9356-PRO2500 9356-PRO2450 9356-PRO2350 9356-PRO2300 9356-PRO2200 9356-PRO2100 9356-STD2400 9356-STD2350 9356-STD2300 9356-STD2200 9356-STD2100 9356-SQLSAP200 9356-SQLSAP225 9356-SQLSAP250 License Class Unlimited Professional Large Professional Large Professional Medium Professional Medium Professional Small Professional Small Professional Unlimited Standard RSSql Standard Large Standard Medium Standard Small Standard RSSql Gateway for SAP RSSql Gateway for SAP Plus Availability No Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Tag Limit Unlimited 70000 32000 5000 1500 300 150 Unlimited 5000 1500 300 150 N/A N/A N/A N/A 10 N/A
11
RSSQL LITE RSSql Lite cannot be purchased. This version of RSSql, which is embedded, supports data collection for other RSBizWare modules and does not require a separate license. RSSql Lite allows you to create transactions in Historian and PlantMetrics, which can then be executed by the RSSql services. While RSSql Lite is similar to RSSql Professional and RSSql Standard, it only supports creating and modifying data points, data objects, and transactions that are defined by other RSBizWare modules. RSSql Lite does not support custom transactions that are created outside of the RSBizWare suite. If you want to use custom transactions in addition to RSBizWare transactions, you need a RSSql license.
Notes: RSSql Lite users cannot use Demo mode. A RSSql Professional license is required to distribute control and enterprise connectors among several computers. The Transaction Manager is installed on only one computer with its licenses. The licenses should not be installed on a mapped network drive.
12
2 INSTALLING RSSQL
e. On the License Agreement dialog, select the option that indicates that you have read and accepted the software license agreement, and then click Next. You will not be permitted to proceed with the installation if you do not accept the license agreement. f. On the Customer Information dialog, type your name, the name of your company, and the serial number of your RSSql software. The serial number is printed on the label of your RSSql master diskette. Click Next. g. On the Setup Type dialog, select Complete or Custom. Select Custom only if you wish to change the directory in which RSSql is installed. Click Next. h. On the Ready to Install the Program dialog, click the Install. i. On the Installing RSSql dialog, various messages and progress bars display to inform you of the status and progress of the installation process. j. On the InstallShield Wizard Completed dialog, leave the Yes, Install Activation now check box selected to run activations now. Click Finish to end the installation process.
13
14
To view the procedure for configuring and using RSSql, click Quick Start on the RSSql system graphic.
15
The design elements on the main RSSql UI include: Title bar Menu bar Toolbar Configuration tree Workspace Status bar These elements are described in detail in this chapter.
16
Menu bar
You can access many features from the RSSql menu bar. For a description of the available shortcuts, refer to the Toolbar section in this chapter.
The Configuration option allows you to create a new RSSql configuration, set privileges or change properties in a RSSql configuration, access the Configuration Checklist, delete, backup, or restore a RSSql configuration, or stop or start a RSSql configuration. The Define option allows you to define a connector, data object, data points, or a RSSql transaction. In addition, you can define options for error logging and scheduled events. The View option allows you to view information about the currently defined transaction. You can view diagnostic information about the configuration that is currently running. You can also view error log files or the system graphic. This option allows you to switch between large and small icons, obtain a status update, or enable or disable the toolbar or status bar. The Tools option allows you to create a configuration report, verify the selected configuration, or use wizards to create data logging, duplicate data points, or duplicate transactions. You can also use this option to set message and log viewer options. The Help option provides assistance with using RSSql. From the Index of the online help system simply enter the name of the topic for which you want to search for information. Click Help on the toolbar and place the cursor on any design element on the system graphic that you want help with. The Help option also provides specific links for the quick start, release notes, support and training, online books, and the RSI Web site. In addition, you can use this option to obtain RSSql license and version information.
17
Toolbar
Each button on the toolbar is a shortcut to a RSSql feature. All features are also available from the menu bar.
Icon Description Creates a new RSSql configuration.
Click this button and place the cursor on any design element for which you want to display help. Starts the RSSql configuration or connector currently selected in the Configuration tree. Stops the RSSql configuration or connector currently selected in the Configuration tree. Verifies the selected RSSql configuration.
Displays information for the transactions currently defined in the right pane. Displays diagnostic information for the configuration that is currently running in the right pane. Displays error log information in the right pane.
18
Configuration tree
The workspace portion of the window is divided into two panes. The left pane is known as the Configuration tree and is a tree view of the current RSSql configurations. The top level is the Configuration Server, named for the computer on which it is running. The second level is the configuration name. The third level displays the Transaction Manager or the Transaction Control Manager, if the configuration is edit enabled. The Transaction Manager and the Transaction Control Manager are followed by the control connectors and enterprise connectors defined for the configuration. For a detailed description of the Transaction Control Manager s role in an edit enabled configuration, refer to Online Edits.
19
The traffic lights represent the status of the RSSql configurations and connectors and turn from red to green as RSSql services are started. A yellow light at the connector level indicates that at least one of the control or enterprise connectors is not running. A red light indicates that all of the connectors are not running.
Icon Description All connectors in the configuration are functioning properly. Some connectors in the configuration are functioning, but one or more is not. The configuration is stopped.
Workspace
The workspace displays the Transaction Definition view, the Transaction Monitor view, the Error Log Files view, or the RSSql system graphic, depending on the view option you have selected. The Error Log File view is displayed below.
For a detailed description of the new states that display in the Transaction Definition view, refer to Online Edits.
Configuration Checklist
A RSSql configuration consists of a set of RSSql transactions that use control and enterprise connector elements required to perform the transactions. You may create many configurations, but the Transaction Manager can run only one configuration at a time. Therefore, all the transactions required to implement an application must be contained in a single configuration. Create a configuration using the Configuration Checklist, which lists the required steps and displays the progress. A green check mark indicates a completed step, while a yellow check mark indicates a partially completed step.
20
This chapter is not intended to provide step-by-step directions for creating a configuration, but to provide an overview to help you understand configurations. The following sequence of steps mimics the Configuration Checklist. It is recommended, at least initially, that you follow this sequence when creating configurations: Create a new configuration Define connectors Define the data points that will be used in RSSql transactions. Create control connectors before defining data points. Define data objects that will be used in RSSql transactions. Create enterprise connectors before defining data objects. Define transactions, which transfer data between data points, in the control system and data objects. Select Configuration > Checklist or Configuration > New to begin using the Configuration Checklist.
21
22
23
In an edit enabled configuration you can edit existing or create new transactions while the configuration is running. When you have pending edits, you can view the differences between the current and pending definitions on the new Transaction Differences dialog. If the pending edits you created caused pending edit alerts, you can view them on the new Pending Edit Alerts dialog. For a detailed description of the information displayed on these dialogs, refer to Online Edits.
Configuration properties
To open the Configuration Properties dialog, select Configuration > Properties or right-click on a configuration name in the Configuration tree and select Configuration Properties from the menu. You can access all configuration level settings such as security settings, enterprise connector options, and error logging levels from individual tabs on this dialog.
Starting configurations
You can start a RSSql configuration by using one of the following methods: Select the configuration name in the Configuration tree, right-click and select Start Configuration from the menu. Select the configuration name in the Configuration tree, then click Start on the toolbar. If you are using a distributed configuration or your configuration includes RSView32, you must do the following before you can start the configuration: Make sure all remote computers that are used in the configuration are running and available. RSView32 must be running on the appropriate host computer, and the project that the configuration uses must be loaded and running.
24
Stopping configurations
You can stop a RSSql configuration by using one of the following methods: Select the configuration name in the Configuration tree, right-click and select Stop Configuration from the menu. Select the configuration name in the Configuration tree, then click Stop on the toolbar. For more information, refer to Advanced Topics.
Monitoring configurations
You can monitor transactions as they are executed while a configuration runs. Click Transaction Monitor on the toolbar to view a summary of cumulative activity organized by transaction.
Note: Click on any column header, except Total, to resort the list. The list refreshes every 30 seconds or when you click on the headers.
The columns in the Transaction Monitor have the following meaning: Total: the total number of transactions that have been triggered. Passed: the number of transactions that have completed without errors. Failed: the number of transactions that have failed. % Passed: Passed/Total * 100. Cached: the number of transactions currently in Transaction Cache files. Database Passed: the number of transactions that have been successfully applied to the database. Database Failed: the number of transactions that have experienced a database error. Pending: the number of transactions that have been started but not completed.
25
26
Security/privileges
To set privileges in RSSql, you must have established users/groups in Windows. Security is set per configuration, which allows the user who creates the configuration to control who is granted privileges for accessing and changing configurations. The Configuration Privileges dialog provides several options for setting privileges. Select Disable Security (default) if you do not want to set privileges. Otherwise, select Enable RSSql Security, which uses Windows NT/2000 users/groups to control Admin, Modify, and View privileges for configurations.
27
28
RSSql Services
RSSql is designed to run as several services. During design time, the RSSql User Interface (UI) sends information to the Configuration Server which writes to the configuration files. At run time, the other RSSql services run in the background of the computer(s) involved in the configuration, similar to other Microsoft Windows NT/2000 services. For more information about configuring RSSql services, refer to RSSql User Interface. This chapter describes the types of control and enterprise connectors you need to define during design time.
Control connectors
The control connector services manage the interaction between the industrial control system and the RSSql Transaction Manager. The services communicate with the data server using the appropriate protocol (Generic OPC, DDE, RSLinx, OPC, or RSView32). We recommend using the Generic OPC control connector for ControlLogix devices because the Generic OPC memory tag browser navigates the ControlLogix processor so easily.
RSLinx OPC
The RSLinx control connector service is the preferred method to use for data items that reside in Allen-Bradley Programmable Logic Controllers (PLC) with the exception of ControlLogix 555x processor items.
Note: OPC cannot handle a case where a controller sends a message to a client with the same value that was used in the previous message. In this case, the client will not receive the unsolicited message. To resolve this, use the DDE control connector and unsolicited DDE data points.
RSView32
The RSView32 control connector service is used to interface with tags provided by RSView32 applications. The RSSql RSView32 control connector must be on the same computer on which the RSView32 project is running. The RSSql UI can browse for RSView32 project tags on remote computers, but when the RSSql transactions are running the RSView32 control connector should be on the same computer as the RSView project.
29
The RSView32 control connector can be used to collect data from either memory tags or device tags. Device tags are updated every 300 milliseconds. If you need updated tags faster than that, use either the RSLinx OPC or Generic OPC control connectors to retrieve data from the devices directly.
Generic OPC
The Generic OPC control connector service is used to interface with items provided by any OPC server that conforms to the OPC custom interface specifications. The Generic OPC connector is an OPC client that supports OnDataChange subscription callback using either: IAdviseSink for OPC 1.0A-compliant servers or IConnectionPoints for OPC 2.0-compliant servers. The RSSql Generic OPC connector service tries to establish the IAdviseSink method and then tries the IConnectionPoints method. Data writes to OPC items are performed using Asynchronous Writes. RSSql also supports Asynchronous Reads from Device as an option for OPC servers that support this method.
DDE
The DDE control connector service is provided for legacy connections to DDE servers or to provide functionality that is not supported by the OPC specification. OPC is the preferred method for interfacing to control data items.
Note: The DDE server must be running on the same computer as the associated RSSql control connector. RSSql does not support NetDDE.
30
4 RSSQL SERVICES
The RSSql UI cannot query remote DDE servers to retrieve configured DDE topic information. (This is not the case for the RSLinx OPC or RSView32 control connectors). When the DDE control connector is located on a remote computer, manually enter DDE topic names on the RSSql DDE Data Point Configuration dialog. a. Define a configuration on the local computer which contains the Transaction Manager. b. Run the RSSql UI on the remote computer and create a new configuration using the existing configuration files on the local computer. c. Then use the RSSql UI on the remote computer to configure the DDE topics and items. d. When you have finished, exit the RSSql UI on the remote computer and continue creating configurations on the local computer.
ODBC
The ODBC enterprise database connector allows you to interface with virtually any ODBC-compliant database including Microsoft Access, Microsoft SQL Server 6.5 or later, IBM DB2, and Sybase. When you create an ODBC database connection, you must enter a valid system data source name (DSN) for the ODBC server. A system DSN is available to all users and Windows NT/2000 services while a user DSN is available only to the user who configured it. The ODBC enterprise connector requires a system DSN to connect to an ODBC data source. If the RSSql user interface resides on a computer that is remote from the computer(s) containing the enterprise connector(s), you must provide a connection for the target database on both computers and they must have the same name. This connectivity is necessary so the enterprise connector can send data to the database.
31
Oracle OCI
The Oracle Call Interface (OCI) enterprise database connector allows you to connect to database objects from an Oracle server. If you are using Oracle OCI in RSSql, you need to install SQL*NET 2.3x or later, Net8, or Oracle Net services (all from Oracle) locally. You can then connect to an Oracle database versions 7.3 through 9i.
Microsoft OLE DB
The Microsoft OLE DB enterprise database connector should only be used for interfacing with Microsoft SQL Server 2000. Microsoft OLE DB allows you to browse a SQL Server 2000 database without a DSN and is the preferred method of connection.
RSBizWare PlantMetrics
The RSBizWare PlantMetrics enterprise application connector is only used with RSBizWare PlantMetrics and stores data into the RSBizWare Production Server. The PlantMetrics enterprise application connector can only be configured through the RSBizWare Enterprise Manager. Refer to the RSBizWare PlantMetrics User s Guide for more information.
Microsoft COM+
The Microsoft COM+ enterprise application connector allows you to interface with Microsoft COM+ application components. These components must be integrated into a Windows 2000 COM+ environment.
32
4 RSSQL SERVICES
Transaction Manager
The Transaction Manager performs the following tasks: Controls the execution of all RSSql transactions Collects and sends data to and from all the connector services Controls the scheduling and execution of transactions Controls data manipulation, if required
33
Configuration Server
The Configuration Server is a Windows NT/2000 service that runs continuously to provide a single interface to the configuration (.dat) files that make up RSSql. The Configuration Server simplifies access to configuration files by filtering all changes to the files and interfacing with other RSSql services. A collection of all changes that affect a configuration can be recorded in an audit trail. Since the service is always running, functions such as configuration diagnostics and remote file browsing is easier. One benefit of the Configuration Server is consolidated file access. The Configuration Server is the focal point for all interaction with and manipulation of configuration files. Before the addition of the Configuration Server, the left side of the figure below, each RSSql service had to interface individually with the configuration files when trying to establish remote access.
Now other RSSql services funnel through the Configuration Server, which provides consolidated file access to the configuration files. See the right side of the figure.
34
35
36
SCHEDULED: MAINTAIN THE CURRENT SUBSCRIBED VALUE The OPC server sends any change in value or quality to the control connector on a regular-time interval based on the Subscription Scan Rate which is set on the Collection Parameters dialog. The control connector retains the current value in a buffer until the Transaction Manager requests it. The OPC server reads the value of the data point at the Subscription Scan Rate and if a new value is found, it is sent to the OPC client. If the value has not changed in the OPC server, no data is transferred. Thus network bandwidth is not used to transmit the same value between the OPC server and the control connector. Typically, this type of collection is used to support a transaction that logs data constantly, for example, logging a data point every second while an assembly line is running. The On Scheduled Event transaction trigger has a Scan Rate that requests data from the control connector. In DDE terminology, this type of connection is similar to a Hot Link, except that the control connector does not see values that change faster than the Subscription Rate. DEVICE SCHEDULED: REQUEST THE CURRENT VALUE FROM THE DEVICE No data is buffered in the control connector or OPC server. The Transaction Manager requests the value from the control connector. The value is retrieved from the PLC and passed to the control connector. The DDE or OPC server does not use its internal cache but reads directly from the device. This is the most time-consuming method to obtain data. Typically, this type of connection is used to support a transaction that logs data infrequently. Since the connection is established each time a request for data is made, this type of connection is well suited for a modem connection to a remote site. In DDE terminology, this type of connection acts in the same manner as a Cold Link. In the first type of data collection (scheduled), the value sent to the Transaction Manager is the value that is currently cached in the control connector, so the turnaround is quick. In the second type of data collection (device scheduled), the Transaction Manager must wait for the value to be retrieved from the device, subject to the length of time specified in the Data Retrieval field on the RSSql Data Points dialog. This may cause the transaction to time out. UNSCHEDULED: SEND SUBSCRIBED VALUE WHENEVER IT CHANGES This collection type is driven by the control server (OPC/DDE). When the server detects a change to a data point value or quality, it sends the value to the control connector, which passes it to the Transaction Manager.
37
The Subscription Scan Rate sets the limit on how fast new data can arrive. For example, if the Subscription Scan Rate is 150 milliseconds, the OPC server cannot send changes faster. If the underlying data value is changing faster, the control connector only sees the current value every 150 milliseconds. Typically, this type of connection is used for a transaction trigger that fires on a high or low transition, or exceeds a range. In DDE terminology, this type of connection acts in the same manner as a Hot Link.
SCENARIO A - SOLICITED/DEVICE SCHEDULED The Transaction Manager requests a data point from the control connector on a scheduled basis. The control connector sends a Read From Device request to RSLinx. RSLinx requests the value from the PLC. (Note that the OPC term for DDE Cold Scheduled is Read from Device.) SCENARIO B - UNSOLICITED/HOT UNSCHEDULED The PLC issues a MSG instruction to RSLinx. RSLinx immediately passes data to the control connector. The control connector immediately passes data to the Transaction Manager. This is the preferred scenario for unsolicited items. (Note that the OPC term for DDE Hot Unscheduled is Unscheduled Subscription.) SCENARIO C - SOLICITED/UNSCHEDULED RSLinx polls the PLC at the RSSql scan rate. RSLinx immediately passes data to the control connector. The control connector immediately passes data to the Transaction Manager. (Note that the OPC term for DDE Hot Unscheduled is Unscheduled Subscription.)
38
SCENARIO D - SOLICITED/SCHEDULED RSLinx polls the PLC at the RSSql scan rate. RSLinx immediately passes the data to the control connector. The Transaction Manager requests data from the control connector upon triggering. (Note that the OPC term for DDE Hot Scheduled is Subscription.) SCENARIO E - UNSOLICITED/SCHEDULED The PLC issues a MSG instruction to RSSql. RSLinx immediately passes data to the control connector. You can manually enter a subscription scan rate. The Transaction Manager requests data from the control connector upon triggering. (Note that the OPC term for DDE Hot Scheduled is Subscription.)
39
SCENARIO A - SOLICITED/COLD SCHEDULED The Transaction Manager requests a data point from the control connector on a scheduled basis. The control connector establishes a DDE link with RSLinx. RSLinx requests the value from the PLC. (Note that the OPC specification term for Cold Scheduled is Read from Device.) SCENARIO B - UNSOLICITED/HOT UNSCHEDULED The PLC issues a MSG instruction to RSLinx. RSLinx immediately passes data to the control connector. The control connector immediately passes data to the Transaction Manager. This is the preferred scenario for unsolicited items. (Note that the OPC specification term for Hot Unscheduled is Unscheduled Subscription.) SCENARIO C - SOLICITED/HOT UNSCHEDULED RSLinx polls the PLC at the RSLinx topic scan rate. RSLinx immediately passes data to the control connector. The control connector immediately passes data to the Transaction Manager. (Note that the OPC term for Hot Unscheduled is Unscheduled Subscription.) SCENARIO D - SOLICITED/HOT SCHEDULED RSLinx polls the PLC at the RSLinx topic scan rate. RSLinx immediately passes the data to the control connector. The Transaction Manager requests data from the control connector upon triggering. (Note that the OPC specification term for Hot Scheduled is Subscription.) SCENARIO E - UNSOLICITED/HOT SCHEDULED The PLC issues a MSG instruction to RSLinx. RSLinx immediately passes data to the control connector. The Transaction Manager requests data from the control connector upon triggering. (Note that the OPC specification term for Hot Scheduled is Subscription.)
40
41
If the Transaction Manager starts a transaction and determines it has already requested a data point but not yet received a reply, it will not request the data point again. Rather it uses the same value for both transactions when they are received. This prevents the control connector from receiving data point requests faster than it can process them.
OPC quality
For the OPC connectors, choose one of the bad quality options if you want the Transaction Manager to use bad quality values. Otherwise, select Use Substitution Option for Bad Quality. If you do not select a bad quality value, the Transaction Manager uses one of the substitution policies listed above when it receives a bad quality value for this data point. For more information about quality, visit the OPC Foundations web site at www.opcfoundation.org.
42
If you choose to allow bad quality values, then use the QualityOf() expression string from the Expression Editor dialog, so you will be able to bind the quality value to a column in your database. In addition, the bad quality status is saved to the control connector s log file at an error level. QualityOf() provides the following quality values:
OPC Server Returns QualityOf() Returns Bad (0) Uncertain (1) N/A (2) Good (3) 1 2 3 0
Note: This function only applies to OPC servers. If you are using a DDE server, a Good value is always returned.
A substitution value of Null, which is the default, causes the enterprise database connector to leave the binding for that column blank. A data point that has a Null substitution policy causes a transaction to fail if the data point is used in an expression. A Null value is not a null string nor is it zero, it is a value that does not exist and therefore the expression editor cannot use it to calculate the result.
43
44
are read from the PLC by the data server once it receives the read request from the control connector. The other exception is that the Transaction Manager never requests the current value of an unscheduled data point from the control connector. Individual transaction buffers are maintained for each transaction that is running, which means that if two copies of the same transaction are running at the same time, the data values from the second transaction do not overwrite the data values from the first. Only unscheduled transactions can execute more than one copy of the same transaction at the same time. BUFFERING IN CACHED TRANSACTION FILES Completed transactions that are not configured for real-time storage are buffered in cached transaction (*.rsl) files prior to storage in the database. Therefore, data will not display until it has been removed from the cache file and written to the database. Database freshness can be forced using the Real Time Storage option. However, this adds overhead to the data storage operations. The best solution is to use combinations of realtime and non-real-time storage to balance database performance and data storage overhead. The rate that the cache transaction files are applied is also controllable. In the Transaction Definition dialog, set the number of completed transactions to a smaller value or decrease the time between cache transaction files. This will improve the timeliness of the data in your database, but increase the load on your database.
45
46
47
RSSql can communicate with a remote Oracle database via the Oracle network of client tools such as SQL*NET, Net8, or Oracle Net Services.
Note: You can install SQL*NET/Net8 on the same computer that contains the enterprise connector and communicate with remote Oracle databases running on any operating system supported by Oracle.
48
You can create a RSSql data object by selecting a COM+ method from the COM+ Connection Definition dialog.
Note: COM+ data objects are only available on Windows 2000 installations.
49
The table below shows how RSSql handles each transaction type and storage method.
Transaction Lost Connection with Transaction Type Storage Method Enterprise Connector Unidirectional Cached transaction files Cache files are applied when connection is restored. Lost Connection with Enterprise System One cache file can be converted to an SQL file and returns Database Failed. Remaining cache files are processed when connection is restored.1 Transaction returns Database Failed, transaction data is written to a file.2 Transaction returns a successful result. One cache file can be converted to an SQL file and returns Database Failed. Remaining cache files are processed when connection is restored.1 Transaction returns Database Failed. Transaction data is written to a file.2 Transaction returns Database Failed. Transaction data is written to a file.2
Unidirectional
Real time thread Transaction fails and transaction data is lost. Transaction data is written to a cache file. The transaction returns a successful result. The cache files are processed when connection is restored.
Transaction Result Real time thread Transaction fails and Binding transaction data is lost. Input/Output Binding Real time thread Transaction fails and transaction data is lost.
1If multiple connections are defined in the configuration, then the cache files continue processing. All data for the failed connection is written to a file. 2Data is stored in separate files depending on whether the Real Time option or the Transaction Cache Files option was used. This allows applications to recover this data.
50
Stored procedures
A stored procedure is a user-defined function or program that is executed inside of the database. A stored procedure can consist of any of the components of a structured language that enable you to define data behavior. A procedure can be simple like a single select command or complicated like validating all data before it is sent to the database. A stored procedure is a powerful extension to a database. A stored procedure works like a function that is stored in a database. Most databases provide a comprehensive stored procedure language that combines the data query capabilities of SQL and some kind of procedural control, for example, an IfThen statement. As with most kinds of function calls, a stored procedure can have both inputs and outputs. In a transaction that is connected to a stored procedure, the values bound to inputs are passed in and the outputs are returned to the control system. When you create a data object and select the Stored Procedure option, RSSql queries the database for all stored procedures accessible by the chosen user account and lists them in the stored procedure list box. When you select a stored procedure, the input and output parameters display in the lower pane. Since all parameters for a stored procedure are required, RSSql automatically adds them to the data object pane on the right when they are selected. To simplify the creation of simple stored procedures, RSSql provides a stored procedure wizard for SQL Server and Oracle databases. For complicated stored procedures and/or debugging of stored procedures, use database-specific tools.
51
52
Creating Transactions
RSSql transactions move data between the control system and the enterprise system. Bindings relate columns or parameters in a data object to data points and enable a fieldlevel exchange of data. A configuration can contain any number of transactions, each running independently based on the trigger event. Although the number of transactions in a configuration is unlimited, you cannot exceed the tag count for which you are licensed. In an edit enabled configuration you can edit existing or create new transactions while the configuration is running. For more information refer to Online Edits. RSSql assigns the following transaction attributes: Transaction name Data object Bindings of data object elements to data points/expressions Trigger event Storage options
Transaction types
RSSql includes the following types of transactions regardless of the trigger mechanism: Unidirectional transactions Bidirectional transactions with Transaction Result Binding Bidirectional transactions with Input/Output Bindings Bidirectional transaction types are not mutually exclusive. A bidirectional transaction may have both a Transaction Result Binding and Input/Output Bindings.
Unidirectional transactions
Unidirectional transactions in RSSql use information from the control system to add records to a database table or update the contents of existing records. They are named appropriately, since they send data only in one direction - to the database. Unlike bidirectional transactions, unidirectional transactions do not return data to the control system. Unidirectional transactions are commonly used to log production data to a database. This may take many forms depending upon the application's objective. Some common examples include: Data logging Performance monitoring Sampling for quality analysis Collection of real time production information Tracking material consumption Product tracking
53
Unidirectional transactions are the simplest transaction type. They may perform database Insert or Update commands. They may also perform simple stored procedures or execute IDocs/methods provided no output parameters or return codes exist. In most applications, unidirectional transactions account for the majority of transaction volume. Data may be collected frequently from a large number of data points. RSSql has many features that can be used to control these transactions and make processing as efficient as possible.
54
7 CREATING TRANSACTIONS
Bit 0: 1 - Transaction is complete Bit 1: 1 - Transaction has an error Bits 2-15 in binary: 00000101111011 Bits 2-15 converted to decimal: 379 Add 32,768 to get the RSSql error code: 33147 The Transaction Result indicates whether RSSql processed the transaction successfully. An example of a situation in which this capability would be useful is in a high liability manufacturing environment where a verifiable quality record is a requirement for each product produced. At various steps in the manufacturing process, a RSSql transaction may send a test result to be stored in a central database. If that test result is not recorded successfully, the part on the production line may become worthless. The Transaction Result is used to confirm that the test result was recorded. If the Transaction Result indicates the test result was not recorded, the control system can respond appropriately by alerting an operator, changing the part's routing, or retrying the transaction. Some examples may include: Validated data logging Closed-loop quality tracking
55
Input parameters to a stored procedure must have a binding (a data point or a Null). Select data object parameter, right-click and select either Bind Data Point or Bind Null Value from the menu. A transaction must have all input parameters bound to it before it can be enabled. Output parameters do not require a binding. The results of the bound value display under the Bound Value column. If an output parameter is not bound or is bound to a null, no value displays in this column. A procedure must succeed before output parameters can be returned to the PLC. Input/output parameters are handled as a single binding unless they are separated using the Separate Input/output option. This option permits separate data points to be bound to the same procedure parameter. This implies that the address from which the input parameter is derived is different from the address to which the output parameter is written. This also implies that if an input/output parameter is used only for output, then the input portion can be bound to a null value. Leaving an input/output parameter bound to a single data point causes the value to be read prior to executing the procedure and the output value to be written upon completion of the transaction. The Microsoft SQL Server RETURN_CODE contains data that can be bound as an output to a stored procedure. This value is only available if the procedure executes successfully. A successful return code does not guarantee a successful RSSql transaction as the transaction is not yet complete.
Transaction timeout
The transaction timeout parameter specifies how long the Transaction Manager should wait for a transaction to complete. Setting the transaction scan rate for a scheduled transaction lower than the transaction timeout may cause the second transaction to fail because only one scheduled transaction can run at a time. The transaction timeout for an unscheduled transaction does not affect other unscheduled transactions as multiple copies of the unscheduled transaction can execute at the same time.
Transaction completion
It is important to determine when the Transaction Manager considers a transaction to be complete because the Transaction Result only runs one occurrence of a scheduled transaction at a time. The next occurrence cannot start until the current transaction is complete. Also, if a transaction has a Transaction Result Binding, the Transaction Result is written when the transaction completes.
56
7 CREATING TRANSACTIONS
Cached transactions
If you select Use Cache Transaction Files from the Transaction Definition dialog, unidirectional transactions complete as soon as the data is written to the cache file. The data is not yet stored to the database but is on disk.
Real-time transactions
If you select Real Time Storage from the Transaction Definition dialog, unidirectional transactions complete when the Transaction Manager receives a reply from the enterprise connector that the data has been stored. This means that the time necessary for the enterprise system to store the values is included in the transaction completion time. This may cause the transaction to timeout if the Transaction Manager has not received the reply from the enterprise connector in the allotted time. The transaction timeout does not determine if the data was logged to the database, the transaction can time out prior to sending the data to the database or after the data was successfully stored.
Database triggers
Many databases support triggers. Database triggers are functions that are executed by the database whenever the triggering operation occurs. For example, a trigger can be set so that whenever a value is inserted into a table, the data is verified and then another value is updated with the verified data. The amount of time necessary to process the trigger and the associated function is charged against the transaction timeout. In this case, the database insert does not return control to the enterprise connector until the insert and its triggered function is complete.
57
For cached transactions, the transaction is considered to be complete when data is written to the cache file (the time to process the triggered database function is not included in the transaction completion time).
Time functions
The expression editor provides several functions for processing time. The Timestampof function logs the time a data point is read. This may differ from the time the transaction executed because the data point may have a data valid time of greater than zero. The Transtimestamp function returns the transaction time. This may differ from the time the data was inserted into the database because completed transactions may be buffered in cached transaction (*.rsl) files. The Mtimestampof and MTranstimestamp functions log the millisecond portions of the two previous times. These can be stored in separate columns, which permits accurate trend analysis for databases that do not store time values to the millisecond.
58
7 CREATING TRANSACTIONS
If you make changes to transactions or their bound data points in a running configuration using the Data Point Range function in conjunction with the Avg function in an expression, the transaction resets or behaves as though it is starting for the first time when you assemble the pending edits. For more information about this behavior in a transaction, refer to Online Edits.
Parse function
The expression editor provides a powerful feature to guarantee that all data for a transaction is synchronized. The input for the parse function is a block of data and the output is a parsed subset. This permits the PLC to manage all data into a single data point, which can then be sent using an unsolicited message to the control connector. The control connector then sends the data as a single unit to the Transaction Manager. The Transaction Manager uses the arrival of the data point as a trigger and then parses out the individual values as needed. Since the PLC gathered all of the data into a single block and the block was sent to the Transaction Manager as a single unit, it is synchronized. The Parse function can also be used on scheduled data points and in scheduled transactions to separate data values from a single data point.
59
60
Online Edits
Introducing online edits
The ability to change data points and transactions in a RSSql configuration while it is running is known as online edits. The use of online edits allows data collection to continue in your automation system while you add new or modify existing data points and transactions. The following terms and concepts are fundamental to understanding how to perform online edits.
61
The running configuration is not affected until the end of the process when the pending edits are assembled. Saving, reviewing or canceling pending edits prior to assembling only affects the configuration files, not the running configuration itself.
62
8 ONLINE EDITS
63
You can assemble pending edits from the following dialogs: main RSSql UI FactoryTalk Data Point Pending Transaction Definition Pending Edit Alerts This process may affect different types of pending edits based on the dialog from which you assemble. If you have questions about what will or will not be assembled, refer to the online help. FROM THE MAIN RSSQL UI When you assemble pending edits from the toolbar on the main RSSql UI, ALL pending edits for transactions and data points are assembled. Data point pending edits are assembled first and then transaction pending edits are assembled.
64
8 ONLINE EDITS
FROM THE FACTORYTALK DATA POINT DIALOG Assembling from this dialog affects ONLY the selected data point rows and ONLY data point pending definitions. Transaction pending definitions are not assembled from this dialog. FROM THE PENDING TRANSACTION DEFINITION DIALOG The pending definitions for the transaction you are currently viewing are assembled. Data point pending definitions are not assembled from this dialog. FROM THE PENDING EDIT ALERTS DIALOG When you assemble transaction or data point pending edits that have caused side effects that you may not be aware of, RSSql prompts you to review the pending edits on the Pending Edit Alerts dialog. If you select Assemble All from the Pending Edit Alerts dialog, all of the data point and transaction pending edits are assembled, including the pending edits that did not cause alerts, and therefore do not display on the dialog.
65
66
8 ONLINE EDITS
You can review transactions that have pending edit alerts on the Pending Edit Alerts dialog. Only the transactions and data points with pending edit alerts display on this dialog; not all the pending edits in the configuration. You can assemble or cancel only the selected transactions or assemble or cancel all the transactions in the configuration (even the ones not displayed on this dialog).
If your existing RSSql configurations use RSLinx, RSView32 or OPC control connectors, a migration tool is available to migrate those configurations to configurations that use only the FactoryTalk Live Data control connector. Refer to the Rockwell Knowledgebase Web site for more information. Go to http://support.rockwellautomation.com, click the Knowledgebase link and search by entering keywords such as RSSql or migration.
67
SAVING DATA POINT PENDING EDITS When you are finished adding new data points or changing existing data points, you must save the pending edits. Select the data point rows in the data point grid and click Save Edits or select the data point rows in the grid, right-click and select Save Selected Edit(s) from the menu. You must always save pending edits before you assemble.
68
8 ONLINE EDITS
ASSEMBLING DATA POINT PENDING EDITS To make the pending edits effective in the running configuration, you must assemble them. On the FactoryTalk Data Point dialog, select the data point rows in the grid and click Assemble Edits or select the data point rows in the grid, right-click and select Assemble Edits from the menu. It is not critical to assemble pending edits at a specific time in the online edits process. If you have already created data point pending edits, you can close the FactoryTalk Data Point dialog without assembling and proceed to make changes to transactions on the Pending Transaction Definition dialog. However, data point pending edits do not display on the Pending Transaction Definition dialog until they have been assembled. It is a good idea to save and assemble data point pending edits before creating transaction pending edits. Assembling new data points does not affect a running configuration because the new data points are not used in a running transaction yet. You can also click Assemble Edits on the main RSSql UI to assemble data point pending edits.
To see new data points or data point changes on the Pending Transaction Definition dialog, you must first assemble the data point pending edits.
CANCELING DATA POINT PENDING EDITS To cancel pending edits, select the data point rows in the grid and click Cancel Edits or select the data point rows in the grid, right-click and select Cancel Edits from the menu. You can cancel pending edits after you have saved. You CANNOT cancel pending edits after you have assembled. Canceling a pending edit does not affect the current definition; it only removes the pending definition. If you have a running configuration with pending edits and then stop it, you cannot make any further changes to the configuration until you cancel or assemble the pending edits. After you save, assemble or cancel, notice the status of the operations that were performed in the status bar at the bottom of the dialog.
69
DATA POINT STATUS Notice the following fields on the status bar at the bottom of the FactoryTalk Data Point dialog: Configuration status Rows The number of rows selected before you saved, assembled or canceled pending edits. Points The number of data points that specific row represents. For example, two rows may be two different data points or they may be the current definition and the pending definition of the same data point. Passed The number of successful operations. Disregarded RSSql does not allow the action to be performed. For example, selecting a row that does not have a pending edit and clicking Cancel Edits. Failed Operations that did not take place because of an internal error.
70
8 ONLINE EDITS
You can edit multiple transactions in a running, edit enabled configuration from the main RSSql UI. Select one or more transactions in the Transaction Definition View in the right pane, right-click and select one of the following menu options: Enable Transaction or Disable Transaction. A new pending edit row displays with the new status. The pending edit is automatically saved, but must be assembled manually. Edit Transaction Parameters. The parameters that display on the Trigger and Storage Parameters dialog are RSSql default values, not the values of the selected transactions. Once again, the pending edit is automatically saved, but must be assembled manually.
71
SAVING TRANSACTION PENDING EDITS When you are finished changing the transaction, save the pending edits. You must save pending edits before you assemble. Saving pending edits does not affect the running configuration, it only saves the pending definition. ASSEMBLING TRANSACTION PENDING EDITS To make the pending edits effective in the configuration, you must assemble them. On the Pending Transaction Definition dialog, click Assemble Edits. There may be a delay between the time you assemble the pending definition and the time the pending definition actually becomes effective, regardless of when the RSSql UI indicates the changes have been made. You can also click Assemble Edits on the main RSSql UI to assemble transaction pending edits. The rules governing when the actual transaction is changed are complex because they take into consideration the management of currently running transactions. For example, if a scheduled transaction is executing at the same moment you assemble an online edit to that transaction, the transaction is marked so that no other instances of that transaction can execute. The transaction that is currently executing must complete or reach its timeout before the changes can be applied. The Transaction Control Manager's log file contains the entry displaying the time the transaction in question has been assembled. To view this log file on the main RSSql UI, select the Transaction Control Manager in the Configuration tree and click Log files on the toolbar. VIEWING TRANSACTION DIFFERENCES On the Transaction Differences dialog, you can see the differences between the current definition and the pending definition for a specific transaction. You must save pending edits before you view transaction differences. Click Show Differences on the Pending Transaction Definition dialog to view transaction differences.
72
8 ONLINE EDITS
Transaction properties are displayed at the top of the dialog and bindings (including the address location of the data points, not just the data point names) are displayed at the bottom of the dialog. The default option is All, but you may select Differences to display only the properties or bindings that are different between the current and pending definitions. You can view the differences between the current and pending transaction definitions any time after you save, but before you cancel or assemble pending edits.
You can also view transaction differences in Transaction Definition View on the main RSSql UI. Select a transaction, right-click and select Show Transaction Differences from the menu. CANCELING TRANSACTION PENDING EDITS To cancel pending edits after you saved them on the Pending Transaction Definition dialog, click Cancel Edits. You CANNOT cancel pending edits after you have assembled. Canceling pending edits does not affect the running configuration, it only removes the pending definition. If you have a running configuration with pending edits and then stop it, you cannot make any further changes to the configuration until you cancel or assemble the pending edits.
73
Toolbar
From the toolbar on the main RSSql UI, RSSql provides the ability to assemble all pending edits and to view data points and transactions with pending edit alerts.
Icon Description Assembles pending edits.
Opens the Pending Edit Alerts dialog to view data points and transactions that have caused pending edit alerts.
Configuration tree
The Transaction Control Manager displays directly under the configuration name in the Configuration tree in edit enabled configurations. Notice that the FactoryTalk control connector now displays directly under the Transaction Control Manager and does not have a traffic light because its functionality is embedded in the Transaction Control Manager.
74
8 ONLINE EDITS
States
Transactions display in the Transaction Definition view in the right pane of the main RSSql UI. The states, including the new states Edit Pending and Add Pending, are described below: Current The definition of a transaction that does not have pending edits. Edit Pending Changes made to the current transaction definition. Add Pending A new transaction, created online, but not assembled.
Status bar
Notice that the status bar at the bottom of the main RSSql UI displays the following information: Rows Selected (includes pending edits) The number of rows selected before you saved, assembled or canceled pending edits. Transactions Selected The number of transactions selected. Passed The number of successful operations. Disregarded RSSql does not allow the action to be performed. Failed Operations that did not take place because of an internal error.
75
76
Advanced Topics
Remote user interface
A remote RSSql user interface (UI) is used to configure RSSql services and configuration (.dat) files to run on another computer. For example, the RSSql UI runs on Computer A, but the RSSql services and RSSql configuration files are located on Computer B. No additional licensing is required to perform this function remotely. The remote RSSql UI communicates directly with the RSSql Configuration Server, which then writes to the configuration files. This method uses less resources when communicating with the remote configuration files.
Remote browsing allows you to browse DSNs and Oracle connection strings that are not found on the local computer.
Distributed configurations
A distributed configuration exists when RSSql services are installed on different computers allowing one configuration to process data from multiple RSView32 stations, multiple OPC servers, and multiple databases. One advantage of using a distributed configuration is the large amount of data that can be distributed across multiple computers. A single computer processor may not be able to process the amount of data that multiple computers can. In Step 2 of the RSSql Configuration Checklist, you create a distributed configuration by choosing different computers to run the different RSSql services.
77
Security/privileges
The RSSql UI must be logged into a Microsoft Windows NT/2000 account that has administrative privileges for all computers that are part of the RSSql system. This requirement allows the Windows NT/2000 Service Control Manager to start and stop the RSSql services.
78
9 ADVANCED TOPICS
UNC FILES For distributed configurations you must use the Universal Naming Convention (UNC) for the error log (.log) and transaction cache (.rsl) file paths when defining the configuration. Follow the format below: \\servername\sharename\path For example, \\Computer 1\c$\rssql_config Only the error log and transaction cache file paths must use a UNC path, not the actual configuration (.dat) files defined in Step 1 of the Configuration Checklist, which use a local path. To change the transaction cache file, select the configuration name, and then select Configuration > Properties. From the Cache tab on the Configuration Properties dialog, double-click on the connector to change the file path. To change the error log file, select the Error Log tab from the Configuration Properties dialog and change the file path in the field. It is important that the account you are currently logged into as and that the RSSql services will run as, have read and write privileges to that UNC share. DDE RSSql does not support NetDDE. Browsing locally (preferred method): Use the remote RSSql UI described above to browse locally. Select the DDE Server and DDE Topic from the drop-down menus on the DDE Data Point Definition dialog. Enter the item address or browse for tags in a tag file that is defined using a local path. Browsing remotely: The DDE Server and DDE Topic drop-down menus display only what is installed on the local computer. Therefore, you must manually enter the DDE Server and DDE topics. Then enter the item address or browse for tags in a tag file that is defined using a local path. RSLINX OPC Browsing remotely (preferred method): The same version of RSLinx must be installed on both computers. The embedded RSWho window should reference the remote connector computer (Computer 2). Select the Device Name (PLC) driver which contains the data points to be defined. Then enter the item address or browse for tags in a tag file that is defined using a local path. Browsing locally: Use the remote RSSql UI described above to browse locally. Otherwise, use the procedure above to browse remotely.
79
RSVIEW32 Browsing locally (preferred method): Use the remote RSSql UI described above to browse locally. The RSView32 project must be open before you can browse for tags. The RSView32 project name should display automatically. Click Add RSView Tags to select data points from the RSView32 database. Browsing remotely: The same version of RSView32 must be installed on both computers. The preferred version is RSView32 6.30.17. The RSView32 project must be open before you can browse for tags. The RSView32 project name should display automatically. Click Add RSView Tags to select data points from the RSView32 database. GENERIC OPC Browsing remotely (preferred method): The same version of the OPC server must be installed on both computers. In this example, RSLinx is the OPC server. Select RSLinx Remote OPC Server from the OPC Servers drop-down menu. Select the name of the computer you want to browse from the Host Name drop-down menu. You can create item strings for the configuration using one of the following methods: Using RSLinx 2.x or later, define a topic in RSLinx. Select Online to browse the memory map of the PLCs (PLC5, SLC500, CLX5550) and then select the item strings. Modify a topic to include a symbol file using local paths in RSLinx. When browsing, select Offline and the data points from the symbol file display. Select item strings from these data points. Enter item strings including the topic name in brackets as the prefix to the selected address. For example: [topicX]n7:0. FACTORYTALK Browsing locally: The FactoryTalk connector should always be installed on the same computer as the Transaction Manager. Browsing remote or local data/HMI servers is handled automatically in the FactoryTalk Directory. Remember to set the FactoryTalk Directory location prior to running RSSql. Select Programs > Rockwell Software>Utilities>Specify FactoryTalk Directory Location. Enter the computer name on the Specify FactoryTalk Directory Location dialog, then click OK. ODBC Browsing locally and remotely: The ODBC connector service can browse remote system DSNs remotely. If the RSSql UI or the connector is remote, the list of DSNs comes from the computer on which the ODBC connector is running.
80
9 ADVANCED TOPICS
MICROSOFT OLE DB Browsing locally and remotely: Select the Server Name for the server on which the database resides on the Database Connection Definition dialog. Click Refresh to select a specific database. ORACLE OCI Browsing locally and remotely: Use the remote RSSql UI described above to browse locally and remotely. The Connections drop-down menu on the Database Connection Definition dialog lists the connections that are defined in the tnsnames.ora file located on the computer on which the connector is running.
Increasing performance
The following sections discuss recommendations for increasing performance when running RSSql configurations.
Control system
Data in the control system should be stored in consecutive locations. This allows the control data server to read and write the entire block of data one time instead of performing several reads and writes for each RSSql transaction. Use AdvanceDDE instead of DDE because AdvanceDDE is faster than CF_Text. If you are using RSSql with RSLinx, this will happen automatically. Use Generic OPC instead of AdvanceDDE because Generic OPC is faster and more robust. Enable control system data server optimization for reads and writes. Use event driven communication (unsolicited messages) instead of fast polling. For example, if the control data does not change often, set the control system to send data only when it changes instead of continuously polling. If you must poll control data, use an appropriate poll rate. For example, do not poll every 10 milliseconds for data that only changes every 10 seconds.
Database
Use a commercial database instead of a personal database. If you are using Microsoft SQL Server, upgrade to SQL Server 2000. Distribute the database to a different computer than the one running RSSql. Use an appropriate data model for your application. Tune the database. Understand when to use indices and how to archive data. Consult your database administrator for assistance. Optimize queries, triggers, and stored procedures executed by RSSql.
81
RSSql
Trigger RSSql transactions on unscheduled data change instead of scheduled transaction execution. Use hot links instead of cold links to the control data server for DDE. Distribute RSSql control connectors on multiple computers. Distribute RSSql enterprise connectors on multiple computers. When using real-time transactions, use multiple real-time threads. The disadvantage is that this consumes extra connections to the database. Some databases are licensed based on the number of simultaneous connections. Use an Oracle OCI connection instead of an ODBC connection. Use cached transaction files instead of real-time threads, which enhances database performance on commercial databases that allow arrayed inserts. Modify the cached transaction file parameters (number of transactions per log file and time between cache files) to optimize the scheduling and volume of transactions to your database. In a distributed configuration, locate the RSSql files closest to the respective RSSql services. For example, the cached transaction files should reside on the same computer as the RSSql Transaction Manager. The RSSql configuration data files must reside on the same computer as the RSSql Configuration Server. Disable debug error logging in RSSql. When collecting data from both RSLinx and RSView32, some PLC values may exist in RSLinx and in the RSView32 tag database. Collect these points from RSLinx, not from RSView32. This allows RSLinx to optimize the data collection from the PLC by reading the data once and passing it to RSView32 and RSSql. Delete unused data objects and database connections. The RSSql enterprise connector automatically tries to connect to these databases even if they are not used in the configuration. If a PLC register is assigned to more than one data point in a transaction, use the same data point name so that the Transaction Manager does not have to request the data more than once.
82
9 ADVANCED TOPICS
83
84
Contents
The example application contains the following elements: A Microsoft Excel spreadsheet ExternalTriggerSample.xls. The integer number in cell A1 is the data point that is sent to the database. A Microsoft Access database ExternalTriggerSample with a single table that contains three columns: ExternalTriggerDatabaseID (an Autonumber field), ExcelValue, and a timestamp. A RSSql configuration that contains a single unidirectional transaction named ExternalTriggerTransaction that obtains a data value from cell A1 in an Excel spreadsheet and appends a record ExternalTriggerSample in the Access database. The transaction is defined so that it can be triggered by an external application. Three sample programs: one each in Microsoft Visual Basic, C Language, and Microsoft Visual C++ allow you to trigger a transaction by entering a transaction name. To execute the transaction, enter ExternalTriggerTransaction and click Trigger.
85
6. Run the program and enter the ExternalTriggerTransaction transaction name. Click Trigger to trigger the transaction. 7. Execute the Query ExternalTriggerDataBase from Access to view the records that have been created in the database. 8. You can change the data value in the Excel spreadsheet, select another option on the sample application screen, and continue to click Trigger. The sample illustrates the following two methods in the RSSql Application Program Interface (API) for triggering transactions: RSSqlUnconnectedTrigger() function: The only parameter is the name of the transaction to be triggered (case sensitive). This function establishes a connection to the Transaction Manager, sends the trigger request, and stops the connection. This function works well when the number of trigger requests is small. The Visual Basic version of this call is RSSqlUnconnectedTriggerVB(). RSSqlConnectedTrigger() function: The only parameter is the name of the transaction to be triggered (case sensitive). In addition, this function requires that the calling function use the RSSqlConnect() and RSSqlDisconnect() functions to manage the connection. This function is better suited for applications in which a large number of transactions must be triggered. The Visual Basic version of this call is RSSqlConnectedTriggerVB(), and the related calls are RSSqlConnectVB() and RSSqlDisconnectVB(). For more information, refer to API Calls in the online help.
86
87
To create the client application, complete the following steps: 1. Create a new Visual Basic Standard EXE project. 2. Select Project > Project Properties. Click the General tab and change the project name to ClientSampleVB. 3. Add a command button to the standard form. 4. Copy Code Sample B at the end of this section and paste it into the General Declarations section of the form. 5. Save the project.
88
12. Select ComSampleVB.dll from the Select Files to Install dialog and click Open. 13. ComSampleVB.dll displays under Files to Install. Click Next, then click Finish.
Note: You should be able to run the client code ClientSampleVB from the Visual Basic environment on the server computer successfully.
A Microsoft COM+ application is usually part of a larger application (N-tier) or system that affects many areas of a business. You will have to decide how to distribute components across the servers and what clients will have access to them. We assume a thorough understanding of the target environment (user accounts/groups, server names, etc.). For general concepts and detailed information about administering COM and COM+ applications, refer to the online help of the Component Services application. You can install a Microsoft COM+ application by using the setup program provided by the application vendor or the in-house developer, or by manually installing and configuring the COM+ application using the Component Services application. For more information about installing a COM+ application, refer to Installation Tasks in the online help of the Component Services application. The following procedures explain how to export the remote COM+ component, move the client project ClientSampleVB.vbp into Visual Basic, then run the client application in the Visual Basic environment.
To create a COM+ setup program, complete the following steps: 1. Select Start > Programs > Administrative Tools > Component Services to start the Component Services Console. 2. In the left pane of the Component Services, click the plus sign next to Component Services to expand it. Continue expanding Computers, My Computer, COM+ Applications, and finally, the ComSampleVB application folder. 3. Right-click on the ComSampleVB application and select Export from the menu. 4. From the COM Application Export Wizard dialog, click Next.
89
5. Enter, or browse for, the full path and filename where you will save the Microsoft Install (MSI) file. Make sure to select Application proxy Install on other machines to enable access to this machine. 6. Click Finish. 7. Navigate to the directory to which you exported the application. An MSI file and an MSI.CAB file that were built as a result of the export appears in the directory. 8. Move these files to the remote (client) computer and run the MSI file. DO NOT run this program on the server. This program correctly registers the remote components on the client computer.
To move the Client Sample Program, complete the following steps: 1. From Windows Explorer, navigate to the directory in which the client application is stored. A Form1.frm file and a ClientSampleVB.vbp file appears in this directory. 2. Move these files to the remote (client) computer. 3. Open the .VBP file up in the Visual Basic environment.
Note: You should now be able to run the ClientSampleVB application on the remote client computer and execute the COM+ Server component ComSampleVB on the server.
90
1. Select Configuration > Checklist. 2. From the Configuration Checklist, make sure that all previous steps have been completed (a yellow or green checkmark next to a step designates that the step has been completed), then click Step 4. 3. From the COM+ Data Object Definition dialog, enter a name for the connector in the Connector Name field. 4. Enter a name for the data object in the Name field. 5. If the desired COM+ connection does not display, click () to define one. 6. From the COM+ Connection Definition dialog, select a connection name from the drop-down list or enter it in the Connection Name field. 7. The User Name and Password fields are disabled because they are not supported in the initial release of Microsoft COM+. 8. Select a COM+ server from the drop-down list. The COM+ applications (or proxies) installed on the computer display in the COM+ Applications area. 9. Select a COM+ interface from the list, click Apply, then click Close to return to the COM+ Data Object Definition dialog. 10. Select a COM+ Method from the drop-down list. The method parameters that can be included in the specified RSSql data object display in the Parameters column.
91
11. Click Apply to save the parameters, then click Close to return to the Configuration Checklist. You are now ready to use Microsoft COM+ components in a RSSql transaction.
92
Program Notes: Note the use of SetComplete and SetAbort methods of the ctxObject to end the code. SetComplete and SetAbort indicate to the transaction server to deactivate the object and whether to commit changes made by the business code (SetComplete) or throw away all changes (SetAbort) The purpose of the arguments (strKeyID bolData) of the Get_VB_Sample_Data function is to demonstrate how to pass data to and from the function. The strKeyID variable will show a required input, notice the ByVal keyword. The remaining variables will show optional variables returned by the function, notice the Optional and ByRef keywords. End Function
93
94
Glossary
Assemble pending edits The process of making the running configuration aware of changes made to data points and transactions. Pending edits must be saved before they are assembled. Audit trail A record of changes made to a RSSql configuration, by whom, and when they were made compiled by the Configuration Server log file. Binding The relationship between a single data object element (table column or stored procedure parameter) and its corresponding data point or expression in a transaction. Transactions are composed of bindings. Bound value The data to be written to a table column or stored procedure parameter. Configuration A RSSql configuration consists of a set of transactions and the connectors, data points, and data objects required to implement the transactions. A configuration also has administrative information such as privileges. All configuration information is stored in the configuration files. You can create an unlimited number of configurations, but the RSSql Transaction Manager can run only one configuration at a time. Configuration Server A Microsoft Windows NT/2000 service that runs continuously to provide a single interface to the configuration files (.dat) that make up RSSql. The Configuration Server simplifies access to configuration files by filtering all changes to the files and interfacing with other RSSql services. A collection of all changes that affect a configuration can be recorded in an audit trail. Control connector A service that moves data between a data server in the control system and the Transaction Manager. Control system Typically includes a network of Programmable Logic Controllers (PLC) which collect data from and control the operation of machines in a manufacturing plant. DDE control connector A service that moves data between the Transaction Manager and a DDE or AdvanceDDE server. DSN An acronym for Data Source Name. The name of the database being used. A system DSN is available to all users and Windows NT/2000 services, while a user DSN is available only to the user who configured it. The ODBC enterprise database connector requires a system DSN to connect to an ODBC data source. Database view A filter on selected fields in database table(s) outside of the RSSql software.
95
Data object Defined in enterprise connectors. A subset of columns in a database table or database view or a set of stored procedure parameters, along with the database connection information to access the database. A RSSql transaction acts on a single data object, so all of the necessary database information for a transaction must be contained in a single data object. Data point Data locations in the control system. Data points are associated with control connectors and also contain collection parameters and other attributes. Data points can serve as transaction triggers, supply input data for transactions, and receive data as an output from a transaction. Edit enabled configuration A configuration that can be changed while it is running and uses the Transaction Control Manager service to communicate exclusively with FactoryTalk Live Data servers. Enterprise connector A service that moves data between the Transaction Manager and database(s) or enterprise system. Expression editor A RSSql utility used to create expressions prior to binding them in a transaction. Generic OPC control connector A service that moves data between the Transaction Manager and an OPC-compliant server. Microsoft COM+ enterprise application connector A standard for designing distributed n-tier application systems. Microsoft COM+ builds on standard COM, and incorporates new versions of tools such as Microsoft Transaction Server (MTS) and Microsoft Message Queues (MSMQ). Microsoft OLE DB enterprise database connector A service that moves data between the Transaction Manager and Microsoft SQL Server. Pending definition Changes made to data points or transactions used in a running, edit enabled configurations. Pending edits must be saved before they can be assembled. Pending edits do not affect the running configuration until they have been assembled. Pending edit alerts Informational messages describing that transactions that have state information will lose that state information when the associated data point or transaction is assembled. OCI An acronym for Oracle Call Interface. OCI is an Application Programming Interface (API) used for developing software that can interface natively to Oracle databases.
96
C GLOSSARY
ODBC An acronym for Open Database Connectivity. ODBC is a widely accepted API for database access that is based on the Call-Level Interface (CLI) specifications from X/Open and ISO/IEC APIs and uses Structured Query Language (SQL) as its database access language. ODBC enterprise database connector A service that moves data between the Transaction Manager and an ODBC-compliant database. The ODBC enterprise database connector is currently written to the ODBC version 2.0 specification and should support any ODBC driver that is version 2.0 compliant or greater. OLE DB A Component Object Model (COM)based database architecture that provides universal data integration over an enterprise network (from mainframe to desktop) regardless of the data type. Oracle OCI enterprise database connector A service that uses OCI to move data between the Transaction Manager and an Oracle SQL*NETcompliant database. RSBizWare PlantMetrics enterprise application connector A service that is used only with RSBizWare PlantMetrics and stores data in the RSBizWare Production Server. This connector can be configured only through the RSBizWare Enterprise Manager. RSLinx OPC control connector A service that moves data between the Transaction Manager and an RSLinx server. RSSql user interface The user interface that you use to create, run, and monitor RSSql configurations. RSView32 control connector A service that moves data from an RSView 32 project to the Transaction Manager server in RSView32. SAP enterprise application connector An enterprise connector used to interface with SAP. SQL An acronym for Structured Query Language. SQL is an ANSI/ISO standard language for querying, updating, inserting, deleting, controlling access to, and defining storage containers for data. Table In relational database terms, a unit of storage that contains columns of specific names and data types and rows of those columns. Tag A collection of information for a single data point. Time-series data compression enterprise database connector A service that compresses data from the control system using a lossless algorithm to conserve space. This connector can be configured and used by only RSBizWare Historian.
97
Transaction An exchange of data between data points and a data object. Transactions also include triggering information and other attributes that govern its behavior. Transactions can be unidirectional or bidirectional. Transaction Manager A service that controls and executes RSSql transactions contained in a configuration. Transaction Control Manager A service similar to the Transaction Manager, but with the additional functionality of the FactoryTalk Live Data control connector embedded in it. In edit enabled configurations, the Transaction Control Manager service replaces the separate Transaction Manager and control connector services. Transaction Result Code A data value assigned to a transaction by RSSql to communicate successful transaction completion. UNC An acronym for Universal Naming Convention.
98
INDEX
Index
.dat files .log files .rsl files .rsq files .sql files 26 26 26 26 26
D
data block support 41 data objects COM+ 4849 defining 23, 47 OCI 48 ODBC 48 OLE DB 48 PlantMetrics 49 data points add multiple 41 buffering 44 collection mode 3637 DDE 39 defining 23, 35 FactoryTalk 35 generic OPC 36 quality 42 RSLinx OPC 36, 38 RSView32 39 substitution option 42 data validity 41 database triggers 57 DDE control connectors 30 DDE data points 39 defining connectors 22 data objects 23, 47 data points 23, 35 distributed configurations 7781 distributed RSSql installations 13
B
bidirectional transactions, with input/output bindings 5556 bidirectional transactions, with transaction result bindings 54 buffering data points 44
C
cached transactions 57 COM+ data objects 4849 enterprise connectors 32 remote component sample 8791 Configuration Checklist 20 Configuration Server 3, 34 configurations creating 22 increasing performance 8183 monitoring 25 overview 20 properties 24 starting 24 status 24 stopping 25 control connectors 29 DDE 30 defining 22 FactoryTalk 30 OPC 30 RSLinx OPC 29 RSView32 29 copy protection 10
E
edit enabled configurations 61, 63 creating 67 editing data points 68 editing transactions 71 enterprise connectors 32 COM+ 32 defining 22 error handling 49
99
OCI 32 ODBC 31 OLE DB 32 options 33 error handling 49 Expression Editor 58 external files 26 external trigger sample application
pending edits 61 assembling 61, 64, 69, 72 canceling 61, 65, 69, 73 saving 68, 72 PlantMetrics data objects 49 PlantMetrics enterprise connectors 8586
32
R
real-time transactions 57 retrieving data 42 RSBizWare Enterprise Manager 26 RSLinx OPC control connectors 29 RSLinx OPC data points 36, 38 RSSql concepts 2 consulting services 7 external files 26 installing 9, 12 overview 1 privileges 27 services 29 support 67 training 6 user interface 15 RSView32 control connectors 29 RSView32 data points 39
F
FactoryTalk control connectors FactoryTalk data points 35 FactoryTalk services 3 30
G
generic OPC data points 36
H
hardware requirements 9
I
inserts and updates 51 installing RSSql 9, 12
L
license options 10
S
software requirements 9 stale and mismatched data 43 starting configurations 24 stopping configurations 25 stored procedures 51, 55 substitution option 42
O
OCI data objects 48 OCI enterprise connectors 32 ODBC data objects 48 ODBC enterprise connectors 31 OLE DB data objects 48 OLE DB enterprise connectors 32 online edits 6162 current definition 61, 64 pending definition 61, 64 OPC control connectors 30 OPC data points 36
T
timeout properties 41, 56 Transaction Control Manager 34, 61 Transaction Manager 3, 33 transactions bidirectional with input/output bindings 5456 cached 57 creating 23 real-time 57
P
Parse function 59 pending edit alerts 61, 66
100
INDEX
timeout properties 41, 56 triggers 57 types 50, 53 unidirectional 5354 verifying 24 viewing differences 72 with bound transaction results with outputs 57
U
unidirectional transactions user interface 15 Configuration tree 19 menu 17 new elements 16, 74 toolbar 1819 workspace 20 5354
57
101
102