AVEVA InTouch HMI - Logic Control

2y ago
14 Views
2 Downloads
1.66 MB
148 Pages
Last View : 15d ago
Last Download : 3m ago
Upload by : Warren Adams
Transcription

AVEVA InTouch HMIformerly WonderwareScripting and Logic Guide

AVEVA InTouch HMI formerly Wonderware Scripting and Logic Guide 2020 AVEVA Group plc and its subsidiaries. All rights reserved.No part of this documentation shall be reproduced, stored in a ret rieval system, or transmitted by anymeans, electronic, mechanical, photocopying, rec ording, or otherwise, without the prior writtenpermission of AVEVA. No liability is assumed with respect to the use of the information contained herein.Although precaution has been taken in the preparation of this documentation, AVEVA assumes noresponsibility for errors or omissions. The information in this documentation is subject to change withoutnotice and does not represent a commitment on the part of AVEVA. The soft ware described in thisdocumentation is furnished under a license agreement. This soft ware may be used or copied only inaccordance with the terms of such license agreement.ArchestrA, Aquis, Avantis, Citect, DYNSIM, eDNA, EYESIM, InBatch, InduSoft, InStep, Int elaTrac,InTouch, OASyS, PIPEPHASE, PRiSM, PRO/II, PROV ISION, ROMeo, SIM4ME, SimCentral, SimSci,Skelta, SmartGlance, Spiral Software, Termis, WindowMaker, WindowViewer, and Wonderware aretrademarks of AVEVA and/or its subsidiaries. An extensive listing of AVEVA trademarks can be found at:https://sw.aveva.com/legal. All other brands may be trademarks of their respective owners.Publication date: Tuesday, November 17, 2020Contact InformationAVEVA Group plcHigh CrossMadingley RoadCambridgeCB3 0HB. UKhttps://sw.aveva.com/For information on how to cont act sales and customer training, see https://sw.aveva.com/contact.For information on how to cont act technical support, see https://sw.aveva.com/support.2

AVEVA InTouch HMI formerly Wonderware Scripting and Logic GuideContentsChapter 1 Introduction to Scripting . 11Introduction to Scripting About Scripting . 11Basic Scripting Concepts . 11Types of Scripts . 11Advanced Scripting Concepts . 12OLE Objects . 12Scripting with ActiveX Cont rols . 12Chapter 2 Creating and Editing Scripts . 13Creating and Editing Scripts About Creating and Editing Scripts. 13Working with the InTouc h Script Editor . 14Color Indicators for InTouch Script Elements . 15InTouch Script Editor Autocomplete Features. 15Accepting InTouch Script Editor Autocomplete Suggestions . 16Multi-level Undo and Redo in InTouch Scripting . 16Visual Indication of InTouch Script Errors . 17Managing InTouch Script Edits. 17Opening a Script for Editing . 17Saving or Discarding Changes to a Script . 18Copying, Cutting and Pasting Text . 19Searching Within a Script . 19Configuring a Find or Replace . 21Search by Regular Expressions . 22Search by Wildcard Characters . 24Search by Acronym . 25Search by Shorthand . 26Inserting Code Elements . 26Accessing Help for Script Functions . 27Validating Scripts for Correct Syntax . 27Printing Scripts . 27Deleting Scripts. 28Chapter 3 Script Triggers . 29About Script Triggers. 29Types of Script Triggers . 29Using Multiple Triggers . 30Periodic Script Execution . 30Configuring Application Scripts . 303

