Wonderware sql入门手册

合集下载

Wonderware帮助文档SQLDataGrid

Wonderware帮助文档SQLDataGrid

ArchestrA™ SQLDataGrid Symbol User’s GuideInvensys Systems, Inc.Revision ALast Revision: 3/18/08Copyright© 2008 Invensys Systems, Inc. All Rights Reserved.All rights reserved. No part of this documentation shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of Invensys Systems, Inc. No copyright or patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this documentation, the publisher and the author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein.The information in this documentation is subject to change without notice and does not represent a commitment on the part of Invensys Systems, Inc. The software described in this documentation is furnished under a license or nondisclosure agreement. This software may be used or copied only in accordance with the terms of these agreements.Invensys Systems, Inc.26561 Rancho Parkway SouthLake Forest, CA 92630 U.S.A.(949) 727-3200For comments or suggestions about the product documentation, send an e-mail message to productdocs@.TrademarksAll terms mentioned in this documentation that are known to be trademarks or service marks have been appropriately capitalized. Invensys Systems, Inc. cannot attest to the accuracy of this information. Use of a term in this documentation should not be regarded as affecting the validity of any trademark or service mark. Alarm Logger, ActiveFactory, ArchestrA, Avantis, DBDump, DBLoad, DT Analyst, Factelligence, FactoryFocus, FactoryOffice, FactorySuite, FactorySuite A2, InBatch, InControl, IndustrialRAD, IndustrialSQL Server, InTouch, MaintenanceSuite, MuniSuite, QI Analyst, SCADAlarm, SCADASuite, SuiteLink, SuiteVoyager, WindowMaker, WindowViewer, Wonderware, Wonderware Factelligence, and Wonderware Logger are trademarks of Invensys plc, its subsidiaries and affiliates. All other brands may be trademarks of their respective owners.3SQLDataGrid Symbol User’s GuideContentsWelcome (5)Documentation Conventions (5)Technical Support (6)Chapter 1 Configuring the SQLDataGrid Symbol (7)Using the SQLDataGrid Symbol (8)Configuring Authentication Modes (9)Windows Authentication (9)SQL Server (9)Configuring the Database Connection (10)Configuring SQLDataGrid Symbol Custom Properties (10)Using Scripts with the SQLDataGrid (12)Associating Grid Control Actions to InTouch Scripts and Animations (12)Accessing Data from a Selected Row in the SQLDataGrid (13)Chapter 2 Working with the SQLDataGrid in Run Time 15Viewing Data (16)Populating the Table, View or Query List (16)Solving Hide and Show Window Issues (16)Moving Columns (17)Grouping Columns (17)4 ContentsSQLDataGrid Symbol User’s Guide Viewing Aggregate Values (19)Using Progressive Column Filtering (20)Discarding Changes (22)Viewing Errors (23)Writing Changes to the Database (23)Views and Updates (24)Database Connection Management (26)Connection Sharing and Pooling (26)Appendix A Custom Properties for the SQLDataGridSymbol (27)Index (35)5WelcomeThis guide describes configuring and using the SQLDataGridsymbol. The SQLDataGrid is delivered as an ArchestrASymbol and is used as an InTouch graphic.You can view this document online or you can print it, in partor whole, by using the print feature in Adobe Acrobat Reader.This guide assumes you know how to use Microsoft Windows,including navigating menus, moving from application toapplication, and moving objects on the screen. If you needhelp with these tasks, see the Microsoft online help.This guide also assumes that you know how to use MicrosoftSQL Server. For help with SQL Server, see the Microsoftonline help.In some areas of the Application Server, you can alsoright-click to open a menu. The items listed on this menuchange, depending on where you are in the product. All itemslisted on this menu are available as items on the mainmenus.Documentation ConventionsThis documentation uses the following conventions:Convention Used forInitial Capitals Paths and file names.Bold Menus, commands, dialog box names,and dialog box options.Monospace Code samples and display text.SQLDataGrid Symbol User’s Guide6SQLDataGrid Symbol User’s GuideTechnical SupportWonderware Technical Support offers a variety of supportoptions to answer any questions on Wonderware productsand their implementation.Before you contact Technical Support, refer to the relevantsection(s) in this documentation for a possible solution to theproblem. If you need to contact technical support for help,have the following information ready:•The type and version of the operating system you are using. For example, Microsoft Windows XP, SP1.•Details of how to recreate the problem.•The exact wording of the error messages you saw.•Any relevant output listing from the Log Viewer or any other diagnostic applications.•Details of what you did to try to solve the problem(s) and your results.•If known, the Wonderware Technical Support casenumber assigned to your problem, if this is an ongoingproblem.7 Chapter 1Configuring the SQLDataGridSymbolThe SQLDataGrid is a symbol that enables you to interactwith data stored in SQL databases. You can use theSQLDataGrid symbol in an InTouch application that youcreate in a published or managed mode.The following graphic shows the main components associatedwith the SQLDataGrid.SQLDataGrid Symbol User’s Guide8 Chapter 1 Configuring the SQLDataGrid SymbolSQLDataGrid Symbol User’s GuideYou can perform the following activities with theSQLDataGrid symbol:•Insert or modify data in selected database tables and views.•Delete rows from a database table (select the row and press the Delete key).•Select data from existing tables and views.•Run a custom SQL query.This section provides the following information:•The minimum configuration required by theSQLDataGrid symbol to retrieve data from a SQLdatabase.•The set of custom properties that must be configured toauthenticate users and connect to the database.•A list of the custom properties that define the parameters associated with a specific database and query to being the SQLDataGrid SymbolThe SQLDataGrid symbol appears in the Graphic T oolbox of the ArchestrA IDE. Embed the symbol in an existing window or a new window. When you double-click the symbol, the Edit Custom Properties dialog box appears.For detailed information on working with symbols, see the ArchestrA and InTouch Integration Guide.Using the SQLDataGrid Symbol 9SQLDataGrid Symbol User’s GuideConfiguring Authentication ModesThis section describes how to use the custom properties of the SQLDataGrid symbol to authenticate a user to the database. You can assign static values to these custom properties or link them to attributes or tag names in your application.Note The value fields are not case sensitive.T o configure an authentication mode for the SQLDataGridsymbol1In the Custom Properties pane, select Authentication_dg .2In the Default Value box, type the name of a valid securitytype. Acceptable values are:•Windows•SQL ServerA more detailed description of these authenticationmodes follows this procedure.3In the Custom Properties pane, select ConfiguredUser_dg .4In the Default Value box, type a user name.5In the Custom Properties pane, select ConfiguredPassword_dg .6In the Default Value box, type the password associatedwith the user name.Windows AuthenticationIf you use Windows as a value for the Authentication_dgcustom property and do not designate custom properties for a domain, user, or password, the SQLDataGrid symbol uses the credentials of the user who is currently logged on to the node running InTouch.If you select Windows as a value for the Authentication_dg custom property and designate custom properties for adomain, user, and password, the SQLDataGrid symbol uses the specified Windows domain name, user name, andpassword to connect to the SQL Server database.SQL ServerThis authentication mode uses the specified SQL Server user name and password to connect to the SQL Server database.10 Chapter 1 Configuring the SQLDataGrid SymbolSQLDataGrid Symbol User’s Guide Configuring the Database ConnectionThis section describes the procedure to configure the custom properties required to establish a connection to a specific database and its associated data. You can assign staticvalues to these custom properties or link them to attributes or tag names in your application.Note The value fields are not case sensitive.T o configure the database connection1In the Custom Properties pane, select ConfiguredServer_dg .2In the Default Value box, type the network name of the computer hosting the database. 3In the Custom Properties pane, select ConfiguredDatabase_dg .4In the Default Value box, type the name of the target database. 5In the Custom Properties pane, select SQLQuery_dg .6In the Default Value box, type the name of the targettable, view or query.To populate the SQLDataGrid, click Runtime , and then click Retrieve .Configuring SQLDataGrid Symbol Custom PropertiesThis section lists custom properties in functional groups. For a detailed description of each custom property, see Appendix A, Custom Properties for the SQLDataGrid Symbol.The default run-time window shows the complete symbol. However, you can hide the interface controls and display only the grid.You can use custom properties to display additionalinformation about the status of the query, the dataset, or to provide interactive buttons that initiate specific actionsIn addition to the table, view, and query input, you canspecify additional parameters by using custom properties and control them with scripting.Using the SQLDataGrid Symbol 11The following table lists the various custom properties youcan insert in your scripts by functional groups.Authentication Authenticate users to databasesAuthentication_dgConfiguredDomain_dgConfiguredPassword_dgConfiguredUser_dgDatabase Connectivity Designate database connectivity functionsAutoRefresh_dgAutoRefreshDuration_dgCmdCancel_dgCmdRefresh_dgCmdRetrieve_dgCmdTestConnection_dgCmdWrite_dgComboBoxListString_dgConfiguredDatabase_dgConfiguredReadOnly_dgConfiguredServer_dgRowCount_dgRowLimit_dgSelectedRowNumber_dgSQLQuery_dgSQLQueryCurrent_dgSQLQueryPassThrough_dgSQLQueryPending_dgDiagnostic Perform diagnostic functionsCmdLogDiagnostics_dgCmdResetDiagnostics_dgErrorPanelDisable_dgStatusDesc_dgStatusError_dgStatusIsError_dgAppearance Modify the appearance of the run-time SQLDataGrid thatcontains data from the databaseButtonPanelHide_dgCmdPageFirst_dgCmdPageLast_dgCmdPageNext_dg12 Chapter 1 Configuring the SQLDataGrid SymbolUsing Scripts with the SQLDataGridWhen you use the SQLDataGridUserCtl to create a new symbol,you can script all the properties and events of the control.Associating Grid Control Actions to InTouchScripts and AnimationsYou can hide the buttons of the SQLDataGrid symbol andtrigger data retrieval from outside the grid interface. Forexample, you can configure a button to generate a datasetfrom an InTouch application.To do this, use the CmdRetrieve_dg property and associate itto an InTouch tag. The tag is linked to the InTouch button.T o configure dataset retrieval from InT ouch1In WindowMaker, open the InTouch window.2Double-click the SQLDataGrid symbol. The Edit Custom Property dialog box appears.3In the Custom Properties panel, select the ButtonPanelHide_dg property.4In the Default Value field, type True .5Select the CmdRetrieve_dg property.6In the Default Value field, select an InTouch tag by one ofthe following actions:aType a tag name. If the tag does not exist, you are prompted to define a new tag.b Click the ellipsis to open the Tagname Dictionary andselect a tag.For this example, type CmdRetrieve in the field.7Click OK and define the tag as a Memory Discrete tag.CmdPagePrev_dgColumnAggregateEnable_dgColumnFiltering_dgColumnGroupingEnable_dgComboBoxPanelHide_dgFontBold_dgFontName_dgFontSize_dgSupportThemes_dgWriteButtonHide_dgUsing Scripts with the SQLDataGrid 138When you finish defining the tag, close the TagnameDictionary and click OK on the Custom Properties panel.9Create a button on your InTouch window. For thisexample, its caption is Retrieve.10Link the CmdRetrieve tag to the button.11Switch to run-time mode and click Retrieve.Accessing Data from a Selected Row in the SQLDataGridYou can use the SQLDataGrid symbol to read the content ofa selected row and associate it to attributes outside thesymbol. You can configure scripts to read the data from aselected row and programmatically associate that data totags in an InTouch application or to attributes in the Galaxy.The following script example shows how to retrieve data froma selected row. Notice that the SelectedRowData property isavailable in the SQLDataGrid client control and not in theSQLDataGrid symbol.dim rd1 as System.Data.DataRow;rd1 = SQLDataGridUserCtrl1.SelectedRowData;if(rd1 <> null) thenInTouch:Text9 = rd1.ItemArray[4].ToString();'This assigns the 4th column value for the selectedrow, to the InTouch "Text9" tag.endif;14 Chapter 1 Configuring the SQLDataGrid Symbol15 Chapter 2Working with the SQLDataGrid inRun TimeDuring run time, you can select the database table, view, orquery that will populate the SQLDataGrid symbol andchange the appearance of the data.You can use the run-time application to perform thefollowing tasks:•Move columns•Group columns•Aggregate column values•Filter columns•Sort columnsIf you have the appropriate permissions, you can also makethe following changes to the database:•Change the order of columns in an existing row.•Insert a row into a table.•Update a row in a table.•Delete a row from a table.Note You cannot update or delete a row in a table unless thattable has a primary key defined. You can add new rows to a tablewithout a primary key as long as that is the only action you areperforming on the table.16 Chapter 2 Working with the SQLDataGrid in Run TimeViewing DataYou can use the run-time version of the SQLDataGridsymbol to view data in the following formats:•Data from a specific table•Data from a specific view•Data that is retrieved by a SQL queryYou can resize the column width of any table, view, or queryresult.T o view specific data from a SQL query1In the Table, View or Query box, type a SQL query.2Click Retrieve. The appropriate dataset appears.Populating the Table, View or Query ListYou can also populate the Table, View or Query box withitems that you frequently use, so that you do not repeatedlyhave to type entries.T o populate the Table, View or Query box1In the Edit Custom Propertie s dialog box, clickComboBoxListString_dg.2In the Default Value box, type any of the following items,separated by semicolons (;):•Multiple table names•Multiple SQL statements• A combination of table names and SQL statements3Click OK.4When you go to run time, click the arrow to the right ofthe Table, View or Query box. Each item that you enteredis displayed on a separate line.Solving Hide and Show Window IssuesIf you hide the InTouch window that contains theSQLDataGrid and then show it again, the last data valuescontained in the window might not appear. Use the followingprocedure to ensure that the data values always appear.T o Ensure that Grid Values Appear When You Hide and Show theInT ouch WIndow1In WindowMaker, click Special > Configure >WindowViewer.2Under WindowViewer Memory, clear the check box Alwaysload windows from disk.Viewing Data 17 Moving ColumnsYou can rearrange the order of the columns to meet yourviewing needs.T o move columns1Click the heading of the column that you want to move.2Holding your mouse key down, drag the column headingto another position within the table.Grouping ColumnsThe group-by function lets you sort data at more specificlevels. This example shows a view that groups customernames and their business addresses.Note The ColumnGroupingEnable_dg custom property must beTrue before you can use this function.T o use the Group-by function1In the Table, View or Query box, type the name of a tableor view or click the arrow to display a list ofpre-determined items. For details about pre-determineditems, see Viewing Data on page16.2Click Group-by. The Drag a column header area appears.18 Chapter 2 Working with the SQLDataGrid in Run Time3Drag a column heading to the upper area.4To view the data groups, press Enter to expand any of theStateProvince items.5To see a more specific sorting of the data, drag anothercolumn heading to the upper sorting area.6If you want to sort the data at an even finer level, you canrepeat steps 3 and 4 and drag another column heading tothe sort area.Viewing Data 197If you want to remove one of the column headings fromthe sorting area, drag it down to the data area.8To return the original dataset, click Group-by.Viewing Aggregate ValuesYou can perform a numeric operation on data within a singlecolumn of the table by clicking the Aggregate button.Note Before you can use this function, theColumnAggregateEnable_dg custom property must be True.You can perform the following functions on column data. Notall operations may be available for a column because of thedata type.•Average: Calculates the average number of items in thecolumn.•Count: Lists the number of rows in the column.•Maximum: Lists the highest number in the column.•Minimum: Lists the lowest number in the column.•Sum: Adds the numbers in each row and provides a total.T o view aggregate values1Click Aggregate. The summation sign (Σ) appears at thehead of each column.2Click the summation sign at the top of the OrderQtycolumn. The Select Summaries dialog box appears.20 Chapter 2 Working with the SQLDataGrid in Run Time3Select Average and click OK. The value appears just belowthe Grand Summaries row. You can re-size the columnwidth to view the entire number This following figureshows the average value for OrderQty.4To hide the Grand Summaries row follow these steps:a Click the summation sign.b Clear the Average check box in the Select Summariesdialog boxc Click OK.5To hide the summation signs, click Aggregate.Using Progressive Column FilteringYou can configure the SQLDataGrid to support progressivecolumn filtering. Type the first letters of your search, and thematching values appear in the grid.T o configure and use progressive filtering1Switch your SQLDataGrid window to WindowMakermode.2Double-click the symbol and select the custom propertyColumnFiltering_dg.3Set the ColumnFiltering_dg default value to True.4Click OK and run the InTouch application.Viewing Data 215To return a dataset, click Retrieve. In this example, the dataset contains a table view of customer names andaddresses.6Move your cursor over the field below the LastName column heading. A list arrow appears.7You can filter the values by any of the following actions:•Click the list arrow and type the first letter of the value If you type additional letters, your sort is moreprecise.•Click the list arrow and select an item from the list.22 Chapter 2 Working with the SQLDataGrid in Run Time•If you select the (Custom) item from the list, you canfurther refine your search in the Custom dialog box.This example shows a search for two different areacodes.8To perform a different search, clear your search criteriaby clicking the cancel icon at the left of the filtering row.Discarding ChangesIf you need to discard the changes made to grid values, clickRetrieve. This action reloads the table values from thedatabase and discards any changes. You can also initiate theaction by using a script that sets the CmdRetrieve_dgproperty to True.Viewing Errors 23 Viewing ErrorsYou can manually display or close the Status panel in thelower part of the grid display area. The status panel can alsoautomatically appear when an error occurs. However, afterthe panel appears, it remains on view.If a command object is successful, the message "Success"appears in the Status panel. If the panel is closed, "Success"messages do not appear for successful command objects.To close the panel, click the double-arrow icon at the right ofthe panel. To open the panel on demand, right-click andselect Show Status.Note The error panel display does not change the overall areaoccupied by the grid symbol.Writing Changes to the DatabaseYou can write changes to the database if the followingconditions are met:•The database query (or table) can be updated.•The ConfiguredReadOnly_dg custom property value isFalse.•SQL Server security allows the security mode configuredat the grid to perform an update.•Changes made in the grid are consistent with thedatabase schema.Changes made in the grid are written to the database usingthe Write command. Changes are handled as a singledatabase transaction. If any change fails, the entire set ofchanges is rolled back.If you have sufficient privileges, you can change a value andclick Write. You can also use a script to set the CmdWrite_dgproperty. This action causes the grid contents to be evaluatedfor changes and for the changes to be written to the database.24 Chapter 2 Working with the SQLDataGrid in Run TimeTip After you modify cells in the grid and write them back to thedatabase, you should also verify that the data is correctly written.In certain cases, such as a database table with an automaticallyincrementing primary key or interdependent cells, the grid doesnot show the true contents of the database table after you writeback to it. Also, no error message is shown. It is recommendedthat you execute a retrieve or auto refresh command after writingto the database to make sure it is showing the current data.Views and UpdatesSome views cannot be updated for the following reasons:•The views contain table joins on keys other than primarykeys.•The views include security settings that prohibit updates.If the write process fails, you can view the status in the Errorpanel. You can also monitor the StatusDesc_dg, andStatusError_dg properties by using text fields on the InTouchwindow for run-time display.T o make a change to data in the data grid1Ensure that the ConfiguredReadOnly_dg custom propertyvalue is False.2Click Runtime.3Enter a SQL statement or the name of a database table orview.4Click Retrieve. This example shows data from thecustomer table in AdventureWorks. You will modify aphone number.Writing Changes to the Database 255Select the phone number that you must modify. The area becomes editable.6Change the last four digits of the phone number to 0122. 7Click an area outside the edit area. The Write button becomes enabled.8Click Write.9To verify the change, click Retrieve.26 Chapter 2 Working with the SQLDataGrid in Run TimeDatabase Connection ManagementAn important feature of the SQLDataGrid is the ability tooptimize the management of multiple simultaneousconnections to the database. This section describes how theinfrastructure handles the database connection pool andsharing for the SQLDataGrid.Connection Sharing and PoolingMultiple instances of the SQLDataGrid configured withidentical connection strings use a shared connection pool andSQL command queue when they are active in the sameinstances of the InTouch WindowViewer. To limit the size ofthe shared pool, you can use the connection pool propertyMaxConnections. For configuration options, see theMaxConnections_dg on page32.Physical connections to the SQL database are opened basedon command requests and are closed when no requests arepending. All SQL commands are queued and processed basedon availability of connections and processing time.The SQLDataGrid asynchronously processes all SQLcommands. Asynchronous command processing ensuresavailability of interaction with the InTouch WindowViewerduring time-consuming command processing.Any database connection that is established in a scriptwithin a symbol using the SQLData Script Library also takesadvantage of connection pooling. Similar connection stringsfrom either the SQLDataGrid or the script in the sameInTouchView application share a common pool.Note Connection sharing and connection pooling require that thesame security mode and user credentials be used for allSQLDataGrid symbols within the InT ouchView application thatshares the connection or the pool.27 Appendix ACustom Properties for theSQLDataGrid SymbolThe following table lists all available Custom Properties.Data types are shown in the Custom Properties panel andare not included in this table.Property Name DescriptionAuthentication_dg Designates whether database userauthentication is SQL Server or Windows.Writable at Run Time: YesDefault: WindowsAutoRefresh_dg Automatically refreshes data appearing in theSQLDataGrid. When True, the query thatrepopulates the SQLDataGrid runs after theAutoRefreshDuration time elapses.Writable at Run Time: YesDefault: FalseAutoRefreshDuration_dg Designates the requested time interval inseconds for AutoRefresh.The actual refresh rate can be slower than thespecified rate.Writable at Run Time: YesDefault: 6028 Appendix A Custom Properties for the SQLDataGrid SymbolProperty Name DescriptionButtonPanelHide_dg Hides grid buttons when the value is True.Writable at Run Time: YesDefault: FalseCmdCancel_dg Cancels the last database query.Writable at Run Time: YesDefault: FalseCmdClear_dg Clears the contents of the SQLDataGrid.Writable at Run Time: YesDefault: FalseCmdCopy_dg When True, copies the current selection to theclipboard.Writable at Run Time: YesDefault: FalseCmdLogDiagnostics_dg Writes the current DCM diagnostic values to theArchestrA logger.Writable at Run Time: YesDefault: FalseCmdPageFirst_dg Moves the SQLDataGrid display to the first row.Writable at Run Time: YesDefault: FalseCmdPageLast_dg Moves the SQLDataGrid display to the last row.Writable at Run Time: YesDefault: FalseCmdPageNext_dg Moves the SQLDataGrid display down one page.Writable at Run Time: YesDefault: FalseCmdPagePrev_dg Moves the SQLDataGrid display up one page.Writable at Run Time: YesDefault: FalseCmdPaste_dg When True, pastes the current text contained onthe clipboard to the grid.Writable at Run Time: YesDefault: False。

