His T Client
His T Client
Copyright
2006 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 South Lake Forest, CA 92630 U.S.A. (949) 727-3200 http://www.wonderware.com For comments or suggestions about the product documentation, send email to [email protected].
Trademarks
All 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, FactoryFocus, FactoryOffice, FactorySuite, FactorySuite A2, InBatch, InControl, IndustrialRAD, IndustrialSQL Server, InTouch, InTrack, MaintenanceSuite, MuniSuite, QI Analyst, SCADAlarm, SCADASuite, SuiteLink, SuiteVoyager, WindowMaker, WindowViewer, Wonderware, and Wonderware Logger are trademarks of Invensys plc, its subsidiaries and affiliates. All other brands may be trademarks of their respective owners.
Contents
Welcome.......................................... 31
Documentation Conventions.............................................31 Technical Support .............................................................32
Contents
SQL Statements in the Trend and Query Applications................................................... 46 Error Reporting .......................................................... 46 Reliability and Performance ......................................47 Example Server Configuration for HTTP Access ..... 48 Considerations for VPN Access .....................................49 Status Bar..........................................................................50 Tag Picker..........................................................................51 Using the Servers Pane..................................................52 Showing/Hiding the Servers Pane............................. 52 Editing Groups ...........................................................53 Viewing Server Details .............................................. 54 Using the Tags Pane ......................................................55 Using the Filter Pane.....................................................55 Showing/Hiding the Tag Picker.....................................57 Tag Picker Views ............................................................57 Time Picker........................................................................58 Viewing Program and License Information.....................59
Contents
Scaling Tags....................................................................81 Showing a Single Scale on the Value Axis ................82 Showing Multiple Scales on the Value Axis .............84 Showing Cursor Values on the Value Axis ...............87 Scaling Tags Up or Down...........................................87 Automatically Scaling Tags .......................................89 Returning Tags to Their Original Scale ....................90 Moving Tags Up or Down in the Chart .....................90 Using Rubber Band Scaling ....................................91 Panning in the Trend Chart ..........................................93 Using Axis Cursors.........................................................94 Moving a Cursor .........................................................95 Showing/Hiding the Axis Cursors .............................95 Showing/Hiding the Cursor Difference .....................95 Zooming...........................................................................95 Showing/Hiding the Chart Grid ....................................96 Viewing Trend Data in a Table Format ...........................97 Viewing the Data Log in a Narrow Format ...............98 Viewing the Data Log in a Wide Format..................100 Viewing Statistics.........................................................101 Using Annotations...........................................................103 Adding an Annotation ..................................................103 Viewing the Annotation List........................................105 Editing an Annotation..................................................106 Deleting an Annotation................................................106 Saving the Annotations List as a .CSV File................107 Printing Annotations....................................................107 Trending Events ..............................................................109 Using Absolute or Relative Times ..................................110 Using Absolute Time ....................................................110 Using Relative Time.....................................................112 Switching Between Absolute and Relative Time: Example....................................................................113 Time Offset Formats ................................................114 Using Time Offsets to Compare Data .........................115 Configuring Trend Application Options.........................120 Configuring Retrieval Options.....................................120 Configuring Color Options ...........................................122 Configuring Time Zone Options ..................................123 Configuring Miscellaneous Options ............................125 Configuring Other Options ..........................................126 Configuring Trend File Properties .................................128
Contents
Configuring General Properties .................................. 129 Configuring Color Properties....................................... 130 Configuring Axis Properties ........................................ 132 Configuring Limit Properties ...................................... 133 Configuring Annotation Properties ............................. 135 Configuring Target Region Properties ........................ 136 Working with Scatter Plots............................................. 138 Viewing Data in a Scatter Plot ....................................139 Scaling Tags in a Scatter Plot ..................................... 141 Configuring Axes in a Scatter Plot.......................... 141 How Are Value Pairs Matched?................................... 142 Quality Calculation for Data Points........................ 143 Panning and Zooming in a Scatter Plot ...................... 143 Defining a Target Region for a Scatter Plot ............... 143 Examples for Target Regions in Scatter Plots........ 144 Configuring Scatter Plot Properties ............................ 146 Other Considerations for Working with Scatter Plots148 Outputting Trend Data................................................... 149 Printing Trend Data..................................................... 149 Printing Trend Sets...................................................... 149 Creating a Trend Set................................................ 150 Editing a Trend Set .................................................. 151 Deleting Files in a Trend Set................................... 151 Printing a Trend Set ................................................ 152 Saving Trend Data to a .CSV File ............................... 152 Saving the Trend Chart to an Image File ................... 153 E-mailing a Trend File................................................. 153 Copying a Trend Chart to the Windows Clipboard ....154 Publishing Trends to the ActiveFactory Reporting Website........................................................ 154 Publishing a Static Trend Report................................ 155 Publishing a Dynamic Trend Report........................... 156 Using Trend with a Tablet PC........................................ 157 Annotating a Chart ...................................................... 157 Making Chart Annotations .......................................... 158 Selecting, Copying and Deleting Chart Annotations . 159 Saving, Printing and E-Mailing an Annotated Chart 159 Importing .CRV Data ...................................................... 160
Contents
Columns Pane...............................................................163 Results Pane .................................................................163 Status Bar.....................................................................165 Working with Query Files...............................................165 Opening an Existing Query File ..................................166 Saving a Query File......................................................166 Creating a Query .............................................................166 Query Types.....................................................................168 Query Type: Aggregate Values ....................................168 Criteria Tab ..............................................................169 Calculations Tab.......................................................170 Query Type: Alarm History .........................................171 Columns tab..............................................................172 Alarm Limits tab ......................................................173 Query Type: Alarm Limits ...........................................174 Query Type: Annotations .............................................174 Criteria Tab ..............................................................175 Query Type: Custom.....................................................176 Query Type: Event History Values..............................176 Columns Tab.............................................................177 Query Type: Event Snapshot .......................................177 Tag Set Tab...............................................................178 Columns Tab.............................................................178 Query Type: Favorites..................................................180 Query Type: History Values.........................................180 Columns Tab.............................................................181 Criteria Tab ..............................................................183 Retrieval Tab ............................................................184 Query Type: IO Server .................................................185 Query Type: Live Values..............................................186 Columns Tab.............................................................186 Query Type: Number of Tags.......................................187 Query Type: Server Version.........................................187 Query Type: Storage.....................................................187 Query Type: Storage Size Available ............................189 Query Type: Storage Start Date ..................................189 Query Type: Summary Values.....................................189 Columns Tab.............................................................190 Calculations Tab.......................................................191 Query Type: Tag Details ..............................................191 Query Type: Tag Search...............................................193 Search Tab ................................................................194 Query Type: Time Running .........................................195
Contents
Common Tabs for Query Types ................................... 195 Time Tab ................................................................... 195 Format Tab ............................................................... 196 Retrieval Tab ............................................................ 197 Source Tab ................................................................ 198 Order Tab.................................................................. 199
Contents
Common Properties for Tag Values.............................247 Display Options Tab.................................................247 Format Tab ...............................................................248 Criteria Tab ..............................................................249 Order Tab..................................................................251 Analyzing Tag Data.........................................................252 Analog Tag Analysis.....................................................253 Batch Analysis ..............................................................260 Scatter Analysis............................................................264 Discrete Tag Analysis...................................................268 Analog Values at Discrete Transition Analysis ..........273 Analog/Discrete Pair Analysis .....................................277 Creating a Direct Query..................................................280 Configuring Workbook Options ......................................283 Configuring Global Formatting Options .....................283 Referencing Formatting Options in a Query ..............285 Using a Named Range for Formatting Options ..........287 Changing Formatting Options in Named Range........288 Configuring Time Zone Options ..................................289 Configuring Data Source Options................................290 Configuring General Options.......................................291 Setting the Base Date and Base Time Parameters ....292 Using "Binding" Options ..............................................293 Creating a Bound Report .........................................294 Considerations for Changing Binding Values.........296 Time Options for Queries.............................................297 Bound times ..............................................................297 Relative time.............................................................297 Absolute time ............................................................297 Publishing Reports ..........................................................298 Publishing a Static Workbook Report .........................299 Publishing a Dynamic Workbook Report ....................300 ActiveFactory Workbook Function Reference................302 Function Arguments ....................................................308 ActionType ................................................................308 AggCalc .....................................................................308 DataSource................................................................308 DateTime ..................................................................308 Description................................................................308 DescriptionFilter ......................................................308 DetectDatetime.........................................................309 DetectorType.............................................................309 DisplayAsWide .........................................................309
ActiveFactory Software Users Guide
10
Contents
DisplayDatetime....................................................... 309 DisplayFlags ............................................................. 309 DisplayMilliseconds ................................................. 311 DisplayQuality.......................................................... 311 EdgeDetection........................................................... 311 EngUnit .................................................................... 312 EURange................................................................... 312 HistoryVersion.......................................................... 312 Interpolation ............................................................. 313 Logged ....................................................................... 313 MaxLength................................................................ 313 Messages ................................................................... 313 OptionRange ............................................................. 314 OrderBy .................................................................... 314 QualityRule............................................................... 314 RawRange ................................................................. 314 ReplacePoorQuality.................................................. 314 Reset.......................................................................... 315 RetrievalMode .......................................................... 315 RowLimit .................................................................. 315 RowOrRes ................................................................. 315 ScanRate ................................................................... 315 SnapshotTagRange .................................................. 316 SnapshotTagType..................................................... 316 State .......................................................................... 316 StateCalculation....................................................... 316 Status ........................................................................ 316 SQLQuery ................................................................. 316 Storage ...................................................................... 316 SummaryPeriod........................................................ 317 SummaryType .......................................................... 317 TagCriteria ............................................................... 317 TagFilter ................................................................... 317 TagRange .................................................................. 317 Time1 ........................................................................ 317 Time2 ........................................................................ 317 TimeDeadband .........................................................318 TimestampRule ........................................................ 318 ValueCriteria ............................................................ 318 ValueDeadband ........................................................ 318 Error Messages for Functions...................................... 319 Migrating History Data Retrieval Functions ............. 319 Viewing IndustrialSQL Server Historian Details ......... 321
Contents
11
12
Contents
AllowGridEditing ..................................................... 361 AlwaysUseFullForXYScatterPlots .......................... 361 AnalogPlottingAlgorithm......................................... 362 ApplyRubberBandToAllTags ................................... 362 AutoRefreshMode ..................................................... 363 BackColor.................................................................. 364 BackGradient............................................................ 364 BackGradientEndColor............................................ 365 BackImage ................................................................ 365 BorderColor .............................................................. 365 BorderStyle ............................................................... 366 BorderWidth ............................................................. 366 ChartType ................................................................. 366 CurrentServerName................................................. 367 CurrentTagColor ...................................................... 367 CurrentTagCycleCount ............................................ 367 CurrentTagEffectiveRetrievalMode ........................ 368 CurrentTagFormat................................................... 368 CurrentTagHistoryVersion...................................... 369 CurrentTagIndex...................................................... 369 CurrentTagInterpolationType ................................. 370 CurrentTagName ..................................................... 370 CurrentTagNumStyles............................................. 371 CurrentTagOffsetMS ............................................... 371 CurrentTagPenStyle ................................................ 372 CurrentTagPenWidth .............................................. 373 CurrentTagPrecision................................................ 373 CurrentTagQualityRule........................................... 373 CurrentTagResolution ............................................. 374 CurrentTagRetrievalMode....................................... 375 CurrentTagRetrievalStyle ....................................... 375 CurrentTagRowLimit............................................... 376 CurrentTagStartDate .............................................. 376 CurrentTagState ...................................................... 377 CurrentTagStateCalculation ................................... 377 CurrentTagTargetRegionVisible ............................. 378 CurrentTagTimeDeadband...................................... 378 CurrentTagTimeStampRule ....................................378 CurrentTagTrendType ............................................. 379 CurrentTagUseAutoCycles ...................................... 379 CurrentTagUseResolution ....................................... 380 CurrentTagValAtX1 ................................................. 381 CurrentTagValAtX2 ................................................. 381
Contents
13
CurrentTagValueDeadband.....................................381 CurrentValOfX1 .......................................................382 CurrentValOfX2 .......................................................382 CurrentValOfY1 .......................................................383 CurrentValOfY2 .......................................................383 CurrentXAxisTagIndex ............................................383 CurrentXAxisTagName ...........................................384 CurrentXAxisTagServerName ................................384 CyclicRows ................................................................384 DataPointLabelType ................................................385 DateMode ..................................................................385 DatePickerFormatString .........................................386 DefaultTagFormat....................................................386 DefaultTagPrecision.................................................387 EnableDeltaRetrieval...............................................387 EnableSummaryData...............................................388 EnableTimeOffsets ...................................................388 EndDate ....................................................................388 FileName...................................................................389 GridColor ..................................................................389 GridHorizontal..........................................................389 GridVertical ..............................................................390 GridVisible ................................................................390 HideCurrentTag .......................................................390 HighlightCurrentTag ...............................................390 HistorySource ...........................................................391 LiveModeRate ...........................................................391 LockDown .................................................................391 LoginTimeout............................................................392 MaxDeltaSamples ....................................................392 MaxMinutesForDeltaAnalog ...................................393 MaxMinutesForDeltaDiscrete .................................393 MaxSamplesPerTag .................................................394 MovingAverageMode ................................................394 MovingAverageSamples...........................................394 NumDataPointLabels...............................................395 NumTimeAxisGridPerValue....................................395 NumTimeAxisValues ...............................................395 NumXValueAxisGridLinesPerLabel .......................396 NumXValueAxisLabels ............................................396 NumYAxisGridPerValue..........................................396 NumYAxisValues .....................................................397 PanPercentage ..........................................................397
14
Contents
PlaybackSpeed.......................................................... 397 PlotColor ................................................................... 398 PlotGradient ............................................................. 398 PlotGradientEndColor ............................................. 399 PlotImage.................................................................. 399 PrintShowActiveTag ................................................ 399 PrintShowMarkers ................................................... 400 PrintShowTitle .........................................................400 PrintTitle .................................................................. 401 PublicAnnotations .................................................... 401 QueryTimeout........................................................... 401 RealTimeMode.......................................................... 402 RealTimeRate ........................................................... 402 RetrievalOptionsCycleCount ................................... 402 RetrievalOptionsHistoryVersion ............................. 403 RetrievalOptionsInterpolationType ........................ 403 RetrievalOptionsNumStyles ....................................404 RetrievalOptionsQualityRule .................................. 404 RetrievalOptionsResolution..................................... 405 RetrievalOptionsRetrievalMode .............................. 406 RetrievalOptionsRetrievalStyle .............................. 406 RetrievalOptionsRowLimit ...................................... 407 RetrievalOptionsState.............................................. 407 RetrievalOptionsStateCalculation .......................... 408 RetrievalOptionsTimeDeadband ............................. 408 RetrievalOptionsTimeStampRule ........................... 409 RetrievalOptionsUseAutoCycles ............................. 409 RetrievalOptionsUseResolution .............................. 410 RetrievalOptionsValueDeadband............................ 411 RetrieveAnnotations ................................................ 411 RetrieveExtensionData ............................................ 411 RetrieveManualData................................................ 412 RTRate ...................................................................... 412 Rubberband .............................................................. 412 RubberbandAll.......................................................... 413 RubberBandScaling.................................................. 413 Servers ...................................................................... 414 ShowLimits ............................................................... 414 ShowValuesAtCursor ............................................... 414 ShowWaitCursor ...................................................... 415 ShowXAxisCursors................................................... 415 ShowYAxisCursor .................................................... 415 SingleTagMode .........................................................416
Contents
15
StartDate ..................................................................416 SummaryDataMode .................................................416 SupressErrors ...........................................................416 TagGridOrientation..................................................417 TagPicker ..................................................................417 TagPickerVisible.......................................................417 TargetRegionExcursionType ...................................418 TargetRegionOpacity ...............................................418 TimeBarVisible.........................................................418 TimeBarVisible2.......................................................419 TimeSelector .............................................................419 ToolBarVisible ..........................................................419 ToolbarVisible2.........................................................420 ToolTipText...............................................................420 TraceGradientEndingPercentage ............................420 TraceGradientStartingPercentage ..........................420 TraceGradientType ..................................................421 UpdateToCurrentTimeState....................................421 UseIniFile .................................................................422 ValueAxisLabel.........................................................422 XCursor1Color ..........................................................422 XCursor1Pos .............................................................423 XCursor2Color ..........................................................423 XCursor2Pos .............................................................424 YCursor1Color ..........................................................424 YCursor2Color ..........................................................425 ZoomOutPercentage .................................................425 aaHistClientTrend Methods ........................................425 AboutBox...................................................................428 AddAnyTag ...............................................................428 AddServer .................................................................429 AddTag ......................................................................429 ClearTags ..................................................................430 CurrentTagGetStyle.................................................430 DeleteCurrentTag.....................................................430 FileNew .....................................................................431 FileOpen....................................................................431 FileSave.....................................................................431 GetMenuItemEnabled..............................................432 GetTagColor..............................................................432 GetTagFormat ..........................................................433 GetTagOffsetMS .......................................................433 GetTagPenStyle........................................................434
16
Contents
GetTagPenWidth...................................................... 435 GetTagPrecision ....................................................... 436 GetTagValAtX1 ........................................................ 436 GetTagValAtX2 ........................................................ 437 GetTagVisible ........................................................... 438 GetToolbarButtonEnabled....................................... 439 GraphStack............................................................... 439 LoadCRVString ........................................................ 439 LoadTargetRegionFromFile..................................... 439 ManualConnect ........................................................ 440 MoveNextTag............................................................ 440 MovePrevTag ............................................................ 440 PanLeft ..................................................................... 441 PanRight ................................................................... 441 PrintGraph ............................................................... 441 PrintGraphDlg.......................................................... 442 PropertiesDlg............................................................ 442 RefreshData.............................................................. 442 RemoveServer........................................................... 442 RemoveTag ............................................................... 443 RetrievalOptionsGetStyle ........................................ 443 SaveData................................................................... 444 SaveImage ................................................................ 445 SaveSettings ............................................................. 445 ScaleAllTags ............................................................. 445 ScaleAllTagsDlg ....................................................... 446 ScaleAutoAllTags ..................................................... 446 ScaleAutoTag............................................................ 447 ScaleDownAllTags.................................................... 447 ScaleDownTag .......................................................... 448 ScaleMoveAllTagsDown........................................... 448 ScaleMoveAllTagsUp ............................................... 449 ScaleMoveTagDown ................................................. 450 ScaleMoveTagUp...................................................... 450 ScaleTag.................................................................... 451 ScaleTagDlg .............................................................. 451 ScaleUpAllTags ........................................................ 452 ScaleUpTag............................................................... 452 SetCurrentTag.......................................................... 453 SetCurrentTagXAxisTag ......................................... 453 SetCurrentTagXAxisTagIndex ................................ 454 SetDates.................................................................... 454 SetDuration .............................................................. 455
Contents
17
SetMenuItemEnabled ..............................................456 SetTagColor ..............................................................457 SetTagFormat...........................................................458 SetTagColorDlg ........................................................458 SetTagOffsetMS .......................................................459 SetTagPenStyle ........................................................460 SetTagPenWidth ......................................................461 SetTagPrecision ........................................................461 SetTagVisible............................................................462 SetTimeSpan ............................................................463 SetToolbarButtonEnabled .......................................463 UnsetCurrentTagXAxisTag .....................................465 ZoomIn ......................................................................465 ZoomOut....................................................................465 aaHistClientTrend Events ...........................................466 CurrentTagChanged ................................................466 DatesChanged...........................................................467 StateChanged ...........................................................467 TagDisplayChanged .................................................467 TaglistChanged.........................................................468 aaHistClientTrend Enumerations..................................468 aaChartType Enumeration ..........................................469 aaDashStyle Enumeration...........................................469 aaDataPointLabelingType Enumeration ....................470 aaDateModeEnumeration Enumeration.....................470 aaInterpolationType Enumeration..............................470 aaQualityRules Enumeration......................................470 aaRetrievalMode Enumeration ...................................471 aaRetrievalVersion Enumeration................................472 aaStateCalculation Enumeration................................472 aaTargetRegionExcursionType Enumeration ............472 aaTimeStampRules Enumeration ...............................473 aaTraceGradientType Enumeration ...........................473 aaTrendGradientType Enumeration...........................473 aaTrendType Enumeration..........................................474 aaTrendValueFormat Enumeration............................474 aaUpdateToCurrentTimeState Enumeration.............474 aaValueAxisLabelEnumeration Enumeration ...........475 Using aaHistClientTrend in a Multi-Monitor Environment.................................................................475
18
Contents
Contents
19
ShowAbout ................................................................492 aaHistClientQuery Events...........................................492 ModeChanged ...........................................................492 QueryChanged ..........................................................493 ServerChanged .........................................................493 aaQueryTypeEnumeration ..........................................493
20
Contents
Contents
21
Password ...................................................................526 RefreshFrequency.....................................................526 Row............................................................................527 RowCount..................................................................527 ServerName ..............................................................527 ShowErrorDlgs .........................................................528 ShowNavigatorBar ...................................................528 SQLString .................................................................528 UserName .................................................................529 VirtualDirectoryName .............................................529 aaHistClientActiveDataGrid Methods ........................529 ClearGrid ..................................................................530 ColumnName ............................................................530 ColumnValue ............................................................530 ColumnValueByName..............................................530 Execute......................................................................531 MoveFirst ..................................................................531 MoveLast...................................................................532 MoveNext ..................................................................532 MovePrevious............................................................532 RowColumnValue .....................................................532 RowColumnValueByName ......................................533 ShowPropertiesDialog ..............................................533 SQLAppend...............................................................533 aaHistClientActiveDataGrid Events...........................535 OnClick .....................................................................535 OnDblClick ...............................................................535 OnError.....................................................................535 Script Examples for aaHistClientActiveDataGrid .....537 InTouch Example: History Data Over a LAN.........537 InTouch Example: Retrieving Data from the Grid .537 aaHistClientActiveDataGrid Error Messages ............540
22
Contents
CurrentServerName................................................. 545 DateTime .................................................................. 546 DateTimeFieldDisable ............................................. 546 DateTimeFieldVisible .............................................. 546 DateTimeString........................................................ 547 DisableTagEntry ...................................................... 547 DisplayErrorMessages ............................................. 547 FieldLabelPosition ................................................... 548 FieldLayoutHorizontal............................................. 548 HideDateTimeModeTabs ......................................... 549 HideFieldLabels ....................................................... 549 HideStatusBar.......................................................... 549 InsertButtonDisable................................................. 550 InsertButtonVisible.................................................. 550 InTouchDateTime .................................................... 550 LastErrorDetails ...................................................... 551 LastErrorMessage .................................................... 551 LastOperationResult................................................ 552 LastOperationSuccessful ......................................... 552 Pwd............................................................................ 553 Quality ...................................................................... 553 QualityDetail ............................................................ 553 QualityDetailFieldDisable ....................................... 554 QualityDetailFieldVisible ........................................ 554 QualityFieldDisable ................................................. 554 QualityFieldVisible .................................................. 554 RememberEnteredTags ........................................... 555 Servers ...................................................................... 555 StringValue............................................................... 555 TagName................................................................... 556 TagNameFieldDisable.............................................. 556 TagNameFieldVisible............................................... 556 TagPickerButtonDisable.......................................... 557 TagPickerButtonVisible........................................... 557 Tags........................................................................... 557 TagType .................................................................... 557 TagValid.................................................................... 558 User........................................................................... 558 UseTimezone ............................................................ 559 Value ......................................................................... 559 ValueEx..................................................................... 559 ValueFieldDisable .................................................... 560 aaHistClientSingleValueEntry Control Methods....... 560
Contents
23
AddServer .................................................................560 AddTag ......................................................................561 Connect .....................................................................561 CreateManualTag.....................................................562 Disconnect.................................................................562 Insert .........................................................................562 InsertValue ...............................................................563 Refresh ......................................................................563 Reset..........................................................................564 aaHistClientSingleValueEntry Control Events .........564 Change ......................................................................564 InsertComplete .........................................................565 InsertFail ..................................................................565 TagNameChanged ....................................................565 ValueChanged ..........................................................565 aaFieldLabelPositionEnumeration Enumeration ......566 aaUseTimeZoneEnumeration Enumeration...............566
24
Contents
LogOn........................................................................ 574 aaServers Object ............................................................. 575 aaServers Properties .................................................... 575 ApplicationName...................................................... 575 Count......................................................................... 576 Items ......................................................................... 576 aaServers Methods ....................................................... 576 Add ............................................................................ 576 GetServer .................................................................. 577 Remove...................................................................... 577 Update....................................................................... 577 aaServers Events.......................................................... 578 OnServerAdded ........................................................ 579 OnServerUpdated..................................................... 579 OnServerRemoved.................................................... 579 OnServerStateChange ............................................. 580 Instantiating an aaServers Object .............................. 580 aaServerListChangeArgs Object ....................................581 Properties...................................................................... 581 Server ........................................................................ 581 aaServerStateChangeArgs Object.................................. 581 Properties...................................................................... 581 Server ....................................................................... 581 State .......................................................................... 582 When ......................................................................... 582 Message..................................................................... 582 aaServerState Enumeration.......................................... 583 aaServerType Enumeration............................................ 583
Contents
25
Name .........................................................................588 RawType ...................................................................589 Server ........................................................................589 Type...........................................................................589 TypeAsTagType ........................................................589 Units..........................................................................590
26
Contents
ActiveFactoryReport Object............................................ 616 Report Object Properties.............................................. 616 ReportDate................................................................ 616 ReportTime ............................................................... 617 Report Object Methods................................................. 617 AutoExec ................................................................... 617 AutoExit.................................................................... 617 RunReport................................................................. 617
Chapter 19 Common Properties, Methods, Events, Enums, and Data Types ...................... 621
Common Properties.........................................................621 BackColor...................................................................... 622 BackStyle ...................................................................... 622 BorderStyle................................................................... 623 CausesValidation .........................................................623 Container ...................................................................... 623 ContextMenuEnabled .................................................. 623 DataBindings................................................................ 624 DragIcon ....................................................................... 624 DragMode ..................................................................... 624 Enabled ......................................................................... 625 Font ............................................................................... 625 ForeColor ...................................................................... 625 Height ........................................................................... 626 HelpContextID ............................................................. 626 Index ............................................................................. 626 Left ................................................................................ 626 Name ............................................................................. 627 Object ............................................................................ 627 Parent ........................................................................... 627 TabIndex ....................................................................... 627 TabStop ......................................................................... 628 Tag................................................................................. 628
Contents
27
ToolTipText...................................................................628 Top.................................................................................628 Transparent ..................................................................629 Visible............................................................................629 WhatsThisHelpID.........................................................629 Width.............................................................................630 Common Methods............................................................630 Drag...............................................................................630 Move ..............................................................................630 SetFocus ........................................................................631 ShowWhatsThis............................................................631 ZOrder ...........................................................................631 Common Events...............................................................631 Click ..............................................................................632 DblClick ........................................................................632 DragDrop ......................................................................632 DragOver.......................................................................632 GotFocus .......................................................................633 KeyDown.......................................................................633 KeyPress .......................................................................633 KeyUp ...........................................................................633 LostFocus ......................................................................634 MouseDown...................................................................634 MouseMove ...................................................................634 MouseUp .......................................................................634 Validate.........................................................................635 Common Enumerations ..................................................635 aaRetrievalSource Enumeration .................................635 aaTagType Enumeration .............................................635 aaTimeRangeEnumeration Enumeration...................636 Common Data Types .......................................................638 DateTime ......................................................................638 Color ..............................................................................638 DataSet .........................................................................639 Font ...............................................................................639 Object ............................................................................639
28
Contents
Appendix A Configuring an IIS Virtual Directory for SQL Server ..................................... 641 Appendix B Understanding Data Retrieval ............... 649
Understanding Retrieval Modes..................................... 649 Cyclic Retrieval ............................................................ 650 Delta Retrieval ............................................................. 652 Full Retrieval................................................................ 653 Interpolated Retrieval.................................................. 654 Best Fit Retrieval ...................................................... 655 Average Retrieval.........................................................659 Minimum Retrieval ...................................................... 663 Maximum Retrieval ..................................................... 665 Integral Retrieval .........................................................666 Slope Retrieval ............................................................. 667 Counter Retrieval .........................................................669 ValueState Retrieval .................................................... 672 Understanding Retrieval Options .................................. 673 Which Options Apply to Which Retrieval Modes?...... 673 Cycle Count (X Values over Equal Time Intervals) ... 674 Resolution (Values Spaced Every X ms) ..................... 675 Time Deadband ............................................................ 676 Value Deadband ........................................................... 677 History Version............................................................. 678 Interpolation Type........................................................ 678 Timestamp Rule ........................................................... 680 Quality Rule.................................................................. 682 Row Limit ..................................................................... 682 State Calculation.......................................................... 683 State ..............................................................................684 Working with Retrieval Styles ....................................... 684 Location and Structure of Retrieval Styles................. 685 Structure of the Retrieval Styles File ..................... 685 Creating and Editing Retrieval Styles ........................ 687 Retrieval Style XML Elements....................................687 styleCollection XML Element .................................. 687 retrievalStyle XML Element ................................... 688 duration XML Element ............................................ 689 retrieval XML Element ............................................ 690 Using the Standard Retrieval Styles .......................... 692 Understanding Relations between Retrieval Styles, Application Settings and Tag Settings ....................... 693
Contents
29
30
Contents
31
Welcome
This guide describes using the Wonderware ActiveFactory software to retrieve data from an IndustrialSQL Server historian. Before you can use the ActiveFactory software, the IndustrialSQL Server historian must be correctly installed and configured and must be running. You can view this document online or you can print it, in part or 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 to application, and moving objects on the screen. If you need help with these tasks, see the Microsoft online help. In some areas of the ActiveFactory software, you can also right-click to open a menu. The items listed on this menu change, depending on where you are in the product. All items listed on this menu are available as items on the main menus.
Documentation Conventions
This documentation uses the following conventions:
Convention Used for
Initial Capitals
Bold Monospace
Paths and filenames. Menus, commands, dialog box names, and dialog box options. Code samples and display text.
32
Technical Support
Wonderware Technical Support offers a variety of support options to answer any questions on Wonderware products and their implementation. Before you contact technical support, refer to the relevant section(s) in this guide for a possible solution to any problem you have with the IDE. 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 solve the problem(s) and your results. If known, the Wonderware Technical Support case number assigned to your problem, if this is an ongoing problem.
33
Chapter 1
Introduction
The Wonderware ActiveFactory software provides a number of client tools to address specific data representation and analysis requirements. These tools remove the requirement to be familiar with the SQL and provide intuitive point-and-click interfaces to access, analyze, and graph both current and historically acquired time-series data.
Explore your data graphically to find important information. Analyze the data to produce relevant information. Develop and execute ad hoc queries against any data stored in the IndustrialSQL Server database. Visualize the current process state. Produce rich automated reports.
34
Chapter 1 Introduction
Desktop Applications
ActiveFactory client tools include the following stand-alone applications:
ActiveFactory Trend. Enables trending of historical and real time data over time. Powerful features allow data to be compared with other data from different periods. Alarms and limit excursions are readily visible. It is also possible to add and view annotations in your trends. For more information, see Chapter 3, ActiveFactory Trend.
ActiveFactory Query. This point-and-click tool enables complex queries to be created and executed against any IndustrialSQL Server historian. Knowledge of the database structure or SQL is not required. For more information, see Chapter 4, ActiveFactory Query.
ActiveFactory Workbook. This add-in to Microsoft Excel enables almost any type of analysis and display of data from an IndustrialSQL Server historian using the Excel spreadsheet format (.xls). For more information, see Chapter 5, ActiveFactory Workbook.
ActiveFactory Report. This add-in to Microsoft Word allows sophisticated reporting from an IndustrialSQL Server historian using the Word document format (.doc). For more information, see Chapter 6, ActiveFactory Report.
Controls
aaHistClientTrend and aaHistClientQuery are controls that provide essential functionality of ActiveFactory Trend and ActiveFactory Query for use in container applications, such as InTouch HMI software and Internet Explorer. You can also use ActiveFactory "building block" controls (such as aaHistClientTagPicker, aaHistClientTimeRangePicker, and so on) in your custom applications. For more information, see Introduction to Controls and Objects on page 347.
35
Average vibration of a motor each day over the last month. Annotation for a discrete tag that was made six months ago. The limit of an analog tag in the context of a normal production mode. The limit of the same analog tag in the context of an accelerated production mode. The values for 50 specified analog tags at a point in time when the value of x was greater than 10. The path to the storage location for a specific tag. 20 evenly distributed data values from the total values stored for an analog tag between 8:00 and 8:30 a.m. on September 12, 2004.
36
Chapter 1 Introduction
All data values at 20 minute intervals from the total values stored for an analog tag between 8:00 and 8:30 a.m. on September 12, 2004. All values of an analog tag stored on January 8, 2004, where the value of the analog tag changed by 10 engineering units. The data for this analog tag was stored if the value changed by 5 engineering units. All values for tags associated with an event boiler trip on January 8, 2004.
Client/Server Architecture
The IndustrialSQL Server client/server architecture allows for flexible and easy-to-use client applications on the desktop, while ensuring the integrity and security of the data on the server. The computing power of both the client and the server are exploited by optimizing processor intensive operations on the server and minimizing data to be transmitted on the network to improve system performance. The following illustration shows one possible network architecture where the IndustrialSQL Server historian is used as the link between the process network and the business LAN/WAN:
37
Real-time data - What is the current value of this tag? Historical data - What was the value of this tag every second last Monday? Summary data - What is the average of each of these five tags? Business data - How much does this particular material cost? Event data - When did that boiler trip? Configuration data - How many I/O Servers am I using and what are their types?
To improve performance and quality, while reducing cost, all of this acquired information must be able to be analyzed. Plant data is typically analyzed to determine:
Process analysis, diagnostics, and optimization. Materials management, such as raw materials usage. Predictive and preventive maintenance of equipment. Product and process quality (SPC/SQC). Health and safety; environmental impact (EPA/FDA). Production reporting. Failure analysis.
38
Chapter 1 Introduction
39
Chapter 2
Common Client Components
Some of the ActiveFactory client applications and controls use a common set of client components.
You open a file that causes data to be retrieved for a tag on that server.
40
You expand a server in the Tag Picker to view its tag list. You manually log on to the server.
On the Tools menu, click Servers. The Server List Configuration dialog box appears.
The Server list window shows a list of connected servers or servers that were configured in the past.
2 3
In the Server box, type the name of the server to which you want to connect. Make sure that you know what options to choose to access the server. For more information, see Server Connection Configuration on page 39. To log on to the server using integrated security, select the Use Integrated security check box and then skip to step 8. To log on to the server using SQL Server credentials, clear the Use Integrated security check box and configure the following login details. Then, skip to step 8.
41
Login ID: Enter your assigned IndustrialSQL Server historian username. If your system administrator has not assigned you a username and password, you may use one of the default user accounts, which are automatically configured during a typical IndustrialSQL Server installation. Password: Enter the password that is associated with the username. Select the Remember password check
To log on to the server over HTTP using integrated security, select both the Use Integrated security check box and the Use HTTP check box and then configure the required options. Then, skip to step 9. Login ID: Enter your Windows user name.
Password: Enter your Windows password. Select the Remember password check box to specify for the
Windows account is validated. The domain name is only valid for HTTP connections to the IndustrialSQL Server historian when integrated security is used.
Base URL: The URL for the server. Virtual directory: The name of the virtual directory on
the server. For more information on HTTP access, see Using HTTP as the Server Connection Protocol on page 43.
7
To log on to the server over HTTP using SQL Server authentication, clear the Use Integrated security check box, select the Use HTTP check box, and then configure the required options. Then, skip to step 9. Login ID: Enter your assigned IndustrialSQL Server historian username. If your system administrator has not assigned you a username and password, you may use one of the default user accounts, which are automatically configured during a typical IndustrialSQL Server historian installation.
Password: Enter the password that is associated with the username. Select the Remember password check
the server.
42
In the Timeouts in seconds area, configure the time allocated for the database connection and the query execution. Connection: The connection timeout in seconds. Valid values are 1 to 600.
Query: The query timeout in seconds. Valid values are
1 to 600.
9
Click Add.
10 Click LogOn to log on to the server. 11 Repeat Steps 2 through 10 to add additional servers. 12 Click Close. An error message appears if a connection
On the Tools menu, click Servers. The Server List Configuration dialog box appears. In the Server List box, select the name of the server to edit. In the Server connection area, edit the details for the server. For more information, see Creating a New Server Connection on page 40. Click Update.
4 5
Click Close. An error message appears if a connection cannot be made to the server, but the server is added to the list.
On the Tools menu, click Servers. The Server List Configuration dialog box appears. In the Server List box, select the name of the server to remove. Click Remove. Click Close.
43
For the required versions of the software and installation instructions, see the ActiveFactory software ReadMe file.
44
No software or special configuration is required on the client, other than what is generally required to support the ActiveFactory client installation.
configuration in the IIS Server always uses a specified user name and password; no user name and password is required to be provided by the client. Either integrated security or SQL server authentication can be used.
Integrated security. The IIS Server must be set up to use
integrated security to authenticate clients. From the client application, you must choose Integrated security in the Server Configuration dialog box, and provide a user name, password, and a domain for authentication.
Basic authentication. For this mode, the IIS Server simply
passes on a user name and password supplied by the client to the SQL Server. This mode is not recommended unless you also use Secured Sockets Layer (SSL) security, which encrypts all the data going over the connection. The integrated security and basic authentication modes require that the client provide a user account, which is passed by the IIS Server to the SQL Server. Note that the configuration of the IIS Server governs the mode of authentication that is required of clients. For example, if the IIS Server is configured to use integrated security, then client users must access the server using integrated security. There is no security in the access mechanism. Using HTTPS provides an additional level of security, but may impact performance.
45
Stateless SQL statements that execute in a native SQL Server access environment execute when SQL Server is accessed over HTTP. However, stateful SQL statements do not function unless they are part of a collection of statements submitted together. If HTTP access is used, and no data rows are returned for a query, no column headers are produced.
SQL Cursors The stateless nature of SQL Server access over HTTP affects the use of SQL cursors.
In a native SQL Server access environment, a connection is made, a cursor is created, and used subsequently until the connection is terminated. The establishment of the connection, creation of the cursor, use of the cursor, and disconnection can all be performed as separate requests. If the SQL Server is accessed HTTP, the establishment of the connection, the execution of any SQL statements that follow, and the disconnection must all be part of a single HTTP request.
Batch Statements The stateless nature of SQL Server access over HTTP affects the use of "batch" SQL statements. For HTTP access, the last SQL statement submitted in a batch must be capable of returning a result set.
For example, the following query does not return a result set over HTTP. This is because the last statement executed does not produce a result set.
SET QUOTED_IDENTIFIER OFF Select ContactName FROM Customers SET QUOTED_IDENTIFIER ON
To address this problem, make sure that the last statement produces a result set. For the example query, the last statement was removed to produce the expected results:
SET QUOTED_IDENTIFIER OFF Select ContactName FROM Customers
To get the same effect as the original batch of statements, you must modify the query so that the results are stored into a temporary table before the SET QUOTED_IDENTIFIER ON statement occurs and then return those results. For example:
CREATE TABLE #temp (Name NVARCHAR(255)) SET QUOTED_IDENTIFIER OFF INSERT INTO #temp SELECT ContactName FROM Customers
46
SET QUOTED_IDENTIFIER ON
If you have any batch queries in which the last SQL statement in the batch does not return a result set, you must restructure the query.
Column Aliases For SQL Server access over HTTP, you must use include column aliases in SQL statements when no columns exist.
For example, when used with native SQL Server access, the following query yields the counts of all tags in the database.
SELECT COUNT(*) FROM Tag
However, the same statement does not produce results in SQL over HTTP. You need to modify the query to use column aliases. For example:
SELECT COUNT(*) as n FROM Tag
Error Reporting
If you are accessing SQL Server over HTTP, query-related errors are not provided. This is a limitation of the SQLXML technology. The only error condition that can be deduced is when no data (not even the table headers) is returned for a request. For this condition, a generic error is returned that prompts you to check the SQL query. If your query is not valid, no specific error message appears, and no data is returned.
47
In general, equivalent operations take three to five times longer if you use SQL over HTTP, as compared to native SQL Server access. Also, it can be considerably slower if you are accessing the server from an external system over the Internet, depending on the Internet connection method. For example, if you are using a dial-up connection. The primary use for HTTP access is for visualization of data. For this type of use, you can expect acceptable performance when updating at refresh rates of one refresh per second. Even over the Internet, visualization at rates of one time every second may be achieved during off-peak hours, and rates of one time every five seconds may result in smooth operation of your applications. Databases that contain about 5000 tags can generally be browsed without problems using the Tag Picker, or when used in constructing trends or queries. However, larger databases are likely to slow down navigation in the Tag Picker when used across the Internet. You may also experience slowed performance if the IIS Server and the SQL Server are not running on the same computer.
48
For more information on configuring a server, see Creating a New Server Connection on page 40.
49
The following illustration shows the dialog box configured for integrated security. Note that even though integrated security is used, the login ID and the password are enabled. This is because this refers to the integrated security on the IIS Server.
50
Status Bar
The status bar allows you to view the status of the connection to the IndustrialSQL Server historian and any other status messages that may be sent by the client.
To show the status bar On the View menu, click Status Bar so that a check mark
appears.
To hide the status bar On the View menu, click Status Bar so that no check mark
appears. The icon at the right side of the status bar indicates the status of the servers that are being used by the ActiveFactory client. The following table describes the status colors and their meanings:
Color Status Meaning
No servers are configured. Connections (log ons) have been established to all servers in the server configuration list. Connections (log ons) have been established to most of the servers in the list. No connections (log ons) have been established to most of the servers in the list. No connections (log ons) have been established to any of the servers in the list.
Double-click the icon to access the Server List Configuration dialog box. For more information, see Server Connection Configuration on page 39.
Tag Picker
51
Tag Picker
The Tag Picker shows which tag groups and tags exist in the database. It shows all of the tags that are visible to the currently logged on user based on his or her permissions. Using the Tag Picker, you can quickly search the database for tags of a certain type and/or for tags that match a particular search pattern. You can then select the ones you want to include for the client application or control.
Servers pane
Tags pane
Filter pane
52
Servers
All objects that make up the basic IndustrialSQL Server system, such as tags, I/O Servers, defined engineering units, storage locations, and so on. All objects that are visible to all clients. If you have administrative permissions, you can create, rename, and delete groups in the public groups folder. All objects that are visible to the user that is currently logged on. Users can create, rename, and delete groups in the private groups folder.
Public Groups
Private Groups
Right-click in the Servers pane and then click Servers pane so that no check mark appears. Click the Close button.
Tag Picker
53
Editing Groups
You can add groups just as you would add a new folder in the Windows Explorer. For example, you can create the "BoilerTags" group under in the existing "Private Groups" group. You can also delete, cut, copy, paste, and drag objects from one folder to another.
Right-click on the folder under which you want to create a group and then click New Group. A new folder appears in the Tag Picker. Type a name for the folder and press ENTER.
Adding a Tag to a Group When you add tags to a new group, the original reference still appears in the default system group. Any tag can belong to any number of groups, and any group can contain any number of tags.
To add a tag to a group 1 2 3
Select the system group folder that contains the tag that you want to add to your new group. In the Tags pane, select the tag to add. Do any of the following: Drag the desired tag from the Tags pane into the folder.
Use the Copy and Paste commands on the Edit menu to copy the tag to the target folder. Right-click on the desired tag in the Tags pane. Use the Copy and Paste commands in the shortcut menu to copy the tag to the target folder.
Deleting a Group or Tag Reference When you delete a private group or tag reference in a private group, the group folder, any subfolders that the group folder may contain, and all references to tags are deleted. The tags themselves are not deleted, and the original references still appear in the default system group. You cannot delete public folders or the tag references contained in them.
To delete a group or tag 1 2
54
Right-click on the group or tag and then click Delete. Press the DELETE key.
Renaming a Group You can rename a group that you have created in the Tag Picker. However, you cannot rename a public folder.
To rename a group 1 2
Select the group in the pane. Do one of the following: Right-click on the group and then click Rename.
In the Servers pane, right-click on a server and then click Server details. The Server Details dialog box appears.
Click OK.
Tag Picker
55
To select multiple tags in the list, hold the CTRL and/or SHIFT key while clicking. To view only tags of a certain type, click the appropriate tab at the bottom of the pane. To sort the table by a particular column, click the column heading.
The filter mechanism allows for the following "wildcard" characters as part of the filter criteria:
Wildcard Character
Filter Function
% _
56
Wildcard Character
Filter Function
[]
Any single character within the specified range or set. For example:
[a-f] [abcdef]
[^]
Any single character not within the specified range or set. For example:
[^a - f] [^abcdef]
For example, to find all tagnames ending with "level," type "%level." Filter criteria are not case-sensitive. When the Servers pane and the Filter pane are both visible, the filter conditions apply to the selected group in the Servers pane. When the Servers pane is hidden, the filter applies to all of the tags for the selected IndustrialSQL Server historian.
To apply a filter 1 2 3 4 5
In the Server box, specify or verify the server. This box is not available if the Servers pane is visible. In the Tag name box, enter the string to match for the tagname. In the Description box, enter the string to match for the description. In the I/O Address box, enter the string to match for the I/O address. Select the Exact match check box to search for tags that exactly match the entire string that you provided for the tagname and/or description options. For example, if you specify "level" as the tagname and do not select Exact match, any tagname that contains the string "level" appears. For example, "ReactLevel," "ProdLevel," and "$AccessLevel." The Exact match option does not apply to the I/O address.
6 7
Click Apply to apply the filter criteria. Click Clear to clear the Filter pane.
Tag Picker
57