ContentsAVEVA InTouch HMI formerly Wonderware Scripting and Logic GuideLimitations of Application Scripts . 31Configuring Window Scripts . 31Configuring Key Scripts . 32Configuring Condition Scripts . 34Configuring Data Change Scripts . 36Configuring Action Scripts. 36Configuring ActiveX E vent Scripts . 39Pausing Script Execution at Run Time. 41 LogicRunning System Tag . 42Chapter 4 The Script Language . 43About the Script Language . 43Basic Syntax Rules . 43Subroutines . 43Statements . 43Indent ation. 44Comments . 44Tag References . 44Literal Data Values . 44Value Expressions. 44Syntax Validation . 44Calling Standard Functions . 44Syntax for Calling Standard Functions . 44Passing Parameters to a Function . 45Calling Custom Functions (QuickFunctions ) . 45Passing Parameters to a QuickFunction . 46Value Assignments and Operators . 46Supported Operators . 46Addition or Concatenation: . 47Subtraction: -. 47Multiplication: * . 48Division: / . 48Power: ** . 48Modulo: MOD . 48Complement: . 49Shift Left: SHL and Shift Right: SHR . 49Bitwise AND: & . 49Bitwise OR: . 50Bitwise XOR: . 50Logical Conjunction: AND . 51Logical Disjunction: OR. 51Logical Negation: NOT. 51Comparisons: , , , , , . 52Setting the E valuation Order of Operators . 52Implicit Data Type Conversion. 53Examples for Expressions. 54Using Conditional Program Branching Structures . 54Simple Conditional Structure . 55Nested Conditional Structure . 554

ContentsAVEVA InTouch HMI formerly Wonderware Scripting and Logic GuideInvalid Scripting Example (Missing ENDIF) . 55Invalid Scripting Example (Incorrect Nesting) . 55Using Program Loops . 56Forcing the End of a Loop. 57Effect of Loops on Other Run-Time Processes . 57Time Limit for Loop Execution . 57Examples of Loops . 57Using Local Variables . 58Declaring a Local Variable . 58Naming Conflicts between Local Variables and Tags . 59Chapter 5 Custom Script Functions . 61About Custom Script Functions . 61About QuickFunctions . 61Configuring QuickFunctions . 61Calling QuickFunctions . 62Creating Asynchronous QuickFunctio ns . 63Limitations of Asynchronous QuickFunctions. 63Checking if any Asynchronous QuickFunctions are Running . 63IsAnyAsyncFunctionBusy() Function . 63Stopping Asynchronous QuickFunctions from Running . 64Chapter 6 Built-In Functions. 65Built-In Functions About Built-In Functions . 65Forcing Updates in Animation Display Links. 65Mathematical Calculations . 65Rounding, Truncating, and Determining Sign . 65Abs() Function. 66Int() Function. 66Round() Function. 66Sgn() Function. 67Trunc () Function . 67Using Trigonometric Functions . 68Sin() Function. 68ArcSin() Function. 68Cos() Function. 69ArcCos() Function. 69Tan() Function. 69ArcTan() Function. 70Returning the Value of Pi . 70Calculating Logarithms . 70Log() Function . 70Exp() Function. 71LogN() Function . 71Calculating the Square Root . 72String Operations . 72Returning Parts of Strings . 72StringLeft () Function . 72StringRight() Function . 73StringMid() Function . 735

ContentsAVEVA InTouch HMI formerly Wonderware Scripting and Logic GuideChanging Case of Strings . 73StringLower() Function. 74StringUpper() Function. 74Removing Spac es from Strings . 74StringTrim() Function . 74Formatting Strings with Spaces . 75Converting Between Characters and ASCII Codes . 75StringChar() Function . 75StringASCII() Function . 76Searching and Replacing Text in Strings . 76StringInString() Function . 76StringReplace() Function . 77Returning Information about Strings . 78StringLen() Function . 78StringTest() Function . 78Comparing Strings. 79StringCompare() Function . 79StringCompareNoCase() Function . 80StringCompareEncrypted() Function . 80Converting Data Types . 81Text() Function. 81StringFromIntg() Function . 82StringFromReal() Function . 82StringToIntg() Function . 83StringToReal() Function. 83DText() Function . 84Working with InTouch Windows at Run Time . 85Expose Window Name Property . 85GetWindowName() Function . 85Showing a List of Open Windows . 86OpenWindowList() Function . 86Checking If a Window is Open, Closed, or Exists. 86WindowStat e() Function . 86Opening InTouch Windows . 87Show() Function . 87ShowAt() Function . 87ShowHome() Function . 88ShowTopLeftAt() Function. 88Moving and Resizing a Window. 88WWMoveWindow() Function . 88Hiding InTouch Windows . 89Hide() Function. 89HideS elf() Function . 89Changing the Color of a Window . 90ChangeWindowColor() Function . 90Printing Windows at Run Time . 90SetWindowP rinter() Function. 90Recommendations for P rinting. 91PrintWindow() Function. 91PrintScreen() Function . 92PrintHT() Function . 93Starting Tag Viewer . 936