wonderware培训教学提纲

wonderware培训教学提纲

w o n d e r w a r e培训Wonderware培训Wonderware公司推出旗舰级 InTouch软件,这是第一个基于微软Windows&reg操作系统的人机界面(HMI)。

Wonderware只能在windows环境下运行,支持32位及64位操作系统,但wonderware公司建议使用32位操作系统因为64位操作系统部是很稳定,系统容易崩溃带来不必要的损失。

Wonderware软件架构:Intouch等可视部分客户端 Active factory分析部分Information Server CAL等第3方认可软件即符合(微软技术标准,工业标准) App Server发布数据三个服务器 Historian历史数据Information Server实时数据DAServer/I/OserverPLC等第三方软件Daserver/ioserver :收到采集命令,采集数据,发广播包,工作完成后,各机从DAseerver堆栈中提取数据。

概念:1.Archestry 只是一个名字2.Application server:应用程序服务器。

类似于I/Osever 客户端(阀门,泵,开关等运行配置,控制配置,run_time部分)3.Galaxy:数据库4.Galaxy Repostistory:配置的指令存储在此可以用这台机器进行开发。

5.GR是装Galaxy数据库的机器一个(工程)网络只能有一个Galaxy。

安装前准备:APPLICATION SERVER 的同时还可以安装I/OserverGR SQLSERVER可单独也可与APPLICATION 一起装。

