Tech Note 652 Changing an ArchestrA Symbol's Custom Property Expression or Reference in Runtime



Similar documents
1. Under Application Objects, open the $Tank object and then open the $TankDisplay as shown in Figure 1 (below).

This tech note will explain how to use the following parameters in Configurator General Parameters.

Tech Note 743 Configuring Reporting Services 2008 Configuration for a New Host Name in Windows 2008 R2

Introduction. Notes. Important Considerations. Application Versions. Assumptions. 8/22/13 Setting Up Historian Servers for Tier-2 Summary Replication

Introduction. Symbol Script Timeout Setting. Sample MES Custom Code in Symbol Script. Application Versions. Sample Code

Introduction. Configuration: Entity and OCO Modeling. Application Version: OCO General Configuration

Introduction. Application Versions. Assumptions. Delete $$ExportTempFolders. Tech Note 930 Wonderware System Platform Clean-up Guide

Tech Note 1010 SQL Server Authentication and ArchestrA Network Account Restrictions When Installing Wonderware Historian

Tech Note 751 Installing InBatch Report Contents for Wonderware Information Server (WIS)

Tech Note 782 Installing Remote Desktop Services on Windows 2008 Server R2 for Wonderware Products

Tech Note 920 Resolving Disabled ActiveFactory Reporting Website for Wonderware System Platform R2

Introduction. Tech Note 884 Setting Up Historian Servers for Tier-2 Summary Replication

Communication to End Device Going In and Out of Slow Poll Mode

All Tech Notes and KBCD documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information.

Introduction. Issues. Symptoms. Application Versions. Case 1: Deploy an ArchestrA Object - UDO4DevUsers_001_001 - Has Error Messages

Tech Note 612 Upgrading DLL Version Mismatches Between CBM Solution and System Platform

Tech Note 882 Configuring Time Synchronization for Historian Server Using Net Time and Windows Task Scheduler

This Tech Note describes working with Microsoft Reporting Services in order to publish InBatch Reports to Wonderware Information Server.

Tech Note 338 How to Change the ActiveFactory Reporting Website Default Install Location

Introduction. Application Versions. Installing Virtual SMTP Server. Tech Note 692 Using Virtual SMTP Server for SCADAlarm Notifications

Note: Not all messages in the log are indicative of a problem. Contact Technical Support if questions arise.

Tech Note 400 Configuring Remote Connections for Windows 2000/2003/XP

Tech Note 663 HMI Reports: Creating Alarm Database (WWALMDB) Reports

Tech Note 782 Installing Remote Desktop Services on Windows 2008 Server R2 for Wonderware Products

Enabling Cross-Machine Distributed Transactions (via MSDTC)

All Tech Notes and KBCD documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information.

How To Write A Summary On A Historyorian Server

Tech Note 847 Installing Wonderware Information Server (WIS) on the Windows Server Window 7 64 and 32-bit Operating System

Using Network Application Development (NAD) with InTouch

Tech Note 868 Troubleshooting Wonderware Software Resource Issues with Performance Monitor

Part I: Setting up Bristol Babcock's OPC Server

Tech Note 882 Configuring Time Synchronization for Historian Server Using Net Time and Windows Task Scheduler

Introduction. Back Up the Runtime Database. Application Versions

8/23/13 Configuring the Wonderware SECS-II/GEM Host Creator (SERIAL-RS232)

Note: This Tech Note was formerly titled Installing Microsoft SQL Server 2008 for Wonderware Historian v10.0.

All Tech Notes and KBCD documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information.

Implementing the system using these guidelines should improve your system performance for a large database while your database grows in size.

This Tech Note provides step-by-step procedures to install Microsoft SQL Server 2012 on a 32- or 64-bit Operating System.

8/22/13 Configuring Windows SharePoint Services for PEM v1.0 to Work with SuiteVoyager v2.6

Tech Note 905 Troubleshooting Wonderware Information Server (WIS) Part Six: ArchestrA Graphics No Live-Data

Migrating QI 8.0 Admin and Process Databases from Microsoft Access to Microsoft SQL Server

Tech Note 957 Creating Custom Password Entry on Intermec-Supported Handhelds

Tech Note 1042 Solving Historian Memory Issue with SQL Server MemToLeave Configuration

8/23/13 Configuring SIDirect DAServer to Communicate with S7 PLC Over TCP Connection