ContentsAVEVA InTouch HMI formerly Wonderware Scripting and Logic GuideLaunchTagViewer() Function. 93Working with Date and Time Information . 93Retrieving Numerical Date and Time Information . 93 Year System Tag . 94 Month System Tag. 94 Day System Tag . 95 Hour System Tag. 95 Minute System Tag . 95 Second System Tag . 95 Msec System Tag . 96 Time System Tag . 96 Dat e System Tag . 96 Dat eTime System Tag . 96DateTimeGMT() Function. 97Retrieving String Date and Time Information . 97 Dat eString System Tag . 97 TimeString System Tag. 98UTCDat eTime() Function . 98Converting Date and Time Information to Strings. 98StringFromTime() Function. 99wwStringFromTime() Function. 100StringFromTimeLoc al() Function. 100Checking the Daylight Savings Time Status . 101wwIsDaylightSaving() Function . 101Interacting with Other Applications . 101Starting a Windows Application . 102Retrieving the Application Title of a Running Application . 102InfoA ppTitle() Function. 102Checking If an Application is Running . 102InfoA ppActive() Function . 102Activating a Running Windows Application . 103ActivateA pp Function . 103Sending Simulat ed Key Strokes to an Application . 104SendKeys Function . 104Closing, Minimizing or Maximizing a Windows Application . 105WWControl() Function . 105Executing Commands and Exchanging Data using DDE . 106WWExecute() Function . 106WWRequest() Function. 107WWPoke() Function. 107Working with Files .

AVEVA InTouch HMI formerly Wonderware Scripting and Logic Guide 11 About Scripting You can use the InTouch scripting language, QuickScript, to build more robust applications. There are eight types

Related Documents:

AVEVA 1 AVEVA Product Naming Transition Guidebook 2019 AVEVA Product Naming Transition Guidebook January 2021 AVEVA 6 AVEVA ERM AVEVA Enterprise Resource Management AVEVA ProCon AVEVA Contract Risk Management NEW AVEVA E3D Fabrication Management AVEVALFM Server [on-premise] PointCloud Manager AVEVA LFM Connect [cloud] AVEVA Point .

system. This guide applies to Activated licensing for AVEVA InTouch HMI, AVEVA InTouch HMI Web Client, AVEVA Application Server, AVEVA Historian Server, AVEVA Historian Clients, Communication Driver, Alarm Adviser, and Recipe Management. This document provides a summary of the licensing process related to the 2017 Update 1 and Update 2 release

InTouch Access Anywhere InTouch Access Anywhere is the latest capability of InTouch, enabling you to gain more out of your existing assets and resources. We unlock the value of your existing plant data to make your HMI easy and with fast time to benefits. InTouch Access Anywhere is an InTouch extension that provides mobile and casual

formerly Wonderware. AVEVA InTouch HMI, formerly Wonderware powers more than 100,000 . . "System Platform Galaxy" or "InTouch Tag Server" as the remote data source. This enables more cost- . back-end system by using standard interfaces, such . as OPC UA, OPC DA, SQL, SOAP, HTTP/S, .NET for .

4 Contents InTouch HMI and ArchestrA Integration Guide Publishing Managed InTouch Applications . 20 Exporting and Importing InTouch Windows between

Working with InTouch HMI An InTouch HMI application shows a graphical representation of a manufacturing or process environment. The tools, materials, and processes used to create a product appear as visual elements in an application’s windows. This chapter describes the steps t

With the new Wonderware system we estimate an average . easily assemble effective HMI applications for simplicity, agility and performance. While InTouch gives you the most powerful graphics tool available in any HMI, InTouch . the facility using a tablet or smartphone.

Introduction to Academic Writing This study pack is designed to take about 50 minutes. It will give you an introduction to academic writing, sharing the most important principles that will guide you through writing during your degree at UCL. It was put together by the Writing Lab, which is the section of the Academic Communication Centre(ACC) that serves students from Bartlett; Psychology .