Historation > 安装SQL server2005数据库需要建立防火墙,需专门一台机器。

Information server >安装SQL server2005数据库需要建立防火墙,需专门一台机器。

步骤1:1.每台机器装BOOTSTAP(需要主动对GR访问取数据的必须安装不是主动对GR 访问被动的接收数据的不用安装)。

InTouch SQL 用户指南

InTouch SQL 用户指南

第 3 章 : 配置 SQL Access Manager ................15
SQL Access Manager 综述 ....................................................... 15 配置绑定列表 ......................................................................... 16 使用特殊分隔符 ......................................................................... 19 配置表格模板 ............................................................................. 20 SQL.DEF 文件 ........................................................................... 23
索引 ....................................................................51
InTouch SQL Access Manager 用户指南
SQL Access Manager
5

1

SQL Access Manager
Wonderware FactorySuite SQL Access Manager 可供您访问、修改、创 建及删除数据库中的表格。数据库在表格中存储共享公共属性或字段的 信息。 “结构化查询语言” (Structured Query Language,简称 SQL)是 用于访问该类信息的语言。

InTouchSQL用户指南

InTouchSQL用户指南
Wonderware FactorySuite SQL Access指南
修订版 2001 年 6 月
Wonderware Corporation
保留所有权利 未经 Wonderware 公司的事先书面许可 不得以电子 机械 影印 录制或其它的任何方式复制 传输本说明文件的任何部分或将其储存 在检索系统中 使用此处包含的信息不应承担版权或专利责任 虽然在本说 明文件编制过程中采取了一切预防措施 错误或疏漏在所难免 出版商和作 者不对此承担任何责任 亦不对因使用此处包含的信息而引起的任何损害 负责 本说明文件的信息如有变更 恕不另行通知 亦不代表 Wonderware 公司一 方的承诺 本说明文件所述的软件在遵守许可证或许可协议的前提下提供 本软件的使用或复制须遵从这些协议规定的条款 2001Wonderware 公司 100 Technology Drive Irvine, CA 92618 U.S.A. (949) 727-3200 商标 本书所有作为商标或服务标志的专门名词均采用大写字母印刷 Wonderware 公司并不保证本书信息的准确性 使用本书中的任何术语不应视为影响任何 商标或服务标志的有效性 Wonderware FactorySuite 和 InTouch 是 Wonderware 公司的注册商标 WindowMaker WindowViewer SQL Access Manager Recipe Manager SPCPro DBDump DBLoad HDMerge HistData Wonderware Logger Alarm Logger InControl InBatch IndustrialSQL FactoryOffice FactoryFocus License Viewer SuiteLink SuiteVoyager 和 NetDDE 是 Wonderware 公司的商标 版权所有