8/22/13 Configuring the SST5136SD PCI Card Using the New SSTDHP IO Server V8.1 or the DASDHPlus Server

Alarm Display. Tips & Tricks DIANA SMIT. Tel: 0861-WONDER Fax: (011)

Tech Note 1035 Moving the Historian Runtime Database to Another Machine Using SQL Server 2012

Instead, use the following steps to update system metadata that is stored in sys.servers and reported by the system function

Tech Note 912 Using Alternate TCP Port Numbers with Modbus Ethernet DAServer

To allow SQL Server Agent to trigger when a report is executed, we need to provide a set of report group types.

Installing An ActiveX Control in InTouch

Industrial Application Server Redundancy: Troubleshooting Guidelines

Tech Note 551 Configuring SQLMail or Database Mail for the Historian Event

How To Migrate Qi Analyst To A New Database On A Microsoft Access (Windows) From A New Version Of Qi.Io To A Newer Version Of A New Qi 8.0 (Windows 7.3

All Tech Notes and KBCD documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information.

Tech Note 813 Troubleshooting Wonderware Information Server (WIS) Part Four: Client License Release

InTouch Example Description

This Tech Note provides detailed guidelines and options for defragmenting and maintaining your production databases.

Introduction. Application Versions. Compatibility and System Requirements. Firewall and DCOM Settings

InTouch HMI Scripting and Logic Guide

All Tech Notes and KBCD documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information.

This Tech Note describes modem connections using DAServers and provides some guidelines on how to make the modem connection work.

ArchestrA Log Viewer User s Guide Invensys Systems, Inc.

Kepware Technologies KEPServerEX Client Connectivity Guide for Wonderware InTouch

Connecting System Platform to TOP Server. Using the SuiteLink DI Object

How to Mimic the PanelMate Readout Template with Vijeo Designer

WW HMI SCADA-11 System Platform Best Practices 1: Engineering Efficiencies

Virtual Office Remote Installation Guide

8/23/13 Configuring the S7 Server for Windows NT 4.0 to Access S7-400 PLCs via the Siemens CP1613 Card for ISO (Industrial Ethernet)

The Benefits of Component Object- Based SCADA and Supervisory System Application Development

SIMATIC. WinCC V7.0. Getting started. Getting started. Welcome 2. Icons 3. Creating a project 4. Configure communication 5

viewon 2 - Create your own Symbols How To

Security Settings for Wonderware Products

Microsoft Access 2010 handout

Installing the TCP/IP Network Protocol

Purpose: TechTip: Using Windows Task Scheduler to monitor if WindowViewer is Running

Creating Database Tables in Microsoft SQL Server

8/23/13 Configuring the S7 I/O Server for Windows 95 to Access S7 PLCs Via the Profibus Network

Tech Note 213 Finding Memory Leaks in Windows 95/98/98SE Using System Monitor

IBM Business Monitor V8.0 Global monitoring context lab

Litigation Support connector installation and integration guide for Summation

IBM BPM V8.5 Standard Consistent Document Managment

Sample- for evaluation purposes only. Advanced Crystal Reports. TeachUcomp, Inc.

Appendix A How to create a data-sharing lab

BIGPOND ONLINE STORAGE USER GUIDE Issue August 2005

Data Tool Platform SQL Development Tools

WW TSS-15 WW TSS-16 InTouch Advanced Troubleshooting and 2014 New Features

TIBCO ActiveMatrix BPM - Integration with Content Management Systems

Wonderware Historian Client Installation Guide. Invensys Systems, Inc.

Lab 05: Deploying Microsoft Office Web Apps Server

Connecting to SQL server

MAS 500 Intelligence Tips and Tricks Booklet Vol. 1

InTouch 9.0. Wonderware InTouch 9.0. Data Sheet. Visualization Software OVERVIEW POWER AND VERSATILITY. b Powerful and Flexible.

Microsoft Access 2010 Part 1: Introduction to Access

FILESURF 7.5 SR3/WORKSITE INTEGRATION INSTALLATION MANUAL 1 PRELIMINARIES...3 STEP 1 - PLAN THE FIELD MAPPING...3 STEP 2 - WORKSITE CONFIGURATION...

Getting Started using the SQuirreL SQL Client

Chapter 15: Forms. User Guide. 1 P a g e

Setting up VMware ESXi for 2X VirtualDesktopServer Manual

Visual Dialogue User Guide. Version 6.1

Transcription:

Tech Note 652 Changing an ArchestrA Symbol's Custom Property Expression or Reference in Runtime All Tech Notes, Tech Alerts and KBCD documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information. Topic#: 002416 OpsManage09 Session#: TS106 Created: November 2009 Updated April 2011 Introduction This Tech Note describes changing the expression or reference of a Custom Property at runtime. This is done by calling the SetCustomPropertyValue(string name, string value, IsConstant) on the ArchestrA symbol using a custom script. The goal of using the SetCustomPropertyValue() method is to help change the expression or reference of a Custom Property in runtime. When using the method, consider the following: The symbol element exposes a method that allows you to change the reference of the custom property on the symbol at runtime. You can browse this method from client script editor. This method has three parameters (name, value, type). a) Name: Name of the custom property to be modified on the symbol. This parameter is of type string, and it can be a reference or a constant. b) Value: The new value to be set. This parameter is of type string, and it can be an expression, reference, or constant. c) Type: The type of the value. This parameter is of type Boolean, which means that the second parameter is reference or constant only if the custom property (specified in the name parameter) is of string and time type. The type parameter has no meaning if the custom property is an integer, float, Boolean, or double type. This method is only supported for ArchestrA client scripts. You can only change public custom properties on the symbol. The following scenario is an example of what this means in this context: Suppose you create a symbol S1 and create 5 custom properties: CP1, CP2, CP3, CP4 and CP5. CP1 and CP2 are private and other three custom properties are public. In this case all custom properties are accessible for read/write by all animations and scripts configured inside symbol S1, regardless of custom properties visibility (private or public). This is because S1 is owner of all custom properties (CP1,, CP5). A custom property is declared private or public only for the world outside the symbol, and not within the parent symbol itself. If you create another symbol S2 and embed symbol S1 in it, only the public properties of S1 (CP3, CP4 and CP5) are accessible for any animation or script configured in symbol S2. CP1 and CP2 of symbol S1 will not be accessible from S2 because they are declared private in S1. Application Versions Wonderware Application Server 3.1 & later InTouch 10.1 & later Procedure: Update the Custom Property Using a Constant 1. Create an ArchestrA Symbols (e.g AASymbol1 ) 2. Create a custom property CP1 which has a string data type and assign a default value of Test. 3. Create a text object. 4. Add an animation value display link to the text object and point the reference to the Custom Property (CP1) 5. Create a button object called SetCustomPropertyValue. 6. Add the below animation action script on left click/key down: SetCustomPropertyValue("CP1","Test SetCustomPropertyValue",1); 7. Create a derived InTouchViewApp. 8. Embed the above symbol on an InTouch Window (Figure 1 below). https://wdnresource.wonderware.com/support/kbcd/html/1/t002416.htm 1/11

FIGURE 1: EMBEDDED SETCUSTOMPROPERTYVALUE SYMBOL IN INTOUCH 9. Switch to Runtime and notice that the text displays Test, which was the default string you added when you created the Custom Property CP1. as shown below: FIGURE 2: TEST INITIAL VALUE TEXT 10. Click the SetCustomPropertyValue button. 11. The Action Script changes the value display string to Test SetCustomPropertyValue (Figure 3 below). FIGURE 3: TEXT VALUE CHANGE Procedure: Update the Custom Property Using a Reference 1. Create an Automation Object from the $UserDefined template. This example is called AO1. 2. Create 2 UDAs: UDA1, UDA2 in the AO1 object. 3. Deploy AO1. https://wdnresource.wonderware.com/support/kbcd/html/1/t002416.htm 2/11

4. Create a symbol S1 in the AO1 under the graphic tab with custom properties called CP1, CP2. 5. Create a 2 text objects ### user input animations for the UDA1 and UDA2. 6. Create a 2 value display text objects ### for CP1 and CP2. 7. Create the following action script on a button object and name it SetCustomPropertyValue() button. SetCustomPropertyValue("CP1","AO1.UDA1",false); SetCustomPropertyValue("CP2","AO1.UDA2",false); 8. Embed S1 into InTouchViewApp window (Figure 4 below). FIGURE 4: SET UP THE REFERENCES 9. Switch to Runtime and notice all the values are 0 (zero) (Figure 5 below). FIGURE 5: INITIAL VALUES ARE ZEROS 10. Type inputs for UDA1 = 10 and UDA2 = 40 as (Figure 6 below). https://wdnresource.wonderware.com/support/kbcd/html/1/t002416.htm 3/11

FIGURE 6: TYPE UDA VALUES 11. Click the SetCustomPropertyValue() button. 12. Notice that the CP1 and CP2 value change as per the script as shown below: FIGURE 7: SET CUSTOM PROPERTY VALUES FOR USER INPUT FIELDS Procedure: Update the Custom Property Using an Expression 1. Create two User defined templates called $Reactor1 and $Tank1. 2. Create two symbols: T_S1 in $Tank1, and R_S1 in $Reactor1. 3. Create two integer UDAs called U1 and U2 in $Tank1 and one integer UDA called U1 in $Reactor1. 4. In T_S1, configure two value display animation referring to me.u1 and me.u2. 5. Create two integer custom properties called CP1 and CP2 with default values of me.u1 and me.u2 respectively. 6. Create a button called SetCustomPropertyValue() and configure action script as: SetCustomPropertyValue("CP1", "CP2", false); 7. Configure a user input animation referring to CP1 and CP2. https://wdnresource.wonderware.com/support/kbcd/html/1/t002416.htm 4/11

FIGURE 8: $TANK SYMBOL 8. Assign $Tank1 to $Reactor1 and create two instances of $Reactor1. 9. In R_S1, embed T_S1 and configure following action script to a button called Hierarchical Name. Tank1_001_T_S11.OwningObject = Tank1_002.HierarchicalName; 10. Deploy the two instances. 11. Embed R_S1 in a Window W2 of WindowMaker as shown below: FIGURE 9: EMBEDDED R_S1 SYMBOL 12. Switch to Runtime and note the default values (10 and 20 respectively). FIGURE 10: DEFAULT VALUES ASSIGNED 13. Click the SetCustomPropertyValue button. This action assigns the value of CP2 to CP1 from Tank1_001 (Figure 11 below). https://wdnresource.wonderware.com/support/kbcd/html/1/t002416.htm 5/11

FIGURE 11: VALUES ASSIGNED TO INT1, INT2 14. Open ObjectViewer and change the value of me.u2 in Tank1_002 to 200. The value changes in WindowViewer for the CP1 and CP2 (Figure 12 below) because now the Tank1_001 is changed to point to Tank1_002s as it is using the functionality of the OwningObject. FIGURE 12: VALUE CHANGES Advanced Techniques for Using SetCustomPropertyValue() This section shows how to successfully implement the new AASymbols property called SetCustomPropertyValue into an InTouch Managed Application which can be then be made a Deployed or Published application. The goal is to build a dynamic object that calls another AA symbol (show Symbol animation) in Runtime, and set the custom properties to point to different InTouch tags. Using this technique will save development time during Application design, and dramatically reduce the number of pop up windows needed to achieve the same result using old methods. You get extra value when you need to change a particular element in the symbol, because a single change is propagated to every symbol instance. Building the Application 1. Create a new derived InTouchViewApp and add the following tags to the Tagname Dictionary: Memory Discrete For Status of each Valve Memory Discrete Sets AUTO mode for each Valve Memory Discrete Sets MAN mode for each Valve Valve1_Status Valve1_Auto Valve1_Man Valve1 Valve2_Status Valve2_Auto Valve2_Man Valve2 Valve3_Status Valve3_Auto Valve3_Man Valve3 Valve4_Status Valve4_Auto Valve4_Man Valve4 2. For each valve name above e.g Valve1 add the initial value as its tagname. 3. Create a new toolset under the Graphic ToolBox called SetCustomProperty_Symbols. Memory Message Pass the name of the Valve selected in Runtime Valve_Name Create the Application Symbols https://wdnresource.wonderware.com/support/kbcd/html/1/t002416.htm 6/11

Valv e Sy mbol 1. Create a Valve Symbol called Valve. 2. Configure its custom properties as shown below: Custom Property Name Auto Man Valve_Name Valve_Status Data Type Boolean Boolean String Boolean FIGURE 12: EDIT VALVE SYMBOL CUSTOM PROPERTIES 6. Click OK. Use Figure 13 (below) for orientation in steps 7-11. 7. Draw a Rectangle. 8. Draw two horizontal lines. 9. Draw one vertical line that connects the two horizontal lines. 10. Draw one more vertical line at the below center. 11. Draw three text boxes (two at the bottom and one on top). FIGURE 13: VALVE GRAPHIC SYMBOL 12. Save and Close the Valve graphic symbol. Man_Auto Sy mbol 1. Duplicate the Switch3PositionBlack switch from the ArchestrA Symbol Library. You have a symbol called Switch3PositionBlack_Copy1. 2. Move Switch3PositionBlack_Copy1 to the SetCustomProperty Symbols toolset. 3. Rename Switch3PositionBlack_Copy1 to Man_Auto. 4. Add three more custom properties by right-clicking the embedded Man_Auto switch as shown in the followng table. 5. Click OK when you are finished. https://wdnresource.wonderware.com/support/kbcd/html/1/t002416.htm 7/11

Custom Property Name MyReferenceAuto MyReferenceMan Counter Data Type String String Integer FIGURE 14: MAN_AUTO CUSTOM PROPERTIES 6. Add a While Showing script as shown below. The Script builds the referenced tag, then changes the corresponding custom property using the SetCustomPropertyValue function. You can use this technique build a Symbol that can open another symbol. The open symbol then refers to the opening symbol automatically. if Counter < 2 then MyReferenceAuto = "Intouch:" + Intouch:Valve_Name.value + "_AUTO"; SetCustomPropertyValue("AUTOTag", MyReferenceAuto, 0 ); MyReferenceMan = "Intouch:" + Intouch:Valve_Name.value + "_MAN"; SetCustomPropertyValue("MANTag", MyReferenceMan, 0 ); Counter = Counter + 1; Endif; FIGURE 15: SYMBOL SCRIPTS 7. Click OK and return to our Valve Symbol and add the following: 8. Double-click on the Rectangle and add the following animations: Action Script: Intouch:Valve_Name.value = Valve_Name; https://wdnresource.wonderware.com/support/kbcd/html/1/t002416.htm 8/11

When the Valve is clicked the name is written into an InTouch tag called Valve_Name. Show Symbol: Point to the Man_Auto symbol created above, and under the Title Bar assign the custom property called Valve_Name. Value Display animation to left text box and point it to Automatic. Value Display animation to left text box and point it to Manual. Value Display animation to left text box and point it to Value_Name. FIGURE 16: ADD CUSTOM PROPERTIES TO SYMBOLS Label Sy mbol 1. Duplicate the ButtonGlossyOrange under switches from the ArchestrA Symbol Library. You have a symbol called ButtonGlossyOrange_Copy1. 2. Move ButtonGlossyOrange_Copy1 to the SetCustomProperty Symbols toolset. 3. Change ButtonGlossyOrange_Copy1 to Label. 4. Add a custom property called LabelName as a String data type (Figure 17 below). FIGURE 17: LABELNAME CUSTOM PROPERTY All ArchestrA Symbols are now ready to use. 1. Open the InTouchViewApplication created above. https://wdnresource.wonderware.com/support/kbcd/html/1/t002416.htm 9/11

2. Create a new Window called SetCustomProperty Window. 3. Embed the Valve symbol 4 times on the above window. 4. Assign the InTouch tags created above to each Valve symbol (Figure 18 below). FIGURE 18: INTOUCH TAGS IN EACH SYMBOL 5. Embed the Label symbol. 6. Figure 19 (below) shows the WindowMaker display. FIGURE 19: FOUR SYMBOLS IN WINDOWMAKER 7. Switch to runtime and click Valve1 as (Figure 20 below). Notice the Man_Auto symbol appears since we have used Show Symbol. 8. Click Automatic or Manual. The Automatic display is shown in Figure 20 (below). SetCustomProperty value is working. https://wdnresource.wonderware.com/support/kbcd/html/1/t002416.htm 10/11

FIGURE 20: AUTOMATIC MODE IN RUNTIME 9. Click Valve2 and you see the following display: FIGURE 21: VALVE2 WITH MANUAL SETTING Click the following icon to view this file in.pdf format: B. Shah & S. Vatrano Tech Notes are published occasionally by Wonderware Technical Support. Publisher: Invensys Systems, Inc., 26561 Rancho Parkway South, Lake Forest, CA 92630. There is also technical information on our software products at Wonderware Technical Support. For technical support questions, send an e-mail to support@wonderware.com. Back to top 2013 Invensys Systems, Inc. All rights reserved. No part of the material protected by this copyright may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying, recording, broadcasting, or by anyinformation storage and retrieval system, without permission in writing from Invensys Systems, Inc. Terms of Use. https://wdnresource.wonderware.com/support/kbcd/html/1/t002416.htm 11/11