His t Client

Embed Size (px)

Citation preview

  • 5/28/2018 His t Client

    1/732

    WonderwareActiveFactory

    Software Users Guide

    Invensys Systems, Inc.

    Revision C

    Last Revision: 12/13/06

  • 5/28/2018 His t Client

    2/732

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

  • 5/28/2018 His t Client

    3/732

    3

    ActiveFactory Software Users Guide

    Contents

    Welcome.......................................... 31

    Documentation Conventions.............................................31

    Technical Support .............................................................32

    Chapter 1 Introduction ...................................... 33About ActiveFactory Software..........................................33

    Desktop Applications......................................................34

    Microsoft Office Add-Ins ................................................34Controls...........................................................................34

    About the IndustrialSQL Server Historian .....................35

    Client/Server Architecture................................................36

    Analyzing Process Data ....................................................37

    Chapter 2 Common Client Components .................. 39Server Connection Configuration.....................................39

    Creating a New Server Connection ...............................40

    Editing a Server Connection..........................................42Removing a Server Connection......................................42

    Using HTTP as the Server Connection Protocol...........43

    Guidelines for Accessing SQL Server over HTTP.....43

    Software Requirements for HTTP Access.................43

    Authentication for HTTP Access ...............................44

    Executing SQL Statements over HTTP ....................44

  • 5/28/2018 His t Client

    4/732

    4 Contents

    ActiveFactory Software Users Guide

    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 .....................................49Status 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............................................................57Time Picker........................................................................58

    Viewing Program and License Information.....................59

    Chapter 3 ActiveFactory Trend .............................61Getting Started with Trend ..............................................61

    Working with Trend Files.................................................62

    Creating a New Trend....................................................63

    Opening an Existing Trend ...........................................63

    Saving a Trend ...............................................................63

    Closing a Trend ..............................................................64

    Undoing/Redoing Actions...............................................64

    Configuring a Trend..........................................................64

    Viewing Tag Definition Information ................................ 65

    Viewing Data in the Trend Chart ....................................66

    Refreshing the Trend Chart ..........................................67

    Deleting a Tag ................................................................67

    Configuring Trend Options for a Tag............................67

    Configuring Display Options .....................................67

    Defining a Target Region for a Tag ...........................70

    Configuring Retrieval Options for a Tag...................75

    Scrolling through Tags in a Trend..............................77

    Highlighting a Tag .........................................................77

    Showing a Single Tag in the Trend............................... 78

    Stacking Traces..............................................................78

    Showing Live Data.........................................................79

    Showing Historical Data in Replay Mode..................80

  • 5/28/2018 His t Client

    5/732

    Contents 5

    ActiveFactory Software Users Guide

    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 .......................................89Returning 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................107Printing 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

  • 5/28/2018 His t Client

    6/732

    6 Contents

    ActiveFactory Software Users Guide

    Configuring General Properties .................................. 129

    Configuring Color Properties.......................................130

    Configuring Axis Properties ........................................132

    Configuring Limit Properties ......................................133

    Configuring Annotation Properties.............................135

    Configuring Target Region Properties ........................136Working 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............................146Other 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

    Chapter 4 ActiveFactory Query...........................161Getting Started with Query............................................161

    Query Toolbar...............................................................163

  • 5/28/2018 His t Client

    7/732

    Contents 7

    ActiveFactory Software Users Guide

    Columns Pane...............................................................163

    Results Pane .................................................................163

    Status Bar.....................................................................165

    Working with Query Files...............................................165

    Opening an Existing Query File..................................166

    Saving a Query File......................................................166Creating 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.............................................174Criteria 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

  • 5/28/2018 His t Client

    8/732

    8 Contents

    ActiveFactory Software Users Guide

    Common Tabs for Query Types ...................................195

    Time Tab...................................................................195

    Format Tab...............................................................196

    Retrieval Tab ............................................................197

    Source Tab ................................................................198

    Order Tab..................................................................199

    Chapter 5 ActiveFactory Workbook......................201Getting Started................................................................202

    Managing Server Connections.....................................202

    Opening an Existing Workbook File ...........................203

    Manually Loading/Unloading the Add-In...................203

    Creating a Report: Overview ..........................................205

    Working with Functions, Formulas, and Cells.............. 206

    Refreshing a Function or Array Formula ...................207

    Editing a Function .......................................................207

    Converting a Function to Values.................................207

    Refreshing a Sheet .......................................................207

    Converting a Sheet to Values ......................................208

    Manually Inserting a Function....................................208

    Manually Editing a Function ......................................211

    Copying a Function ......................................................212

    Selecting Cells ..............................................................213

    Verifying the Date/Time Format in Microsoft Excel ..213

    Selecting Tags for Reports ..............................................214

    Selecting Analog, Discrete, String, or Event Tags .....215

    Selecting Summary Tags .............................................216

    Selecting Event Snapshot Tags ...................................217

    Retrieving Tag Configuration Information....................218

    Retrieving Configuration Details for a Tag ................218

    Retrieving Analog Tag Alarm Limits..........................223

    Retrieving Tag Values.....................................................225

    Retrieving Live Values.................................................225

    Retrieving History Values ...........................................229

    Display Options Tab.................................................233

    Retrieval Tab ............................................................234

    Retrieving Aggregate Values.......................................235

    Calculations Tab.......................................................238

    Resolution Tab..........................................................239

    Retrieving Values for Summarized Tags ....................240

    Summary Options Tab.............................................243

    Retrieving Values for Event Snapshot Tags...............244

  • 5/28/2018 His t Client

    9/732

    Contents 9

    ActiveFactory Software Users Guide

    Common Properties for Tag Values.............................247

    Display Options Tab.................................................247

    Format Tab ...............................................................248

    Criteria Tab ..............................................................249

    Order Tab..................................................................251

    Analyzing Tag Data.........................................................252Analog 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 ..............285Using 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.............................................297Bound 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 .....................................................................308DataSource................................................................308

    DateTime ..................................................................308

    Description................................................................308

    DescriptionFilter ......................................................308

    DetectDatetime.........................................................309

    DetectorType.............................................................309

    DisplayAsWide .........................................................309

  • 5/28/2018 His t Client

    10/732

    10 Contents

    ActiveFactory Software Users Guide

    DisplayDatetime.......................................................309

    DisplayFlags .............................................................309

    DisplayMilliseconds .................................................311

    DisplayQuality..........................................................311

    EdgeDetection...........................................................311

    EngUnit ....................................................................312EURange...................................................................312

    HistoryVersion..........................................................312

    Interpolation.............................................................313

    Logged.......................................................................313

    MaxLength................................................................313

    Messages ...................................................................313

    OptionRange.............................................................314

    OrderBy ....................................................................314

    QualityRule...............................................................314

    RawRange.................................................................314ReplacePoorQuality..................................................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

  • 5/28/2018 His t Client

    11/732

    Contents 11

    ActiveFactory Software Users Guide

    Chapter 6 ActiveFactory Report ..........................323About Add-ins and Templates ........................................323

    Getting Started................................................................324

    Manually Loading/Unloading the Add-In ...................327

    Managing Server Connections.....................................328

    About Field Codes.........................................................328Showing/Hiding Field Codes....................................329

    Opening an Existing Report Document .........................330

    Running a Report Document ..........................................331

    Saving Report Documents...............................................332

    Saving a Report Document ..........................................332

    Saving a Configured Report Document as a Report

    Template...................................................................332

    Saving a Run Report Document as an HTML File..... 334

    Inserting a SQL Query....................................................336

    Editing a Query ............................................................339

    Using Date and Time Options ........................................340

    Inserting Date and Time Field Codes .........................341

    About Date and Time Wildcards .................................341

    #time Wildcard .........................................................342

    #date Wildcard.......................................................... 342

    #ReportTime Wildcard .............................................343

    Inserting Date and Time Wildcards ............................344

    Configuring Report Options............................................345

    Chapter 7 Introduction to Controls and Objects ......347About the ActiveFactory Controls and Objects..............347

    About Properties, Methods, and Events.........................348

    Getting Started with the Controls..................................349

    Using the Controls in Different Environments .............349

    Using the Controls within InTouch HMI Software....350

    Using the Controls in Microsoft Office........................351

    Mapping for Numerical Data Types............................351

    Chapter 8 aaHistClientTrend Control ....................353Using aaHistClientTrend at Runtime............................353

    Using aaHistClientTrend in an Application..................353

    Adding aaHistClientTrend to an InTouch Window....354

    aaHistClientTrend Properties .....................................355

    AddMultipleTags......................................................360

    AllowContextMenu...................................................361

  • 5/28/2018 His t Client

    12/732

    12 Contents

    ActiveFactory Software Users Guide

    AllowGridEditing ..................................................... 361

    AlwaysUseFullForXYScatterPlots ..........................361

    AnalogPlottingAlgorithm......................................... 362

    ApplyRubberBandToAllTags...................................362

    AutoRefreshMode..................................................... 363

    BackColor..................................................................364BackGradient............................................................364

    BackGradientEndColor............................................365

    BackImage ................................................................365

    BorderColor ..............................................................365

    BorderStyle...............................................................366

    BorderWidth .............................................................366

    ChartType.................................................................366

    CurrentServerName.................................................367

    CurrentTagColor ......................................................367

    CurrentTagCycleCount............................................367CurrentTagEffectiveRetrievalMode........................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

  • 5/28/2018 His t Client

    13/732

    Contents 13

    ActiveFactory Software Users Guide

    CurrentTagValueDeadband.....................................381

    CurrentValOfX1 .......................................................382

    CurrentValOfX2 .......................................................382

    CurrentValOfY1 .......................................................383

    CurrentValOfY2 .......................................................383

    CurrentXAxisTagIndex............................................383CurrentXAxisTagName ...........................................384

    CurrentXAxisTagServerName ................................384

    CyclicRows ................................................................384

    DataPointLabelType ................................................385

    DateMode..................................................................385

    DatePickerFormatString .........................................386

    DefaultTagFormat....................................................386

    DefaultTagPrecision.................................................387

    EnableDeltaRetrieval...............................................387

    EnableSummaryData...............................................388EnableTimeOffsets ...................................................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

  • 5/28/2018 His t Client

    14/732

    14 Contents

    ActiveFactory Software Users Guide

    PlaybackSpeed..........................................................397

    PlotColor ...................................................................398

    PlotGradient .............................................................398

    PlotGradientEndColor .............................................399

    PlotImage..................................................................399

    PrintShowActiveTag ................................................399PrintShowMarkers...................................................400

    PrintShowTitle .........................................................400

    PrintTitle ..................................................................401

    PublicAnnotations ....................................................401

    QueryTimeout...........................................................401

    RealTimeMode..........................................................402

    RealTimeRate...........................................................402

    RetrievalOptionsCycleCount ...................................402

    RetrievalOptionsHistoryVersion .............................403

    RetrievalOptionsInterpolationType ........................ 403RetrievalOptionsNumStyles....................................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

  • 5/28/2018 His t Client

    15/732

    Contents 15

    ActiveFactory Software Users Guide

    StartDate ..................................................................416

    SummaryDataMode .................................................416

    SupressErrors...........................................................416

    TagGridOrientation..................................................417

    TagPicker..................................................................417

    TagPickerVisible.......................................................417TargetRegionExcursionType ...................................418

    TargetRegionOpacity ...............................................418

    TimeBarVisible.........................................................418

    TimeBarVisible2.......................................................419

    TimeSelector .............................................................419

    ToolBarVisible ..........................................................419

    ToolbarVisible2.........................................................420

    ToolTipText...............................................................420

    TraceGradientEndingPercentage ............................420

    TraceGradientStartingPercentage ..........................420TraceGradientType ..................................................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

  • 5/28/2018 His t Client

    16/732

    16 Contents

    ActiveFactory Software Users Guide

    GetTagPenWidth......................................................435

    GetTagPrecision .......................................................436

    GetTagValAtX1 ........................................................436

    GetTagValAtX2 ........................................................437

    GetTagVisible ...........................................................438

    GetToolbarButtonEnabled.......................................439GraphStack...............................................................439

    LoadCRVString ........................................................439

    LoadTargetRegionFromFile.....................................439

    ManualConnect ........................................................440

    MoveNextTag............................................................440

    MovePrevTag............................................................440

    PanLeft .....................................................................441

    PanRight ...................................................................441

    PrintGraph ...............................................................441

    PrintGraphDlg..........................................................442PropertiesDlg............................................................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

  • 5/28/2018 His t Client

    17/732

    Contents 17

    ActiveFactory Software Users Guide

    SetMenuItemEnabled ..............................................456

    SetTagColor ..............................................................457

    SetTagFormat...........................................................458

    SetTagColorDlg ........................................................458

    SetTagOffsetMS .......................................................459

    SetTagPenStyle ........................................................460SetTagPenWidth ......................................................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

  • 5/28/2018 His t Client

    18/732

    18 Contents

    ActiveFactory Software Users Guide

    Chapter 9 aaHistClientQuery Control ...................477Using aaHistClientQuery at Runtime ...........................477

    Using aaHistClientQuery in an Application..................477

    Adding aaHistClientQuery to an InTouch Window ...478

    aaHistClientQuery Properties.....................................479

    ActiveServer .............................................................479AllowQueryTypeChange .......................................... 480

    CurrentServer ..........................................................480

    EnableAllQueriesTab...............................................480

    FavoriteQueriesFolder .............................................480

    FontBold ...................................................................481

    FontCharset..............................................................481

    FontItalic ..................................................................482

    FontName .................................................................482

    FontSize ....................................................................482

    QueryFont.................................................................483QueryString ..............................................................483

    Recordset...................................................................483

    Servers ......................................................................483

    ToolbarConnectVisible .............................................484

    ToolbarEditVisible ...................................................484

    ToolbarRequeryVisible.............................................484

    ToolbarVisible...........................................................484

    UsePersistedServers ................................................485

    aaHistClientQuery Methods........................................485

    AddServer ................................................................. 486AddTag......................................................................486

    ClearTags..................................................................487

    CopyQuery ................................................................487

    CutQuery ..................................................................487

    FileOpen....................................................................487

    ManualConnect ........................................................488

    OpenQuery................................................................488

    PasteQuery ...............................................................488

    Refresh ......................................................................488

    RemoveTag ...............................................................489

    SaveQuery.................................................................489

    SaveResults ..............................................................489

    SetDates....................................................................489

    SetDuration ..............................................................490

    SetQueryType...........................................................490

    SetQueryType2.........................................................491

    SetTimeSpan ............................................................491

  • 5/28/2018 His t Client

    19/732

    Contents 19

    ActiveFactory Software Users Guide

    ShowAbout................................................................492

    aaHistClientQuery Events...........................................492

    ModeChanged ...........................................................492

    QueryChanged..........................................................493

    ServerChanged .........................................................493

    aaQueryTypeEnumeration ..........................................493

    Chapter 10 aaHistClientTagPicker Control .............495Using aaHistClientTagPicker at Runtime.....................495

    Using aaHistClientTagPicker in an Application...........495

    Adding aaHistClientTagPicker to an

    InTouch Window ......................................................496

    aaHistClientTagPicker Properties ..............................497

    CurrentServer...........................................................497

    DescriptionFilter ......................................................497

    ExactMatchFilter .....................................................498FilterVisible ..............................................................498

    HideCaption..............................................................498

    IOAddressFilter........................................................498

    SelectedPath .............................................................499

    SelectedTagCount.....................................................499

    Servers ......................................................................499

    SingleSelectMode .....................................................500

    SplitterOrientation...................................................500

    TagNameFilter .........................................................500

    TreeVisible................................................................501TreeWidth.................................................................501

    aaHistClientTagPicker Methods .................................501

    ApplyFilter................................................................501

    LogOn........................................................................501

    RefreshTags ..............................................................502

    SelectedTag...............................................................502

    aaHistClientTagPicker Events....................................503

    OnFilterChanged......................................................503

    OnGroupChanged.....................................................503

    OnTagsPicked...........................................................503

    OnTagsSelected ........................................................504

    OnServerChanged ....................................................504

    OnSelectedTabChanged...........................................504

    aaHistClientTagPickerSplitterOrientation

    Enumeration ............................................................505

  • 5/28/2018 His t Client

    20/732

    20 Contents

    ActiveFactory Software Users Guide

    Chapter 11 aaHistClientTimeRangePicker Control.... 507Using aaHistClientTimeRangePicker at Runtime........507

    Using aaHistClientTimeRangePicker in

    an Application ..............................................................507

    Adding aaHistClientTimeRangePicker to an InTouch

    Window.....................................................................508aaHistClientTimeRangePicker Properties .................508

    DurationMS..............................................................509

    EndDate ....................................................................509

    Format ......................................................................509

    StartDate ..................................................................510

    TimeDuration ...........................................................511

    aaHistClientTimeRangePicker Methods .................... 511

    GetStartAndEndTimes ............................................511

    RefreshTimes............................................................512

    SetStartAndEndTimes.............................................512

    aaHistClientTimeRangePicker Events ....................... 513

    OnChange .................................................................513

    Chapter 12 aaHistClientActiveDataGrid Control ...... 515Using aaHistClientActiveDataGrid at Runtime ........... 516

    Data Grid ..................................................................516

    Navigating through Records....................................516

    Configuring the Database Connection ....................517

    Creating or Editing SQL Statements......................518

    Refreshing the Data Grid.........................................519Using aaHistClientActiveDataGrid in an Application..520

    Adding aaHistClientActiveDataGrid to an

    InTouch Window ......................................................520

    aaHistClientActiveDataGrid Properties.....................521

    AllowUserConfiguration .......................................... 522

    AutoRefresh .............................................................. 522

    BOF...........................................................................523

    BusinessObjectServer ..............................................523

    ColumnCount............................................................524

    Connected .................................................................524DatabaseName .........................................................524

    DefaultColumnWidth...............................................525

    Domain......................................................................525

    Enabled .....................................................................525

    EnableShortcutMenu ...............................................525

    EOF...........................................................................526

    Handle.......................................................................526

  • 5/28/2018 His t Client

    21/732

    Contents 21

    ActiveFactory Software Users Guide

    Password ...................................................................526

    RefreshFrequency.....................................................526

    Row............................................................................527

    RowCount..................................................................527

    ServerName..............................................................527

    ShowErrorDlgs .........................................................528ShowNavigatorBar...................................................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

    Chapter 13 aaHistClientSingleValueEntry Control ....541Using the aaHistClientSingleValueEntry Control at

    Runtime ........................................................................541

    Adding a Tag Value ......................................................541

    Using the aaHistClientSingleValueEntry Control in an

    Application....................................................................542

    Adding the aaHistClientSingleValueEntry Control to an

    InTouch Window ......................................................543

    aaHistClientSingleValueEntry Control Properties....544

    AnalogValue..............................................................545

  • 5/28/2018 His t Client

    22/732

    22 Contents

    ActiveFactory Software Users Guide

    CurrentServerName.................................................545

    DateTime ..................................................................546

    DateTimeFieldDisable .............................................546

    DateTimeFieldVisible ..............................................546

    DateTimeString........................................................547

    DisableTagEntry ......................................................547DisplayErrorMessages .............................................547

    FieldLabelPosition ...................................................548

    FieldLayoutHorizontal.............................................548

    HideDateTimeModeTabs .........................................549

    HideFieldLabels .......................................................549

    HideStatusBar..........................................................549

    InsertButtonDisable.................................................550

    InsertButtonVisible..................................................550

    InTouchDateTime ....................................................550

    LastErrorDetails ......................................................551LastErrorMessage....................................................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

  • 5/28/2018 His t Client

    23/732

    Contents 23

    ActiveFactory Software Users Guide

    AddServer .................................................................560

    AddTag......................................................................561

    Connect .....................................................................561

    CreateManualTag.....................................................562

    Disconnect.................................................................562

    Insert.........................................................................562InsertValue ...............................................................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

    Chapter 14 Server Objects ................................567aaServer Object ...............................................................567

    aaServer Properties......................................................567

    BaseURLAddress......................................................568

    Build..........................................................................568

    Domain......................................................................569

    LoginID .....................................................................569

    LoggedOn ..................................................................569LoginTimeout............................................................569

    MachineName...........................................................570

    Name.........................................................................570

    Password ...................................................................570

    PatchLevel ................................................................571

    QueryTimeout...........................................................571

    RetainPassword........................................................571

    RevisionNumber.......................................................572

    SchemaVersion .........................................................572

    ServerName..............................................................572ServerType................................................................573

    State..........................................................................573

    TrustedConnection ...................................................573

    UseHttp.....................................................................574

    VirtualDirectoryName ............................................. 574

    aaServer Methods.........................................................574

    LogOff........................................................................574

  • 5/28/2018 His t Client

    24/732

    24 Contents

    ActiveFactory Software Users Guide

    LogOn........................................................................574

    aaServers Object .............................................................575

    aaServers Properties....................................................575

    ApplicationName......................................................575

    Count.........................................................................576

    Items .........................................................................576aaServers Methods.......................................................576

    Add ............................................................................ 576

    GetServer..................................................................577

    Remove......................................................................577

    Update.......................................................................577

    aaServers Events..........................................................578

    OnServerAdded ........................................................579

    OnServerUpdated.....................................................579

    OnServerRemoved....................................................579

    OnServerStateChange .............................................580Instantiating 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

    Chapter 15 aaTag Object................................... 585Using aaTag in an Application.......................................585

    aaTag Properties ..........................................................585

    DateCreated..............................................................586

    Description................................................................586

    IOAddress .................................................................586

    MaxRaw....................................................................587MinRaw.....................................................................587

    MinEU.......................................................................587

    MaxEU......................................................................587

    Message0...................................................................588

    Message1...................................................................588

    Mode..........................................................................588

  • 5/28/2018 His t Client

    25/732

    Contents 25

    ActiveFactory Software Users Guide

    Name.........................................................................588

    RawType ...................................................................589

    Server ........................................................................589

    Type...........................................................................589

    TypeAsTagType........................................................589

    Units..........................................................................590

    Chapter 16 aaHistClientWorkbookRunner andaaHistClientReportRunner Objects........591

    aaHistClientWorkbookRunner Object ...........................591

    aaHistClientWorkbookRunner Object Properties ......591

    ErrDescription..........................................................592

    ErrNumber ...............................................................592

    OutputFile ................................................................592

    SourceFile .................................................................592

    ExcelVisible ..............................................................593aaHistClientWorkbookRunner Methods.....................593

    Run............................................................................593

    RunReport.................................................................594

    RunReport2...............................................................597

    aaHistClientReportRunner Object .................................601

    aaHistClientReportRunner Object Properties............601

    ErrDescription..........................................................601

    ErrNumber ...............................................................601

    OutputFile ................................................................602

    SourceFile .................................................................602WordVisible...............................................................602

    aaHistClientReportRunner Object Methods...............603

    Run............................................................................603

    Chapter 17 Workbook and Report AutomationObjects..........................................605

    ActiveFactoryWorkbook Object ......................................605

    ActiveFactoryWorkbook Object Methods....................605

    AddServer .................................................................606

    Auto_Close ................................................................606Auto_Open ................................................................606

    GetLastError ............................................................606

    RunReport.................................................................607

    ActiveFactory Workbook Menu Methods................611

    ActiveFactory Workbook Functions ........................612

    ActiveFactory Workbook Automation Example..........612

  • 5/28/2018 His t Client

    26/732

    26 Contents

    ActiveFactory Software Users Guide

    ActiveFactoryReport Object............................................ 616

    Report Object Properties..............................................616

    ReportDate................................................................616

    ReportTime...............................................................617

    Report Object Methods.................................................617

    AutoExec................................................................... 617AutoExit.................................................................... 617

    RunReport.................................................................617

    Chapter 18 aaHistClientGlobalFunctions Object ...... 619Using aaHistClientGlobalFunctions Object in an

    Application.................................................................... 619

    aaHistClientGlobalFunctions Methods.......................619

    GetDictionaryPath ...................................................619

    GetInstallPath..........................................................620

    MDACOk...................................................................620

    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

  • 5/28/2018 His t Client

    27/732

    Contents 27

    ActiveFactory Software Users Guide

    ToolTipText................................................................... 628

    Top.................................................................................628

    Transparent..................................................................629

    Visible............................................................................629

    WhatsThisHelpID......................................................... 629

    Width.............................................................................630Common Methods............................................................630

    Drag...............................................................................630

    Move..............................................................................630

    SetFocus........................................................................631

    ShowWhatsThis............................................................ 631

    ZOrder...........................................................................631

    Common Events...............................................................631

    Click ..............................................................................632

    DblClick ........................................................................632

    DragDrop ......................................................................632DragOver....................................................................... 632

    GotFocus .......................................................................633

    KeyDown.......................................................................633

    KeyPress .......................................................................633

    KeyUp ...........................................................................633

    LostFocus ......................................................................634

    MouseDown................................................................... 634

    MouseMove ...................................................................634

    MouseUp .......................................................................634

    Validate.........................................................................635Common 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

  • 5/28/2018 His t Client

    28/732

    28 Contents

    ActiveFactory Software Users Guide

    Appendix A Configuring an IIS Virtual Directory forSQL Server .....................................641

    Appendix B Understanding Data Retrieval...............649

    Understanding Retrieval Modes.....................................649Cyclic 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 .............................................................667Counter 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........................................................678Timestamp 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

  • 5/28/2018 His t Client

    29/732

    Contents 29

    ActiveFactory Software Users Guide

    Appendix C Control and Object Migration Reference .695

    ActiveFactory Version Comparison: Overview ..............695

    Migrating an ActiveFactory 8.5 Application..................697

    iTrend and aaHistClientTrend Comparison..................699

    iQuery and aaHistClientQuery Control Comparison....703

    TimeBar and aaHistClientTimeRangePicker

    Comparison...................................................................704

    TagPicker and aaHistClientTagPicker Comparison .....705

    SingleValueEntry and aaHistClientSingleValueEntry

    Comparison...................................................................708

    ActiveDataGrid and aaHistClientActiveDataGrid

    Comparison...................................................................709

    Server and aaServer Object Comparison .......................709

    Servers and aaServers Object Comparison....................710

    Tag and aaTag Object Comparison ................................711

    Tags Object ......................................................................713

    GlobalFunctions Object and aaHistClientGlobalFunctions

    Object Comparison.......................................................713

    Index .............................................715

  • 5/28/2018 His t Client

    30/732

    30 Contents

    ActiveFactory Software Users Guide

  • 5/28/2018 His t Client

    31/732

    31

    ActiveFactory Software Users Guide

    Welcome

    This guide describes using the Wonderware

    ActiveFactory software to retrieve data from an

    IndustrialSQL Server historian. Before you can use theActiveFactory 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