wonderware ide 培训的手册文档第11章

wonderware ide 培训的手册文档第11章

Lab 11 –Adding Auto Reconnect to DDESuiteLinkClientIntroductionIn this lab, you will configure the $gDDESuiteLinkClient to automatically reconnect to the data source when the connection is lost. You will do so by extending the objects with UDAs with scripts.Using a UDA/script combination, you will also add additional diagnostic information that will indicate the number of disconnects the object has experienced since it last went on scan.ObjectivesUpon completion of this lab, you will be able to:Create scripts in an objectCreate scripts with multiple execution typesAdd reconnect functionality to the $gDDESuiteLinkClient objectAdd the Auto Reconnect FunctionalityIn the following steps, you will create a script that will automatically reconnect to the data source when the connection is lost.1.In the Template Toolbox,Global toolset, double-click $gDDESuiteLinkClient to open theconfiguration editor.2.On the Scripts tab, click the Add Script button. the new script Reconnect and press Enter.4.Configure the Reconnect script as follows:Aliases:lockedDeclarations:lockedScripts: Execution type:Execute(default) and lockedBasics lockedExpression: Me.Connectionstatus<>2Trigger Period:00:00:05.0000000Script body Me.Reconnect=true;This script will attempt to reconnect every 5 seconds when not connected to the data source.Now, you will validate the script syntax by using the Validate feature. If the script has a syntax error, it will appear in the yellow bar just above the script body area.5.To the right of the Execution type drop-down list, click the Validate button.6.In the UDAs tab, click the Add button.7.Rename the new UDA t and press Enter.8.Configure the t UDA as follows:Data type:IntegerCategory:Calculated9.In the Scripts tab, click the Add button. the new script Disconnect.Monitor and press Enter.11.Configure the Disconnect.Monitor script as follows:Aliases:lockedDeclarations:lockedScripts: Execution type:Execute(default) and lockedBasics lockedExpression: Me.Connectionstatus<>2Trigger type:OnTrueScript body t=t+1;This script will increase a counter by one every time the condition is true.12.Click the Validate button.You will now add code within the same script under a different execution type that will run when the object goes on scan.13.While still in the Disconnect.Monitor script, change the Execution type to OnScan.14.In the script body, type t=0;.This script will reset the counter to zero every time the object goes on scan.15.Save and close the configuration editor.16.In the Comment field of the Check In dialog box, type Reconnect script and click OK.17.When the Check In progress displays Object 1 or 1 completed, click Close.18.Redeploy PLCSim, leaving the default options.19.When the Deploy progress displays 100% completed, click Close.View the Scripts in RuntimeNext, you will use Object Viewer to view the runtime data of the scripts.20.In the Deployment view, right-click PLCSim and select View in Object Viewer.21.Click on the PLCSim tab.Add the following attributes to the watch window:tDisconnect.Monitor.ExecutionCntReconnect.ExecutionCnt22.Save the watch window.Note:Your instructor will now disconnect your connection to the Device Integration server, and then reconnect the connection so that you can observe the behavior.Your Watch List now displays that there was a disconnect, but the connection has been restored.。

wonderware系统平台 安装指导手册

wonderware系统平台 安装指导手册

上海蓝鸟科技股份有限公司系统平台2012安装指导手册2012-12-5赵若君目录1 ArchestrA System Platform 2012安装前注意事项 (2)2 SQL Server安装步骤 (4)3 Wonderware InTouch HMI 2012安装步骤 (15)4 Wonderware Application Server 2012安装步骤 (21)5 Wonderware Historian Server 2012安装步骤 (21)6 Wonderware Historian Client 2012安装步骤 (24)7 Wonderware Information Server 2012安装步骤 (24)8 驱动安装步骤 (25)9 配置Windows® SharePoint Services 3.0™ (28)10 授权安装 (29)11 Configurator (34)11.1 配置Information (34)1.2 配置Historian (43)12 设置网络账户 (44)1 ArchestrA System Platform 2012安装前注意事项1、系统是正版软件。

2、软件安装前,起好计算机名称。

否则软件安装好后,更改计算机名称,程序运行会不正常。

3、安装软件案件时登陆的用户要有管理员权限,并且有密码。

4、如果是服务器,并且要重新安装系统,要用服务器的引导盘先安装必要的组件,再通过引导盘安装系统。

5、安装Microsoft Office软件Information:Microsoft Office 2007 SP2 or Microsoft Office 2010 (32-bit only) Historian Client:Microsoft Office XP SP3, 2003 SP3, 2007 SP2 or 2010 (32-bit only)具体可见ArchestrA System Platform 2012的readme。

初学者必读的SQL数据库基础教程

初学者必读的SQL数据库基础教程

初学者必读的SQL数据库基础教程SQL数据库是一种常用的数据库管理系统,广泛应用于各种软件开发和数据管理领域。

对于初学者来说,掌握SQL数据库的基础知识是非常重要的。

本文将从数据定义语言、数据操作语言、数据查询语言和数据控制语言等方面,为初学者提供一份必读的SQL数据库基础教程。

第一章数据定义语言(DDL)数据定义语言(DDL)是SQL数据库中用来定义数据库结构的语言。

它包括创建、修改和删除数据库、表、列以及其他对象的操作。

在SQL中,创建数据库使用CREATE DATABASE语句,创建表使用CREATE TABLE语句,修改表结构使用ALTER TABLE语句,删除表使用DROP TABLE语句等。

初学者在学习时应该了解这些常用的DDL语句,并能够正确地使用它们。

第二章数据操作语言(DML)数据操作语言(DML)是SQL数据库中用来对数据库中的数据进行操作的语言。

它包括插入、更新和删除数据的操作。

在SQL中,插入数据使用INSERT INTO语句,更新数据使用UPDATE语句,删除数据使用DELETE FROM语句等。

初学者需要熟悉这些基本的DML语句,并能够通过它们来操作数据库中的数据。

第三章数据查询语言(DQL)数据查询语言(DQL)是SQL数据库中用来查询数据库中的数据的语言。

它包括SELECT语句和一些用于过滤、排序和聚合数据的函数。

初学者需要掌握SELECT语句的基本用法,了解如何使用WHERE子句进行条件过滤,如何使用ORDER BY子句进行排序,以及如何使用GROUP BY子句进行数据聚合。

第四章数据控制语言(DCL)数据控制语言(DCL)是SQL数据库中用来控制数据库访问权限和事务处理的语言。

它包括GRANT和REVOKE语句用于授权和撤销权限,以及BEGIN TRANSACTION、COMMIT和ROLLBACK语句用于管理事务。

初学者需要了解如何使用DCL语句来管理数据库的安全性和事务一致性。

wonderware ide 培训的手册文档第20章,共21章

wonderware ide 培训的手册文档第20章,共21章

Lab 20 –Configuring RedundancyIntroductionIn this lab, you will configure a second network connection in Windows for use as the Redundancy Message Channel. Then, you will configure the Galaxy platforms and engines for redundancy. Finally, you will create the hosting relationship, deploy the changes, and force a failover to confirm the functionality.ObjectivesUpon completion of this lab, you will be able to:Configure a secondary network connection in Windows as the Redundancy Message Channel Configure WinPlatform and AppEngine objects for redundancyCreate a deployment model for redundant enginesForce a failover on a redundant systemConfigure Windows for RedundancyIn the following steps, you will configure a second network connection in Windows as the Redundancy Message Channel (RMC). This will need to be done on both computers, where the first is the computer where GRPlatform is deployed and the second is the computer where AOSPlatform1is deployed.1.Connect to the machine where the GRPlatform is installed [for the remote computer, this will be themachine where the AOSPlatform1in installed].2.Open Network Connections(Start | Control Panel | Network and Sharing Center).3.Click Change adapter settings.The Network Connections window appears.4.Right-click Local Area Connection and select Rename.5.Rename the connection ArchestrA.6.Right-click Local Area Connection 2and select Rename.7.Rename the connection RMC.8.Press Alt+N to unhide the Menu bar.9.On the Advanced menu, select Advanced Settings.The Advanced Settings dialog box appears.10.In the Connections area, select ArchestrA and click the Up Arrow button.The ArchestrA connection is now listed first.11.Click OK.12.In the Network Connections window, right-click RMC and select Properties.The RMC Properties dialog box appears.13.In the This connection uses the following items area, select Internet Protocol Version 4(TCP/IPv4).14.Click the Properties button.The Internet Protocol Version 4 (TCP/IPv4) Properties dialog box appears.15.Click the Use the following IP address option.16.In the IP address field, enter 192.168.1.1. [For the remote computer, this will be 192.168.1.2]17.Click in the Subnet mask field to automatically assign the subnet mask.18.In the bottom-right of the window, click the Advanced button.The Advanced TCP/IP Settings dialog box appears.19.On the DNS tab, uncheck the Register this connection’s addresses in DNS check box.20.Click OK.21.In the Internet Protocol Version 4 (TCP/IPv4) Properties dialog box, click OK.22.In the RMC Properties dialog box, click Close.23.Repeat Steps 1to 22on the remote computer where AOSPlatform1is deployed. The IP address thatwill be used on the remote computer will be 192.168.1.2.Configure the Platforms for RedundancyYou will now return to the ArchestrA IDE and configure the platforms for redundancy.24.In the Deployment view, open the GRPlatform configuration editor.25.In the Redundancy area, Redundancy message channel IP address field, enter 192.168.1.1.26.Save and close the configuration editor.27.In the Check In dialog box,Comment field, enter Redundancy configuration and click OK.28.Open the AOSPlatform1configuration editor.29.In the Redundancy group, Redundancy message channel IP address field, enter 192.168.1.2.30.Save and close the configuration editor.31.In the Check In dialog box,Comment field, enter Redundancy configuration and click OK.The Deployment view now displays that both platforms have pending changes.You will redeploy the platforms later in this lab.Configure AppEngine1 for RedundancyYou will now configure AppEngine1for redundancy. Since AppEngine1is currently deployed, you must first undeploy it.32.Right-click AppEngine1and select Undeploy.33.In the Undeploy dialog box, keep the default options and click OK.34.When the Undeploy progress is complete, click Close.35.Open the AppEngine1 configuration editor.36.On the Redundancy tab, check the Enable Redundancy check box.The Redundancy configuration settings auto populate with the default values.37.Keep the defaults and click Save and close.38.In the Check In dialog box,Comment field, enter Redundancy configuration and click OK.The Deployment view now displays the AppEngine1icon with the primary redundant engine icon.39.Expand the Unassigned Host folder to reveal the new backup application engine instance.This was automatically created when redundancy was enabled in AppEngine1.You will now have GRPlatform host the new AppEngine1 (Backup) object.40.Drag and drop AppEngine1 (Backup)onto GRPlatform.Now, you will redeploy the platforms.41.Select both the AOSPlatform1and the GRPlatform.42.Right-click either platform and select Deploy.43.Keep the default options and click OK.44.When the Deploy progress is complete, click Close.45.Return to Object Viewer.Because the platforms redeployed, you will get the following error in Object Viewer.46.Click OK.Object Viewer closes.You will now deploy the application engines using the Include Redundant Partner option.47.In the Deployment view, right-click AppEngine1and select Deploy.48.In the Deploy dialog box, check the Include Redundant Partner check box.49.Click OK.50.When the Deploy progress is complete, click Close.The Deployment view now displays that all objects have been deployed.View the Redundancy Functionality and Data in RuntimeYou will now use Object Viewer and observe selected AppEngine1attributes in the runtime environment. You will then force a failover and observe the changes.51.In the Deployment view, right-click AppEngine1and select View in Object Viewer.52.On the File menu, select Load Watch List.53.Navigate to C:\Training and select MyWatchWindow.54.Click Open.55.Add the following attributes to the watch window:HostRedundancy.IdentityRedundancy.StatusRedundancy.PartnerPlatformRedundancy.PartnerStatusRedundancy.FailoverOccurredRedundancy.ForceFailoverCmdThe watch window displays that AOSPlatform1is currently hosting AppEngine1and the redundancy status is active. Additionally, the GRPlatform is the partner platform and is currently in a Standby mode.56.Save the watch window.You will now force a failover to trigger redundancy and observe the changes.57.In the watch window, double-click AppEngine1.Redundancy.ForceFailoverCmd.The Modify Boolean Value dialog box appears.58.Click the True option and click OK.After a few seconds, the watch window displays GRPlatform as the host platform andAOSPlatform1as the partner platform.You will now refresh Object Viewer to view the changes.59.In the console tree pane, collapse and expand AOSPlatform1and GRPlatform.The pane now displays that AOSPlatform1is no longer hosting any objects and GRPlatform is now hosting all of the objects.60.Click the Mixer1tab.The watch window displays that all attributes are still running and producing good quality data.Lab 20–Configuring Application Redundancy 9-33Application Server 201261.On the Mixer2watch window, observe the same behavior.You will now force another failover to return to the primary redundancy configuration.62.In the Redundancy watch window, double-click AppEngine1.Redundancy.ForceFailoverCmd .63.In the Modify Boolean Value dialog box, click the True option and click OK .After a few seconds, the watch window displays AOSPlatform1as the host platform andGRPlatform as the partner platform.You can also observe what happens when the connection to the remote computer loses connectivity.64.Disable the RMC network connection.After a few seconds, the watch window now displays that the Standby Status isActive –Standbynot Available.9-34Module 9–RedundancyInvensys Learning Services 65.Reenable the RMC connection.After a few seconds, the watch window displays the Standby Statusis back to Active .。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1Wonderware InSQL Server 8.0IndustrialSQL Server1IndustrialSQL ServerMicrosoft SQL ServerMicrosoft SQL Server=IndustrialSQL ServerMicrosoft SQL Server-=IndustrialSQL ServerIndustrialSQL Server?=FactorySuiteIndustrialSQL ServerSQLWonderware InSQL Server 8.01-WonderwareFactorySuiteInTouchIndustrialSQL ServerIndustrialSQL ServerWonderware I/O serversIndustrialSQL Serverout of the boxTagIndustrialSQL ServerMicrosoft ExcelIndustrialSQL Trend3Wonderware InSQL Server 8.0IndustrialSQL Server1==SQL,10,0005,000OracleWonderware InSQL Server 8.01IndustrialSQL ServerMicrosoft SQL Serverloss-less=IndustrialSQLServerI/O Server5Wonderware InSQL Server 8.0IndustrialSQL Server=AnalogHistory, DiscreteHistory, StringHistoryWonderware InSQL Server 8.01====OLE DB=Microsoft SQL Server 2000=SP2 for MS SQL Server =Industrial SQL Server 8.0=InControlIndustrialSQL ServerMicrosoft SQL Server 2000InSQL Console7Wonderware InSQL Server 8.0IndustrialSQL Server=Runtime DatabaseRun80dat.Mdf30 MB10 MB10%Microsoft SQL ServerIndustrialSQL Server 7.0Wonderware InSQL Server 8.01IndustrialSQL Server50%Windows30,0001225=P2 400=256 MB RAM =100 MBService Pack 2=270 MB22250=P3 866=256 MB RAM =100 MBService Pack 2=270 MB3112509Wonderware InSQL Server 8.0IndustrialSQL ServerService Pack 2=Microsoft SQL Server 2000IndustrialSQL Server100,0005,000Service Pack 2=270 MBIndustrialSQL Server=Microsoft Windows NT 4.0, Service Pack 6a=Internet Explorer 5.5 =20 MBPDFWonderware InSQL Server 8.01IDAS:IDASWindows 2000Windows NTIndustrialSQL ServerSQL ServerIDASIDASIndustrialSQL ServerIDASIDAS==Microsoft SQL Server=11Wonderware InSQL Server 8.0IndustrialSQL ServerPerformance MonitorInSQLWonderware InSQL Server 8.02IndustrialSQL ServerIndustrialSQL ServerIndustrialSQL Server1MS SQL ServerSP2MS SQL ServerMicrosoft SQL 200013Wonderware InSQL Server 8.0MS SQL Server 2000 CD-ROMSQL Server 2000 ComponentsInstall ComponentsWonderware InSQL Server 8.02IndustrialSQL Server3.Computer NameInstallation SelectionSQL ServerUpgrade, remove or add components...5.15Wonderware InSQL Server 8.0User InformationWonderware InSQL Server 8.02IndustrialSQL Server9.CD KeyCD-KeyInstallation Definition17Wonderware InSQL Server 8.014.16.Wonderware InSQL Server 8.02IndustrialSQL Server17.Next18.studentNext19Wonderware InSQL Server 8.020.21.NextWonderware InSQL Server 8.02IndustrialSQL Server27.pro-cessors1Continue21Wonderware InSQL Server 8.0Windows 2000 Server-SP2Welcome2.Wonderware InSQL Server 8.02IndustrialSQL Server4.23Wonderware InSQL Server 8.08.Wonderware InSQL Server 8.02IndustrialSQL Server11.Next25Wonderware InSQL Server 8.0Instance NameNext15.Wonderware InSQL Server 8.02IndustrialSQL Server16.Finish27Wonderware InSQL Server 8.0CD-ROMsetup2.Wonderware InSQL Server 8.02IndustrialSQL ServerTypicalCompactCustomlActive Event29Wonderware InSQL Server 8.0User Information6.7.Wonderware InSQL Server 8.02IndustrialSQL Server8.31Wonderware InSQL Server 8.0Username<blank>Wonderware InSQL Server 8.02IndustrialSQL ServerHoldingSelect Program FolderNext33Wonderware InSQL Server 8.0Next15.Wonderware InSQL Server 8.02IndustrialSQL ServerCommon Componentssa35Wonderware InSQL Server 8.0Wonderware InSQL Server 8.02IndustrialSQL ServerSetup CompleteFinish37Wonderware InSQL Server 8.0- LicensingInSQL 8.0License ValidationTag CountEnforcementLicense ValidationWonderwareTag Count EnforcementMicrosoft SQL Server Query AnalyzerIndustrialSQL ServerWonderware InSQL Server 8.02IndustrialSQL Server1.2.3.39Wonderware InSQL Server 8.0OKLicense UtilityWindowsX\ Program Files\ FactorySuite\ Common\ License\Wonderware InSQL Server 8.033- InSQL Console3TagTagsI n S QLConfigure41Wonderware InSQL Server 8.0InSQL ConsoleWindowsIndustrialSQLServerIndustrialSQL ServerIndustrialSQL ServerInSQL ConsoleQuery AnalyzerInSQLWonderware InSQL Server 8.03-52HeadroomIndustrialSQL Server2.Configuration EditorInSQL Con-s o le43Wonderware InSQL Server 8.0:10040HeadroomString PropertiesWonderware InSQL Server 8.010,000Value15OKInSQL Console45Wonderware InSQL Server 8.0TimeSyncMasterProperties1.2.SQL ServerOKWonderware InSQL Server 8.0Management ConsoleAll Tasks/Review License Information...7.8.InSQLDisplay InSQL Server state inconsole10.Configuration Editor2.Start InSQL...47Wonderware InSQL Server 8.0StatusInSQLItem3InTouchInSQL 81. Configuration ManagerWonderware InSQL Server 8.0Import Tags...Tag Importer Wizard-WelcomeNext4.49Wonderware InSQL Server 8.0OpenNextWonderware InSQL Server 8.0Bypass Uniqueness StringNextOK。

相关文档
最新文档