System Platform 3 - Implementing Best Practices~3(1)
-
Upload
rosy-verenice -
Category
Documents
-
view
218 -
download
0
Transcript of System Platform 3 - Implementing Best Practices~3(1)
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
1/56
REV 1 [2008-09-18] [email protected]
Ground floorBlock DGilloolys View Office Park1 Osborne RoadBedfordview
Tel: 0861-WONDERFax: (011) 607-8478
System Platform 3.0
Implementing Best Practices
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
2/56
2
Objectives
The objective of this training is to focus attention on project building by touching on allsteps required and explaining some of the best practices and reasoning behind it. Thistraining is not intended as a first glance at InTouch or ArchestrA. In fact: It isrecommended that the student have at least some familiarity with the IDE, InTouch as wellas ArchestrA graphics.
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
3/56
3
Table of contents
Module 1 _________________________________________________________________ 51. The Basics _________________________________________________________________ 5
1.1. Base object derivation ____________________________________________________________ 51.1.1. Base level _________________________________________________________________ 51.1.2. Master Level _______________________________________________________________ 61.1.3. Application Level ___________________________________________________________ 6
1.2. Toolset Organisation _____________________________________________________________ 81.3. S95 __________________________________________________________________________ 8
Lab 1Building the Base Galaxy ________________________________________________ 101.1. Create the toolsets ______________________________________________________________ 101.2. Derive the Base Level Templates __________________________________________________ 111.3. Derive S95 Master level templates _________________________________________________ 12
2. The Project _______________________________________________________________ 132.1. The Plant _____________________________________________________________________ 132.2. Control Modules _______________________________________________________________ 14
2.2.1. Control Valve _____________________________________________________________ 142.2.2. Solenoid Valve ____________________________________________________________ 14
2.3. Transmitters __________________________________________________________________ 142.3.1. Level Transmitter __________________________________________________________ 14
2.4. Top level S95 _________________________________________________________________ 142.5. Shared Functionality ____________________________________________________________ 15
Lab 2Building the Master level templates ________________________________________ 172.1. Derive the templates ____________________________________________________________ 172.2. Enable Basic functionality ________________________________________________________ 17
Module 2 ________________________________________________________________ 193. The Application and Types of System objects ___________________________________ 19
3.1. The Application Level ___________________________________________________________ 193.2. PLC IO addressing _____________________________________________________________ 193.3. System Objects ________________________________________________________________ 19
3.3.1. $Area ___________________________________________________________________ 203.3.2. $WinPlatform _____________________________________________________________ 203.3.3. $AppEngine ______________________________________________________________ 203.3.4. $ViewEngine _____________________________________________________________ 21
Lab 3
Building the Application level templates ____________________________________ 22
3.1. Creating the System Objects ______________________________________________________ 223.2. Create Application level objects ___________________________________________________ 243.3. Implement auto IO addressing_____________________________________________________ 243.4. Set-up Redundancy _____________________________________________________________ 26
4. Instantiation and Deployment _______________________________________________ 274.1. Instantiation ___________________________________________________________________ 274.2. Deployment ___________________________________________________________________ 28
Lab 4Making it work ________________________________________________________ 29
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
4/56
4
4.1. Instantiate the Top level and System objects __________________________________________ 294.2. Instantiate One Mix Line _________________________________________________________ 294.3. Utilise galaxy dump/load_________________________________________________________ 304.4. Set up the deployment ___________________________________________________________ 31
Module 3 ________________________________________________________________ 335. Graphics _________________________________________________________________ 335.1. Graphic Toolbox _______________________________________________________________ 33Lab 5Creating the standards __________________________________________________ 35
5.1. Create a Panel standard __________________________________________________________ 355.2. Build Button standard ___________________________________________________________ 375.3. Build Valve standard ____________________________________________________________ 395.4. Build a Level Transmitter Standard _________________________________________________ 405.5. Build Master level Control Valve __________________________________________________ 405.6. Build Master level, Solenoid Valve _________________________________________________ 415.7. Build Master level, Level Transmitter _______________________________________________ 415.8. Build Application level tank graphic ________________________________________________ 415.9. Preparing to create InTouch Screens ________________________________________________ 425.10. Create the Overview graphics _____________________________________________________ 42
6. The InTouch Application ___________________________________________________ 446.1. Navigation ____________________________________________________________________ 446.2. Data transfer __________________________________________________________________ 44
Lab 6Build the InTouch ______________________________________________________ 456.1. Create a new InTouch Application _________________________________________________ 456.2. Build the Navigation system ______________________________________________________ 456.3. Build a Standard Show Window Button _____________________________________________ 466.4. Build a Navigation Bar __________________________________________________________ 466.5. Create the InTouch Windows _____________________________________________________ 47
Module 4 ________________________________________________________________ 487. Assistant Graphics _________________________________________________________ 48Lab 7Creating and using an Assistant graphic ____________________________________ 49
7.1. Create an assistant Button ________________________________________________________ 497.2. Using an assistant button _________________________________________________________ 49
8. Popup graphics ___________________________________________________________ 508.1. Show symbol__________________________________________________________________ 508.2. InTouch Windows ______________________________________________________________ 50
Lab 8Creating Popups _______________________________________________________ 518.1. Creating the popups _____________________________________________________________ 518.2. Creating object specific pop-ups ___________________________________________________ 538.3. Change Equipment Symbols ______________________________________________________ 548.4. Enable the Level Transmitters popup _______________________________________________ 54
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
5/56
5
Module 1Derivation and Model
1. The Basics
Before a project is attempted it is necessary to perform some basic steps. This will resultin a base galaxy that should always be the starting point of a new project. These stepsrequire some thought and include the following:
Base object derivation
Toolset organisation Modelling standard
1.1. Base object derivation
System Platform galaxies ship with several default templates (e.g. $WinPlatform,$UserDefined etc.). These templates should never be instantiated directly as they cannotbe modified.
Best PracticeNever instantiate objects directly from top level (default)templates
Top level (default) templates cannot be modified this means that all changes mustbe made in instances (of which there may be many)
It should always be remembered that derivation implies the sharing of functionality.Derivation view indicates which objects share functionality and capability with which. Aparent objects capabilities are inherited by a child object.
1.1.1. Base level
All Default templates that will be required should be derivedto a first level of derivation called the Base Level derivation.These templates should be prefixed with b_. Thesetemplates will normally be an unmodified version of the
default templates but it does provide the opportunity toimplement certain capabilities to all descendants of them, forinstance a Debug Property.
Examples would be: $b_UserDefinedand$b_WinPlatform.
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
6/56
6
1.1.2. Master Level
Master objects are the standards of the enterprise. They are prefixed with an m_. Masterobjects are derived from base objects and not from top-level (default) objects. Masterobjects are normally enforced Standards (e.g. what properties should at a minimum be
present in the template) or Enterprise specific standards (i.e. an object representing aphysical asset that is used in all parts of the enterprise and should be standard e.g.$m_LIMS). Master objects can also be lower derivatives of the abovementioned objects,but should contain no Application specific functionality (e.g. $m_Valve $m_ControlValve).
Generally IO assignment can be viewed as Application specific (since varioussites/applications might have different PLCs). IO assignment can be present in Mastertemplates, however, if the method of this assignment should be standardised.
Note that if a complex object is required to be standard across all Applications, it should bebuilt in the Master level. This means that Master level templates can already be containerswith contained objects.
1.1.3. Application Level
Application type objects arespecific to an application this might be functionallyspecific or PLC specific.Application objects areprefixed with a#_ and arealways derived from masterobjects. The # in the prefixshould identify theApplication. This can be aproject code. Applicationlevel objects will be used toinstantiate objects. Thismeans that Application levelobjects can be containedobjects.
If application specificfunctionality (such as IO
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
7/56
7
assignment) exists for a master object another a-level derivation is needed. In otherwords: If all pumps in this application have something in common (such as PLCaddressing) but differ from pumps in other applications in the enterprise then an$a#_Pump is required. In this case the derivation will look as shown.
In the following example System Integrator A (SIA) designed a Mixing Tank with anAgitator. They designed their own Agitator with their custom code ($a0_Agitator). LaterSystem Integrator B (SIB) designed a Reactor for the company it also requires anAgitator, but this one has some differences to that of SIAs. Even though both SIsstandardised on $m_Agitator, they have made different implementations of it.
Best PracticeCreate three levels of derivation (Base, Master and Application)
Base level templates allow propagation of asset independent functionality across the
entire galaxy/enterprise. Master level templates allow the setting of standards without restricting the
implementation of those standards.
Application level standards allow the individual implementation of master levelstandards while also providing for splitting different implementations
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
8/56
8
1.2. Toolset Organisation
Toolsets in the Toolbox should be created to reflect at least the Base-Master-Application derivation. Toolsets should be numbered to reflectorganisation. Further division of toolsets can also be made and againnumbering can be used to sort toolboxes into the desired position.
When a number is assigned to a specific toolset in one level (e.g.Master level) this number should be used in other levels as well tokeep continuity.
Best PractiseCreate Numbered Toolsets and hide unusedtoolsets
Numbered Toolsets can be sorted alphabetically
Navigation to standardised tools are easier if they organised
into a well-defined structure
Hiding unused toolsets prevents the usage of incorrecttemplates
1.3. S95
It is desirable to have a standard for modelling and the S95 standard is recommended forthe top levels.
The concept is implemented in the three levels (Base, Master and Application). The Baselevel has no relevance here except for the fact that a decision needs to be made as towhich S95 levels should derive from $b_Area and which ones from $b_UserDefined.Usually the distinction is made between Work Centres and Work Units in the S95 model,
Collectivelyknown as Work
Centres
Collectivelyknown as Work
Units
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
9/56
9
with Work Centres and higher hierarchical objects deriving from $b_Area and Work Unitsand lower objects from $b_Userdefined.
Best PracticeImplement the S95 standard for the plant model
This standard is international and will make an application more understandable forother users/developers.
The standard has been well thought through and alleviates the developer from thisresponsibility.
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
10/56
10
Lab 1Building the Base Galaxy
Notice that at this point no clue has been given as to what application will be built or whothe end-user is. Not even a P&ID drawing has been made available yet. The point is this:This part of the galaxy is application independent.
1.1. Create the toolsets
To create a new toolset called 0. Base Templates:o Open the Template Toolboxo Right-Click the Galaxy Nameo Click New Template Toolseto Type 0. Base Templates (without the Quotes)o Press Enter
Create two more toolsets calledo 1. Master Templateso 2. Application 0 Templates
Under each of these toolsets create three more toolsetso 1. Systemo 2. Applicationo 3. Device Integration
Under the 1. Master Templates | 2. Application toolset create the followingtoolsets:
o 1. S95 Top Levelo 2. S95 Wok Centreso 3. S95 Work Unitso 4. S95 Modules
Due to time constraints it is not possible to let everyone create every toolset.Instead, follow this procedure to create the toolsets quickly:
o Delete the 0. Base Templates by following this procedure
Click on 0. Base Templates Press the Delete button Click Yes to delete the toolset and all the subsets
o Delete the following toolsets 1. Master Templates 2. Application 0 Templates
o Click on Galaxy| Configure | Customise Toolsetso Select the Toolset called Super Secret hidden Toolseto Click on the Close Buttono Click and drag the Toolsets below Super Secret hidden Toolset onto
the Galaxyo Delete Super Secret hidden Toolset
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
11/56
11
1.2. Derive the Base Level Templates
To Derive a base-level Template for $UserDefined:o Right-click $UserDefinedo Navigate to New| Derived Templateo Rename the new template to b_Userdefined
Derive new base-level templates for:o AppEngineo Areao ViewEngineo WinPlatformo Sequencero OPCClient
Move the base level templates into their respective toolsets as shown.
Move $InTouchViewApp into the 0. Base Templates |1. System Toolset (thistemplate is the InTouch application and can only be derived once)
Hide the Original System toolseto Right-click the System toolseto Click Hide
Hide the other original toolsets:o Applicationo Device Integration
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
12/56
12
1.3. Derive S95 Master level templates
From $b_Area derive a $m_Enterprise with thefollowing procedure:
o Right-click $b_Areao Click on New | Derived Templateo Change the name to m_Enterprise
Derive the following S95 templates from $b_Areao $m_Siteo $m_Areao $m_WorkCentre
Derive the following S95 templates from$m_WorkCentre:
o $m__ProcessCell (Notice the doubleUnderscore)
o $m__ProductionLineo $m__ProductionUnito $m__StorageZone
Derive the following from $b_UserDefined
o $m_WorkUnito $m__ControlModuleo $m__EquipmentModuleo $m__Transmitter
Derive the following from $m_WorkUnito $m__ContinuousUnito $m__StorageCello $m__Unito $m__WorkCell
Move the Templates to their correct toolsets asshown
Notice that the double underscore used in some of the
templates will ensure that those templates always appear at the top of theparticular toolset.
Will createSystemsAreas Later
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
13/56
13
2. The Project
2.1. The Plant
The End-client is a company called GummiBears Incorporate. The company has severalproduction sites, some bottling sites and two packaging sites.
This project will be the pilot project for the complete enterprise. Production sites haveseveral distinct areas with the biggest being the Extract Mixing Area. The Pilot project isfor the Extract Mixing Area in one of the production sites. The Sherwood Forest site hasbeen selected for the Pilot. The Extract Mixing Area consists of several Mixing Lines (The
Sherwood Forest one has four designated S_E_MX001 to S_E_MX004). Each mixingline has two tanks used to premix extracts used in production. A P&ID is shown for onemix line (all four are identical).
The client also supplied a list of PLC blocks for the various equipment types. Notice that
the Solenoid Valve PLC block does not calculate the travelling time. The client hashowever requested that this calculation be made in the ArchestrA framework. The clienthas also indicated that other Sites have tanks that contain more or less inlet valves.
The PLC block naming scheme is built using one or two letter acronyms for Process cells(PC), Units (UN), Control Modules (CM) and Transmitters (TX) and three figure numbersfor each of these (###). These numbers are separated by underscores. A genericexample would look as follows:
PC###_UN###_CM###
Some of the acronyms are listed below
Mixing Line = MX Tank = T Inlet Valve = IV
Outlet Valve = OV Level Transmitter = LT
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
14/56
14
2.2. Control Modules
2.2.1. Control Valve
Outputs
Status.Position
Status.Open
Status.Closed
Status.TravellingTime
Inputs
Cmd.Position
Control Valve
2.2.2. Solenoid Valve
Outputs
Status.Open
Status.Closed
Inputs
Cmd.Open
Cmd.Close
Solenoid Valve
2.3. Transmitters
2.3.1. Level Transmitter
Outputs
PV
Inputs
Transmitter
From the PLC block it is evident that all transmitter types look the same.
2.4. Top level S95
The S95 Enterprise is obviously GummiBears Inc. There seem to be three different typesof S95 sites (Production, Bottling and Packaging). There also seem to be different typesof S95 areas (at least there is an Extract Mixing Area). The plant in question is most
definitely batch orientated this means that Process Cells and Units should be identified.A natural division is presented for this namely the Mixing lines (Process Cells) and Tanks(Units).
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
15/56
15
2.5. Shared Functionality
The Derivation structure in ArchestrA implies shared functionality. When comparing theSolenoid valve and the Control Valve several common capabilities are revealed:
Open limit switch Closed limit switch
From the clients request it is also implied that the travell ing timeshould be present inboth the valve types.
These three properties should be added to a template (called $m_Valve). From thistemplate the Control and Solenoid valves can be derived.
A well-defined naming convention should be used for attributes. A suggested namingconvention is provided on the next page.
Best PracticeUse a well defined naming convention for all attributes
This will help identify the purpose of an Attribute.
It will also identify its context which will assist with the security assignment.
It will also allow better sorting (for instance when locating all UDAs that must beconfigured in design time)
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
16/56
16
Description Naming convention Security/CategorySet-up parameter setduring design time (TypicallyStartup scripts use them)
Setup.[Attribute].ParameterSetup.[XML].Folder
(Folder is created the first time the object deploys)
Read Only
Configurable parameter Object must be set off scan to
change (typically OnScanscripts use them)
Cfg. [Attribute].ParameterCfg.[OrderDataBase].ServerName
(Connection is established every time the Engine goes on
Scan)
Configure
Engineering Set Point Only certain personnel canchange these
Eng. [Attribute].SetPointEng.[Feeder].Speed.Maximum
(Only Tune permitted users can change the maximum speed)
Tune
Calculate value Cannot bechanged by anything but ascript
Calc. [Attribute].ParameterCalc.[Cable].Length
(Length is calculated from measured weight)
Calculated
Set point Operational setpoints that can be changedby operators
SP. [Attribute].SetPointSP.[Feeder].Speed
(Operating set point speed of feeder)
Operate
Commands When set toTRUE, a function is
performed. On completionthe value returns to FALSE
Cmd.[Attribute].CommandCmd.[Feed].Start
(Start the Feed sequence)
Depends oncommand
Mode Select Indicates aspecific mode. Stays in stateuntil mode is changed.
Select.[Attribute].ModeSelect.[Mode].Auto
(Selects the Auto mode)
Depends on mode
Process value Typically anAnalogue value that ismeasured with andinstrument.
[Attribute].PV [Level].PV
(Process value of the Level)
Object Writable
Status value Indicatesstatus of something in thefield (typically not anAnalogue value)
Status.[Attribute].StatusStatus.[InletValve].Open
(Indicates when the valve is open)
Object Writable
Alarms flag Indicates thatsomething is in alarm [Attribute/Status/PV].AlarmType.Alarm [Tank].Level.High.Alarm(Indicates Tank is in alarm because level is high)
Object Writable
Interlock flag Indicates thatsomething is interlocked
[Attribute/Status/PV]. InterlockType.Interlock [Pump].ValveClosed.Interlock
(Indicates Pump is interlocked because valve is closed)
Object Writable
Simulation Attributes Used to simulate something.An object should still befunctional if all SimulationAttributes and Scripts areremoved
Sim.RestofNamepartsSim.Eng.SimulatedPV.Maximum
(Change the maximum simulated PV value)
Depends onsimulation
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
17/56
17
Lab 2Building the Master level templates
The next step is to start designing enterprise wide standards.
2.1. Derive the templates Derive the following templates:
o $m_MixLine (from $m__ProcessCell)o $m_Tank (from $m__Unit)o $m_Valve (from $m__ControlModule)o $m_ControlValve (from $m_Valve)o $m_SolenoidValve (from $m_Valve)o $m_LevelTransmitter(from $m__Transmitter)
2.2. Enable Basic functionality
Open $m_Valve
On the Field Attributes page add a Status.OpenField attribute with thisprocedure:
o Click the button.o Type Status.Open as the Nameo Change the Access Mode to Inputo Supply a descriptiono Leave the Input source as ---.---
Leaving this will cause an error if the $m_valve is instantiateddirectly this is correct since there is no auto addressingscheme and directly instantiating the template will cause aproblem. Only change the address to --- if an auto addressingscheme is present on that level.
Add another identical Field Attribute called Status.Closed
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
18/56
18
Click on the Object Information tab and supply a valid description Click on the UDAs tab
Create a Status.TravelTimeUDA with the following procedure:o Click the buttono Type the name Status.TravelTimeo Select the data type as ElapsedTime.
Save and close $m_Valve Open $m_ControlValve
Add an Analogue (Float) Field Attribute called Cmd.Position Enter a Description
Make the Engineering Units % Add another Analogue (Float) Field Attribute called Status.Position
Change the access mode to Input Enter a Description
Make the Engineering Units % Save and close $m_ControlValve Open $m_SolenoidValve
Add a Discrete Field Attribute called Cmd.Open Enter a Description Add an identical Field Attribute called Cmd.Close Save and close $m_SolenoidValve
Open $m__Transmitter Add an Analogue (Float) Field Attribute called PV Change the access mode to Input
Enter a Description Make the Engineering Units Litres Save and close $m__Transmitter
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
19/56
19
Module 2Functionality and Deployment
3. The Application and Types of System objects
3.1. The Application Level
The next step is the implementation of the Application level templates. The Applicationlevel templates implement functionality specific to the application. The application can beinterpreted as an implementation:
By the same System Integrator For the same PLCs
For the same Project For the same Area/Type of plant
The lowest level in the Master level should always be derived as the top level of theApplication level.
At this level the tank can now also be assembled with its contained control modules andtransmitters. The Container template should contain only one of each type of controlmodule or transmitter. The tanks in this system contain one or more identical inlet valves,one outlet valve and a level transmitter. The Application level tank template should onlycontain one inlet valve. This will allow the developer to instantiate the number of valvesrequired while maintaining a derivation structure that does not become unmanageable.
3.2. PLC IO addressing
Typically the PLC addressing scheme is also handled in the Application level. This allowsthe same standard (e.g. $m_VSD_Motor) to be implemented on different PLCs($aSiemensS7_VSD_Motor, $aABCIP_VSD_Motor etc.). In this project the PLC used is aDreamPLC and the OPC server is an ArchestrA Dream PLC DA Server. In the ArchestrAmodel a $b_OPCClient derivative will be used. The derivative is once again notinstantiated directly but derived to a Master template (specifying enterprise widestandards) and an Application level template (specifying Application specificconfiguration).
Auto addressing implies that an object (such as a transmitter) can identify itself and itsPLC IO address on start-up and automatically assign its addresses. Several methods can
be used but a simple one is shown here. It presumes a per object/application prefixindicating the PLC and scan group and a per engine OPC client (which allows a developerto move objects across engines without having to change addressing).
3.3. System Objects
One part that has been neglected up till now is the system objects ($b_WinPlatform,$b_AppEngine etc.). A System Platform implementation usually consists of:
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
20/56
20
Galaxy Repository At least one Application Server At least one View Client
This leads to the following derivations of System objects.
3.3.1. $Area
A $m_SystemsArea template (with its corresponding $a0SystemsArea) is required.This template will be used to house the system objects (Platforms, Engines etc.) in themodel view.
Best PracticeCreate a Systems Area on an engine running on the GR tocontain system objects
This allows rolling up diagnostic data
It also provides a logical place for system objects in the model (which would otherwisebe hosted underUnassigned Area)
3.3.2. $WinPlatform
There should be at least the following Master level derivations of$b_WinPlatform:
$m_GRPlatform $m_AppServerPlatform $m_ViewClientPlatform
Following the BMA derivation scheme this means that the at least the same set ofApplication level derivations should be made.
3.3.3. $AppEngine
Several types of application engines are also needed. The most obvious is the$m_AppEngine with its corresponding $a0_AppEngine. Two other engines are alsorequired:
$m_GREngine ( $a0_GREngine): This engine will house the centralisedobjects (S95 Enterprise, may be the S95 Site as well as the Systems Area). Thisengine can also be used to calculate some diagnostic data on the system objects
$m_TestEngine ($a0_TestEngine): This engine is used to temporarily hostareas with objects still being tested. This engine has a big advantage in that
objects can be tested in an environment that can interact with the realenvironment while only risking the Test Engine and in extreme cases the serverhosting the Test Engine. The Test Engine can usually be run on the GalaxyRepository, since the system can function without the Galaxy repository for a fairperiod of time.
All engines should have a tag pointing to its corresponding Device Integration Object.
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
21/56
21
3.3.4. $ViewEngine
The $b_ViewEngine is derived twice once to the Master level and then to the Applicationlevel in keeping with the BMA derivation scheme.
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
22/56
22
Lab 3Building the Application level templates
In this lab a set of application level objects will be created for the system includingApplication Engines, Platforms as well as Device Integration objects. The auto addressingscheme is also addressed.
3.1. Creating the System Objects
Open the $b_AppEngineand create a UDA called Cfg.DIObjectName of typeString. Set the value to DreamPLCClient
Save and close the $b_AppEngine
Derive the following Templateso $m_SystemsArea (from $b_Area)o $m_AppServerPlatform (from $b_WinPlatform)o $m_GRPlatform (from $b_WinPlatform)o $m_ViewClientPlatform (from $b_WinPlatform)o $m_AppEngine (from $b_AppEngine)
o $m_GREngine (from $b_AppEngine)o $m_TestEngine (from $b_AppEngine)o $m_ViewEngine (from $b_ViewEngine)o $a0_SystemsArea (from $m_SystemsArea)o $a0_AppServerPlatform (from $m_AppServerPlatform)o $a0_GRPlatform (from $m_GRPlatform)o $a0_ViewClientPlatform (from $m_ViewClientPlatform)o $a0_AppEngine (from $m_AppEngine)o $a0_GREngine (from $m_GREngine)o $a0_TestEngine (from $m_TestEngine)o $a0_ViewEngine (from $m_ViewEngine)
Place them in the correct toolsets as shown
Derive $m_DreamPLCClient from $b_OPCClient and open it.o Leave the Server Node name blank (this will use the local machine)o Drop down the Server name and select ArchestrA.DreamPLC.1o Lock the two attributes mentioned above as per Figure on the next page
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
23/56
23
o Save and Close
Derive $a0_DreamPLCClient_ExtractMixing from $m_DreamPLCClient. Open $a0_DreamPLCClient_ExtractMixing
Click on the Scan Group Tab Add a new ExtractMixingScan group using this procedure:
o Click the buttono Type ExtractMixingo Leave the update interval at 500ms
o Save and Close
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
24/56
24
3.2. Create Application level objects
Derive the following objects and assign then to the correct Toolsetso $a0_Enterprise from $m_Enterpriseo $a0_ProductionSite from $m_Siteo $a0_ExtractMixingArea from $m_Areao $a0_MixLine from $m_MixLine (Assign to Work Centre)o $a0_ControlValve from $m_ControlValveo $a0_SolenoidValve from $m_SolenoidValveo $a0_Level_Transmitterfrom $m_Level_Transmittero Change all the input Sources for the three above mentioned templates
from ---,--- to ---o Add an input source extension to the $a0_ControlValve for UDA
Status.TravelTime Create a $a0_Tank container using this procedure and assign it to the correct
Toolseto Derive $a0_Tank from $m_Tanko Derive a template from $a0_ControlValveand call it InletValveo Drag and drop the InletValve template to the $a0_Tanko Derive a template from $a0_SolenoidValveand call it OutletValveo Drag and drop the OutletValve template to the $a0_Tanko Derive a template from $a0_Level_Transmitterand call it Levelo Drag and drop the Level template to the $a0_Tank
3.3. Implement auto IO addressing
For templates $a0_Level_Transmitter, $a0_ControlValve and $a0_SolenoidValveimplement the following auto addressing scheme:
Create these UDAso Cfg.IOAssign.Prefix as String (set value to ExtractMixing.PLC.001.
excluding quotes but including dots) This indicates the PLC andScangroup to use.o Cfg.IOAssign.ScanCycle as Integer (set the value to 2 This will
determine on which scan cycle the IO addressing takes place) o Status.IOAssign.Complete as Boolean This will indicate that the
addressing is complete Create a script called Script.IOAssign with this procedure
o Click on the Scripts tabo Click the buttono Type Script.IOAssigno In the Expression type me.Status.IOAssign.Complete
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
25/56
25
o Select the Trigger type as WhileFalseo Lock all of the Locks
On all three add the following code:
Add the specific code pieces as indicated:
o Control Valve
o Solenoid Valve
IF me.Script.IOAssign.ExecutionCnt >= me.Cfg.IOAssign.ScanCycle THENDIM ThePrefix AS STRING;ThePrefix = myEngine.Cfg.DIObjectName + "." + me.Cfg.IOAssign.Prefix +
StringRight(me.Tagname,StringLen(me.Tagname)-4)+".";
{Add Template specific code here}
me.Status.IOAssign.Complete = TRUE;ENDIF;
'FA Inputsme.Cmd.Position.Input.InputSource = ThePrefix + "Cmd.Position";me.Cmd.Position.Output.OutputDest = ThePrefix + "Cmd.Position";
'FA Inputsme.Status.Position.Input.InputSource = ThePrefix + "Status.Position";me.Status.Closed.Input.InputSource = ThePrefix + "Status.Closed";me.Status.Open.Input.InputSource = ThePrefix + "Status.Open";
'UDAsme.Status.TravelTime.InputSource = ThePrefix + "Status.TravelTime";
'FA In and Outsme.Cmd.Open.Input.InputSource = ThePrefix + "Cmd.Open";me.Cmd.Open.Output.OutputDest = ThePrefix + "Cmd.Open";me.Cmd.Close.Input.InputSource = ThePrefix + "Cmd.Close";me.Cmd.Close.Output.OutputDest = ThePrefix + "Cmd.Close";
'FA Inputsme.Status.Closed.Input.InputSource = ThePrefix + "Status.Closed";me.Status.Open.Input.InputSource = ThePrefix + "Status.Open";
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
26/56
26
o Level Transmitter
Best PracticePrefix all Scripts with an identifier such as Script. and givedescriptive names
The prefix will help identify scripts (and sort them together) in Object Viewer.
Descriptive names always give a first indication as to the purpose of a script
3.4. Set-up Redundancy
Open the $a0_AppEngine
Go to the Redundancy tab Select the Enable Redundancy tick (Application engines in this system will be
redundant by default)
'FA Inputsme.PV.Input.InputSource = ThePrefix + "PV";
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
27/56
27
4. Instantiation and Deployment
4.1. Instantiation
Single instantiations of objects are very intuitive (drag and drop) and the S95 model canbe followed until the lower levels are reached: These are usually addressed by the P&IDdrawings. The tedious part is usually the instantiation of many instances. This can beaccomplished by using the Galaxy Dump/Load operations.
The concept is fairly simple: Create a single instance each of the repeated items and thenexport the Galaxy to CSV format. The CSV can then be modified to only retain therelevant columns. Duplicate the entries and set up the multiple instances in the CSV.This CSV can then be imported resulting in the correct configuration.
Best PracticeUse Galaxy load function with minimum columns to createmultiple instances
This method allows a developer to leverage the power of Excel to design the model.
The method also provides better consistency as it is easier to recognise discrepanciesin Excel.
The Galaxy load function will also assist in getting the correct contained names of objects.
All objects have at least one name called the Tag name. Contained objects also have asecond name called the Contained name. When referencing any object or tag in anArchestrA galaxy the first object of the reference should always be a Tag name except ifthe reserved relative referencing words are used (me, mycontainer, myarea, myEngineetc). Only one Tag name can be used in a reference. An example would be:ATagname.ContainedName1.ContainedName2.ContainedName3.Attribute
The tag name is the objects identity no other object may have the same tag name. Atag name uniquely identifies an object in the galaxy. A solid naming convention is highlyrecommended. A good example of this would be the ANSI ISA S5.1/1984 (R1992)standard.
A contained name uniquely identifies an object within its container other objects in thegalaxy may have the same contained name but not if they are in the same container. It isdesirable to make the contained name descriptive of its role or function in the containere.g. Fan_Motor, Jacking_Oil_Pump, Inlet_Valve etc.
Best PracticeMake contained names descriptive
This allows a user to easily navigate into an object without the need to know the exactname of the contained object e.g. T001.Level might mean more than LT003
The actual instantiation is done from the Application level templates.
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
28/56
28
Best PracticeAlways instantiate objects from the Application level
This is done for consistency
It also helps future proof the solution by always providing a level for implementing astandard and a level for implementing specific customisation.
4.2. Deployment
Once the galaxy is in a state to commence with the first deployment, consideration shouldbe given to future performance. System Platform can utilise multiple CPUs and CPUcores on a server and the best way of leveraging that capability is to split instantiate twoengines per CPU core (these include backup engines). Ensure that each engine has itsown OPC client to the PLC.
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
29/56
29
Lab 4Making it work
This lab is about getting it all to work i.e. instantiating the objects and deploying them.
4.1. Instantiate the Top level and System objects Instantiate a $a0_Enterprise object called GummiBearsInc with the following
procedure:o Right-Click $a0_Enterpriseo Navigate to New | Derived Instanceo Type GummiBearsInc and press Enter
Now instantiate the following:o SherwoodForest from $a0_ProductionSiteo Drop SherwoodForest onto GummiBearsInc
Use Shift F2 to change the contained name toProductionSite_001
o S_ExtractMixing [ExtractMixing_001] from $a0_ExtractMixingArea
(Contained name in Square brackets)o Drop S_ExtractMixing onto SherwoodForesto SystemsArea [SystemsArea] from $a0_SystemsAreao Drop SystemsArea onto GummiBearsInc
Derive the following Instances:o From $a0_GRPlatform
GRPlatformo From $a0_AppServerPlatform
AOS_01 AOS_02
o From $a0_ViewClientPlatform ViewClient_01
o From $a0_AppEngine
AppEngine_001 AppEngine_002 AppEngine_003 AppEngine_004
o From $a0_GREngine GREngine
o From $a0_TestEngine TestEngine_001
o From $a0_ViewEngine ViewEngine_001
o From $a0_DreamPLCClient_ExtractMixing DreamPLCClient_001 DreamPLCClient_002 DreamPLCClient_003 DreamPLCClient_004 DreamPLCClient_GR DreamPLCClient_Test
Organise them as shown
4.2. Instantiate One Mix Line
Set the S_ExtractMixing Area as the Default with these steps:
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
30/56
30
o Right-click S_ExtractMixingo Click Set as Default
Derive the following Instances:o From $a0_MixLine
S_E_MX001 [MixLine_001] note that it appears underS_ExtractMixing
Set S_E_MX001 as defaulto From $a0_Tank
S_E_MX001_T001 note that the Inlet, outlet valves andtransmitters are automatically created
S_E_MX001_T002o From $a0_Tank.InletValve
S_E_MX001_T001_IV002[InletValve_002]
S_E_MX001_T002_IV002[InletValve_002]
Drag S_E_MX001_T001_IV002 into S_E_MX001_T001 Drag S_E_MX001_T002_IV002 into S_E_MX001_T002
Renameo InletValve_001 to S_E_MX001_T001_IV001
Change Contained name toInletValve_001
o InletValve_002 to S_E_MX001_T002_IV001 Change Contained name to InletValve_001
o Level _001 to S_E_MX001_T001_LT001o Level _002 to S_E_MX001_T002_LT001o OutletValve_001 to S_E_MX001_T001_OV001o OutletValve_002 to S_E_MX001_T002_OV001o Make sure that the two second InletValves have the correct contained
Names Note that errors are present
o Right-click any object with an error (e.g. S_E_MX001_T001_OV001)o Click Propertieso Click on the Errors/Warnings Tabo Note the warning states that the Cfg.DIObjectNamecould not be found
on myEngine. This is because these objects have not been assigned toan Engine yet (i.e. myEngine does not exist for them).
4.3. Utilise galaxy dump/load
Select everything underS_ExtractMixing
Right-click anywhere on the selection
Navigate to Export | Galaxy Dump Supply a file name for the CSV file
o
Do not overwrite the existing ExtractMixing.CSV file Open Explorer (Windows Key + E) Navigate to the CSV file Double-click the file
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
31/56
31
Caution
Double-clicking a CSV file to open in Excel can sometimes take a very long timeto open. This is due to a bug that was re-introduced into the Office suite withversion 2007. Do not attempt to close the Excel as it will continue loading thedocument and then when it is done close
Select the A column by clicking on the A On the menu click Data In the Data Tools Group, click Text to Columns Select the Delimitedoption
Click Next Select the Comma delimiter
Click Finish For multiple instantiation, everything up to column E (Contained Name) is
required delete the rest they are optional The Excel file can now be manipulated to create multiple named instances.
Caution
The initial export is done in Unicode but Excel does not save the Unicode in thesame format. One should always use the Save as function and select the
output type as CSV.
Creating the Excel file can be time consuming so a pre-built CSV is suppliedunder My Documents\The Lazy Folder
Import the ExtractMixing.CSV file into the Galaxy with these stepso Click on Galaxyon the Menu
o Navigate to and click Import | Galaxy Loado When completed check in Mixing line 001 objects
4.4. Set up the deployment
Assume the client has 2 application servers with single Duo Core CPUs. The totalnumber of cores will therefore be 4 (2 per server). This means 8 Engines (4 Primary and4 Backup). It is for this reason that 4 Application Engines (AppEngine_001 to 004) havealready been instantiated
Click on the Deployment View
Drag and drop the following Application Engines onto their respective platformso GREngine onto GRPlatform
o TestEngine_001 onto GRPlatformo AppEngine_001 onto AOS_01o AppEngine_002 onto AOS_01o AppEngine_003 onto AOS_02o AppEngine_004 onto AOS_02o AppEngine_001 (backup) onto AOS_02o AppEngine_002 (backup) onto AOS_02o AppEngine_003 (backup) onto AOS_01o AppEngine_004 (backup) onto AOS_01
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
32/56
32
Drag ViewEnginew_001 onto ViewClient_01
Drag and drop the OPC clients to their respective Application Engines Open each engine end ensure that the Cfg.DIObjectName on each engine is set
to the respective OPC client.o DreamPLCClient_Test onto TestEngine_001o DreamPLCClient_GR onto GREngine
o DreamPLCClient_001 onto AppEngine_001o DreamPLCClient_002 onto AppEngine_002o DreamPLCClient_003 onto AppEngine_003o DreamPLCClient_004 onto AppEngine_004
Drag the following areas onto the GREngineo GummiBearsInco SherwoodForesto S_ExtractMixingo SystemsArea
The Areas would normally now be split between the Application engines to eventhe load among the Engines. However, since only a Galaxy Repository Server isavailable, all the areas will be deployed to the Test Engine on the GalaxyRepository.
o Drag and drop the four mixing lines (S_E_MX001 to S_E_MX004) ontothe TestEngine_001.
At this point the Simulation is also required Import the simulation objects into thegalaxy with these steps:
o Click on Galaxyo Navigate to Import | Objectso Navigate My Documents\The Lazy Foldero Double-Click Simulation.aaPkg
Right-Click on the GRPlatform Click Deploy Ensure Cascade Deployis selected
Click OK
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
33/56
33
Module 3Graphics
5. Graphics
5.1. Graphic Toolbox
All graphics should begin their lives in the Graphic toolbox. The Graphic Toolbox contains,by default, the ArchestrA Symbol Library. This library should be left intact and a newlibrary should be created and appropriately named. This library can contain several typesof graphics. A simple division of the toolbox would look as follows:
Independent Graphics: These graphics have specific functions but workindependently from the ArchestrA Galaxy. Typically navigational tools areexamples of these.
Standard Graphics: These graphics are used as parts or components ofIndependent graphics or object specific graphics. These graphics are built as selfcontained graphics exposing only those custom properties required to use thegraphic.
Assistant Graphics: These graphics are typically implemented standardgraphics which require additional action scripting as such the scripting in thestandard needs to be exposed to the end-user. This is accomplished byreapplying the standards scripting on the standard (which is set to be treated asan icon which will override the original scripts). This is then stored as an assistantgraphic. To use it: Embed it, Convert it to a group and ungroup it.
Best PracticeCreate self contained graphics in the graphic toolbox with onlyone level of custom properties exposed
This allows the implementation of standards changes are made in a central place
These graphics are embedded wholly into objects and only configured there thisallows the developer to set the owning object of the graphic thereby making it dynamic
Custom properties from embedded graphics should be propagated to the maingraphic and marked as private in the embedded graphic This will hide confusingmulti-level properties from end-users.
Graphics can have multiple levels of embedment. Although this is a very powerfulfunction, it presents some opportunities for confusion if not treated with respect. Thefollowing is a list of things to do when working with graphics:
Always name elements (embedded graphics or graphical elements) withdescriptive names
Supply descriptions for graphics
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
34/56
34
If a graphic that is embedded has public custom properties, create thoseproperties in the outside graphic and let the embedded graphic reference thoseproperties mark them as private in the embedded graphic
Always supply descriptions with custom properties especially public properties.
These same rules can be applied to using graphics from the ArchestrA Symbol Library.
Best PracticeIf a symbol library symbol is used as a standard and changesare to be made to it, make a copy of the symbol and use thecopy. If no changes are to be made: use the symbol directly
Using a symbol directly allows the user to benefit from any future upgrades made tothe symbol by Wonderware
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
35/56
35
Lab 5Creating the standards
5.1. Create a Panel standard
As an example of the usage of standards, most of the system built here will be built on asingle Panel.
Open the Graphic Toolbox Click on Galaxy | Configure | Customise Toolsets Select the Toolset called Super Secret hidden Toolset (notice it is on the
Graphic tab) Click and drag the Toolsets below Super Secret hidden Toolset onto the Galaxy Delete Super Secret hidden Toolset Navigate to this toolset: Custom Graphics | 2. Standards | 1. Building Blocks | 1.
Visual Standards Right-Click 1. Visual Standards Click New| Symbol
Type the name S_Panel Open S_Panel
Supply a Description (Standard Framed Panel) Use the Rectangle tool and create a rectangle of size 150150 Click on the Rectangle Supply a name for the rectangle (ThePanel) Click the arrow next to the button on the Toolbar Click the More Gradients item Set up the colours as shown
Click the arrow next to the button on the Toolbar Click the More Gradients item
Set up the colours as shown
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
36/56
36
Selected the line size as shown
The resultant panel is shown
Save and Close the Panel
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
37/56
37
5.2. Build Button standard
Create a graphic called S_Button in the 2. Buttons Toolset
Supply a Description (Standard button) Add a new Boolean Custom Property called Pressed with this procedure:
o Press Ctrl+Mo Click the buttono Type the Name (Pressed)o Drop down the Data type list and select the type (Boolean)o Supply a Description (If this value is true the button is being pressed. If
this Button is treated as an icon this value must explicitly be set to true toindicate that the button is pressed)
Add the following Custom Properties:o MouseOver
DataType = Boolean Description = If this value is true the mouse is over the button. If
this Button is treated as an icon this value must explicitly be setto true to indicate that the mouse is over the button
o ButtonText DataType = String Description = Text displayed on the button
Embed an S_Panel graphic with these steps:o Click the buttono Select the S_Panel Graphic
o Rename the Panel to UnPressedButtono Set its width to 150o Set its height to 50o Double-Click the UnPressedButton Panelo Click the button to add an animationo Select the Visibility animationo Set the Expression to Pressedo Select the False option (This panel is visible when the button is not
pressed)o Click OK
Duplicate the UnPressedButton by selecting it and pressing Ctrl+D
Name the new button to PressedButton Turn it 180 Send this panel to the back by pressing F9 Double-click the PressedButton
o Change the visibility animation to True (This panel is visible when thebutton is pressed)
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
38/56
38
Use the Textbox tool and create a Textbox of size 150 50 Type #### Centre the text by Clicking the button Select the centre, centre button
Change the textboxs name to something descriptive such as txtbx_ButtonText
Change the line thickness to No Line Change the Fill Colour to No Fill
Double-click the Textbox and add an Action Scripto Drop down the Trigger Type and select On left click/Key Down o Add this script:
o Drop down the Trigger Type and select On left /Key Up o Add this script:
o Drop down the Trigger Type and select On Mouse Over o Change the After value to 1 mso Add this script:
o Drop down the Trigger Type and select On Mouse Leaveo Change the After value to 1 mso Add this script:
Add the following Animations to the Textbox and configure them as shown:
o Fill Style (Almost Transparent)o Location Horizontal
Pressed = TRUE;
Pressed = FALSE;
MouseOver = TRUE;
MouseOver = FALSE;
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
39/56
39
o Location Vertical
o Value Display
Select all three elements (PressedButton, UnPressedButton and the txtbx_But-tonText) by pressing the F2 key
Centre all three elements by pressing the button. Save and Exit from the graphic
5.3. Build Valve standard
Under the 5. Control Modules toolset create a new graphic called S_Valve.
Supply a description (Standard Valve) Embed the ValveSSBasic under the ArchestrA symbol Library | Valves |
SoftShadow. Click on a blank area and press Ctrl+M. Add a Boolean Custom Property called Valueand set its description to When set
to True the valve indicates that it is open Click on the ValveSSBasic
Press Ctrl+M
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
40/56
40
Change the FillColor to Blue (Notice the extreme usefulness of attributedescriptions)
Change the FillColor Visibility to Private (this valve will always fill blue)
For the value property select the --- in the Default Value box Click the Ellipse () In the Elements Panel click the S_Valve
On the right side pane click Value Click OK Change the Value Visibility to Private (the ValveSSBasics Value attribute always
references the outer S_Valves Value attribute)
5.4. Build a Level Transmitter Standard
Under the 6. Transmitters toolset create a S_Level_Transmitter graphico Add descriptiono Draw something that represents a level transmittero Rename the elementso Exit and save
5.5. Build Master level Control Valve
In the Template Toolbox, open the $m_ControlValve
Click on the Graphics tab Add a new graphic using these steps
o
Click the buttono Supply the name as ControlValveo Supply a description (e.g. m_ControlValve specific ControlValve)
Open the new graphic Embed the S_Valve Standard
Click on the S_Valve embedded graphic Press Ctrl+M
For the Value property, select the default value (False) Type NOT and a space (The valve should show open when the closed limit is
not made) Click the Ellipse
Select the Relative Reference ( ) Click on the Mereference
Select Status.Closed
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
41/56
41
Click OK Select the visibility as Private Click OK Save and Close the Graphic
5.6. Build Master level, Solenoid Valve
Repeat the steps above for the Solenoid valve (SolenoidValve)
5.7. Build Master level, Level Transmitter
Create a $m_Level_Transmitter specific Level Transmitter graphic(LevelTransmitter) and embed the S_Level_Transmitter standard
Remember descriptions
5.8. Build Application level tank graphic
Open the $a0_Tank template
Create a Tank graphic (remember a description)
Embed a Library tank graphic (e.g. SSTank4Supports) or draw something thatlooks like a tank
Add Text to the centre of the tanko Set Font size to 20 pto Add value display animationo Select Name (Tagname)
Click the embed graphic buttono Go to relative referenceso Embed the LevelTransmitter graphic in Me.Level
Use the same procedure to embed a Me.OutletValve OutletValve
Use some embedded pipes to connect the Outlet Valve Note that the Inlet valves cannot be embedded at this level because the number
of inlet valves have not been determined at the Application level yet
Save and Exit
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
42/56
42
5.9. Preparing to create InTouch Screens
The first step to take is to expand the idea of a standard panel. The idea is to create astandard background that will be used on all screens. This background will be used tocreate sized standards that will fix the size of the screen that can be developed.
Create a new Standard graphic called S_Background For demonstration purpose just embed an S_Panel and resize it to 500 500
Save and Exit Create a new Standard graphic called S_FullScreenBack
Embed an S_Background
Resize it to 1024 602
Click on the embedded S_Background Unselect the Dynamic sizing option
o This means that if the original graphics (S_Panel or S_Background)should change size, this one will not.
5.10.Create the Overview graphics
Two screens will be developed namely Mixing Line 1 and 2 as well as Mixing Line 3 and 4.Overview graphics are built in specific instances (usually ArchestrA Area types).
Open the S_ExtractMixing instance
Add two graphics (remember descriptions)o WIN_MixLine1And2o WIN_MixLine3And4
Open the WIN_MixLine1And2 graphic
Embed the S_FullScreenBack Standard Lock its position and size with the button this will prevent a user from
accidentally moving or resizing the background. Embed a graphic and select Instances ( )
Embed the Tank graphic on the S_E_MX001_T001 Tank. Embed the ControlValve graphic on the S_E_MX001_T001_IV001 Valve. Duplicate this valve (press Ctrl+D)
Change the owning instance of the copied graphic with this procedure:o Right-Click on the Valveo Navigate to Embedded Symbol| Select Alternative Instanceo Select the S_E_MX001_T001_IV002 instance
Using some embedded piping symbols build a complete tank
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
43/56
43
Select all of the components and group them Duplicate the group three times and space evenly on the background Ungroup all the graphics Change the owning instances so that Mixing Line 1 and 2s tanks are on the page
Put a Text box with a heading on the page
Repeat the complete procedure for Mixing line 3 and 4
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
44/56
44
6. The InTouch Application
The main part of the Human Machine Interface (HMI) is InTouch. Even though thegraphics can be built into objects, all graphics are displayed by InTouch. Navigationshould therefore be built into InTouch. InTouch can also serve as a medium for data
exchange between various graphic elements.
6.1. Navigation
The navigation system can be built completely in InTouch, but this bypasses some of theArchestrA graphic capability which is usually not desirable. To leverage the full graphiccapability, the navigation system can be built around a trigger system. Since ArchestrAgraphics can reference InTouch tags, it is possible to pass a requested window name toan InTouch tag and then trigger a condition (or data change script) to show the requestedwindow. Other requests can be made in the same way (e.g. Window position, Headings,Messages, Current showing window, Owning object etc.). In its simplest form it consists oftwo InTouch tags: Trigger_ShowWindow (a Memory Discrete) and
Requested_WindowName (Memory Message).
6.2. Data transfer
There are two ways to get information or data from one ArchestrA graphic to another.One is to write it to an Attribute somewhere in the ArchestrA framework and then read itfrom there. The other is to write it into a Memory tag in the InTouch system and then readit from there.
Both methods are valid but they should never be confused. The distinction betweenApplication Server (ArchestrA framework) and InTouch is an extremely important one andif misunderstood can cause some frustration. The distinction can be summarised as
follows:
Application Server: One version of the data exists and is the same across allplatforms. Application Server is therefore completely unaware of any users
InTouch: Data only exists in a particular InTouch instance (and is thereforeaware of the user). Different versions of the data can exist for different users.
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
45/56
45
Lab 6Build the InTouch
In this lab the InTouch application will be built.
6.1. Create a new InTouch Application Under0. Base Templates | 1. System right-click the $InTouchViewApp template
Navigate to and click on New| Derived Template
Supply a name for the application Move it to the 4. View Applications toolset
Double-click it Make sure that Create New InTouch Application option is selected
Click Next Supply a description
Click Next
6.2. Build the Navigation system
Create a new Memory Discrete tag called Trigger_ShowWindow with thesesteps
o In Window Maker click Specialo Click Tagname Dictionaryo Click Newo Supply a tagname (Trigger_ShowWindow)o Click Typeo Select Memory Discreteo Click OKo Supply a commento Click Save
Create a new Memory Message tag called
Requested_WindowName Locate the scripts pane
Right-click Condition item Click New In the Condition box supply the tag name
Trigger_ShowWindow either by typing it, or clearing the block and double-clicking in it and then selecting the tag from the tagname dictionary.
Change the Condition Type to On True Add the following script
Click OK In the Scripts pane right-click Key
Click New Click Key
Click F5
Show Requested_WindowName;Trigger_ShowWindow = 0;
Hide Requested_WindowName;Hide "NAV_Navbar";Show "NAV_Navbar";
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
46/56
46
Click OK
6.3. Build a Standard Show Window Button
In this section a Standard graphic is built for a button to show a Window using theNavigation system previously built.
In the IDE Create a new graphic called S_ShowWindowButton in the 3. Navigation
Standards toolset and open it remember a description!
Add three custom properties (Remember descriptions):o INT_Requested_WindowName
Type = String Reference = InTouch:Requested_WindowName Visibility = Private Description = Reference to the InTouch Tag Requested_Win-
dowNameo INT_Trigger_ShowWindow
Type = Boolean
Reference = InTouch:Trigger_ShowWindow Visibility = Private Description = Reference to the InTouch Tag
Trigger_ShowWindowo Cfg_WindowName
Type = String Text = [Blank] Visibility = Public Description = The name of the InTouch
window that this button should show Embed an S_Button Attempt to add an action script to S_Button note that it is not
immediately possible: S_Button needs to be treated as an Icono Select S_Buttono On the right-hand properties pane, locate the Treat as
Icon attribute (underRuntime behaviour)o Double-click Treat as Icon to change to true (This
overrides the built-in scripts)o Now add a new action script
Trigger Type = On Left/Key Up Add the following script
Change all the embedded S_Buttons properties to Private. Change the ButtonText propertys reference on the embedded S_Button to
Cfg_WindowName (The button will show the configured Windowname) Save and close
6.4. Build a Navigation Bar
The navigation bar is an independent (stand-alone) graphic. It is not embedded in anobject/template. It has no context in the ArchestrA framework, only in InTouch.
IF NOT Int_Trigger_ShowWindow THENInt_Requested_WindowName = Cfg_WindowName;Int_Trigger_ShowWindow = TRUE;
ENDIF;
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
47/56
47
Under1. Independent Graphics | 1. Navigation Graphics create a graphic calledNavigationbarand open it (Remember the description)
Embed an S_BackGround standard and change its size to Width = 1024, Height= 100
Embed an S_ShowWindowButton and place it on the Navigation Bar Rename it to ShowMixLine1And2
Configure the Cfg_WindowName property to contain the following text:WIN_MixLine1And2
Duplicate the ShowMixLine1And2 button and name it ShowMixLine3And4
Configure its Cfg_WindowName property to contain the following text:WIN_MixLine3And4
Save and Exit
6.5. Create the InTouch Windows
In InTouch WindowMaker create a window called NAV_Navbar with thisprocedure:
o Click on File | New Windowo Supply the name (NAV_Navbar)o Set the X-location to 0o Set the Y-location to 602o Set Width to 1024o Set Height to 100
Create two more windows (WIN_Mixline1And2 and WIN_Mixline3And4)o (WIN_MixLine1And2) (WIN_MixLine3And4)o Set the X-location to 0 Set the X-location to 0o Set the Y-location to 0 Set the Y-location to 0o Set Width to 1024 Set Width to 1024o Set Height to 602 Set Height to 602
On the NAV_Navbarwindow, embed the NavigationBarby clicking thebutton
On the WIN_MixLine1And2 window embed the S_ExtractMixing graphic calledWIN_MixLine1And2
On the WIN_MixLine3And4 window embed the S_ExtractMixing graphic calledWIN_MixLine3And4
Close all the windows in Window Maker Click the Runtime menu item (Top Right)
Once WindowViewer has started press F5 to open the Navigation bar Click the WIN_MixLine1And2 button
Notice that the Mouse Over and Mouse Pressed buttons do not work
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
48/56
48
Module 4Advanced Graphics
7. Assistant Graphics
Graphics often contain scripts and/or other action animations. When these graphics areembedded somewhere but require additional action animation, they need to be set to betreated as an icon. This means that any added action animation will override the original.This can sometimes be a problem (as has been shown in the labs). To overcome thisproblem one can easily add the required scripts to the embedded symbol however, thiscan be very tedious and repetitive if several different types of buttons are required.
For this reason, it is sometimes necessary to create Assistantgraphics. These graphicsare prefixed with an A_ and are embedded as per usual. The embedded graphic is then
converted into a group and ungrouped. This leaves a graphic that already has therequired scripting. The best way to demonstrate is with a Lab.
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
49/56
49
Lab 7Creating and using an Assistant graphic
7.1. Create an assistant Button
Create a graphic called A_Button under the 3. Assistant Graphics | 1. Buttonstoolset. Embed an S_Button on it Change the name to ChangeMyName
On the right-hand properties pane, locate the Treat as Icon attribute (underRuntime behaviour)
Double-click the Button and add the Action Script animationo Drop down the Trigger Type and select On left click/Key Down o Add this script:
o Drop down the Trigger Type and select On left /Key Up o Add this script:
o Drop down the Trigger Type and select On Mouse Overo Change the After value to 1 mso Add this script:
o Drop down the Trigger Type and select On Mouse Leaveo Change the After value to 1 mso Add this script:
Save and Exit
7.2. Using an assistant button
Open S_ShowWindowButton Leave the original button for now
Embed an A_Button Right-click the embedded A_Button Navigate to and Click on Embedded Symbol| Convert to Group Ungroup the resultant group (Press Shift+F3)
Double-click the original embedded button and copy the script from it Delete the original button Double-click the new button
On the action scripts drop down the trigger type and select On Left/Key up
Below the existing script, paste the copied script Rename the embedded button (TheButton) Change all the embedded A_Buttons properties to Private.
Change the ButtonText propertys reference on the embedded A_Button toCfg_WindowName (The button will show the configured Windowname)
Save and Exit In Window Viewer, Press the F5 key (this will hide and show the Navigation panel
updating it with the changes)o The buttons animation should now work.
Pressed = TRUE;
Pressed = FALSE;
MouseOver = TRUE;
MouseOver = FALSE;
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
50/56
50
8. Popup graphics
Some of the most important graphics are popup or faceplate graphics. These are usuallycontrol panel or information display panels that are displayed when a specific piece ofequipment is clicked. With ArchestrA graphics there are two ways to handle these
graphics.
8.1. Show symbol
A Show symbol animation exists that can display a symbol directly if the element isclicked. This type of popup works for simple one-of graphics.
8.2. InTouch Windows
This method is similar to the Navigation scheme proposed earlier. The Name of thepopup and a trigger is passed to the InTouch side which handles the display of the Popup.This method is more customisable and drill-through type of capability is available. Thesegraphics can be made dynamically by changing the owning object of a graphic. Thismethod takes planning and thought and some coding to accomplish but is sometimespreferable or the only option. A drawback of this method is that only one popup of a type(for instance a motor faceplate) can be displayed at a time if multiple faceplates must bedisplayed simultaneously, one window per possible faceplate must be created and theimplementation should keep this in mind.
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
51/56
51
Lab 8Creating Popups
8.1. Creating the popups
Create a new graphic called P_SolenoidValve under the 2. Standards | 7. Popups Open it Create the following Custom Properties
o Closed Limit Default = FALSE Visibility = Public Type = Boolean Description = True if Closed limit is made
o Open Limit Default = FALSE Visibility = Public Type = Boolean Description = True if Open limit is made
o CmdClose Default = FALSE Visibility = Public Type = Boolean Description = Command to Close Valve
o CmdOpen Default = FALSE Visibility = Public Type = Boolean Description = Command to Open Valve
o Heading Default = [Blank] Visibility = Public
Type = String Description = Heading to be displayed
o TravellingTime Default = 00:00:00.0000000 Visibility = Public Type = ElapsedTime Description = The Time expired to travel from previous position
to required position Embed an S_Panel Embed a SquareLightRed and change custom properties as follows:
o Blink Reference = NOT ClosedLimit
Visibility = Privateo Value
Reference = ClosedLimit OR CmdClose Visibility = Private
Embed a SquareLightGreen and change custom properties as follows:o Blink
Reference = NOT OpenLimit Visibility = Private
o Value Reference = OpenLimit OR CmdOpen
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
52/56
52
Visibility = Private Create a Open Command button with these steps
o Embed an A_Buttono Convert it to a groupo Ungroupo Change the name to CmdOpenButton
o Change the action script for On Left/key up by adding the followingscript:
Create a Close Command button with the same steps (script below)
Change the ButtonText propertys of both command buttons to a hardcoded textof Open and Close respectively.
Create a Textbox and add the value display animation (string) to it to show theHeadingattribute
Add a Textbox and add the value display animation (time) to it to show theTravellingTime attribute
Add descriptive text for the following:o Green buttonOpeno Red buttonClosedo TravellingTime textboxTravelling Time
Arrange the popup more or less as shown:
CmdOpen = TRUE;
CmdClose = TRUE;
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
53/56
53
Save and Close Import the P_Popups.aaPKGin the My Documents\The Lazy Folder
o Creates a S_AnalogueDisplayo Creates a P_ControlValve graphico Creates a P_Level_Transmitter graphic
8.2. Creating object specific pop-ups
Create the following object specific graphicso $m_ControlValve ControlValvePopupo $m_SolenoidValve SolenoidValvePopupo $m_Level_Transmitter LevelTransmitterPopup
Embed the corresponding P_ graphics in each of these setting the properties asfollows (remember to set them all toprivate):
o P_ControlValve ActualValue = Me.Status.Position ClosedLimit = Me.Status.Closed ControlValue = Me.Cmd.Position Heading = Me.Tagname
OpenLimit = Me.Status.Open TravellingTime = Me.Status.TravelTime
o P_SolenoidValve ClosedLimit = Me.Status.Closed CmdClose = Me.Cmd.Close CmdOpen = Me.Cmd.Open Heading = Me.Tagname `OpenLimit = Me.Status.Open TravellingTime = Me.Status.TravelTime
o P_Level_Transmitter CmdClose = False Heading = Me.Tagname Level = me.PV
Caution
Custom Properties of type string, time and elapsedtime have to set to
reference/text mode explicitly by clicking the or buttons. The issue iswhen a reference is typed but the property is in text mode, no error will bethrown (as a reference is a valid string) but the property will off course have thewrong value.
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
54/56
54
8.3. Change Equipment Symbols
On $m_ControlValve open the ControlValve symbol
Treat the embedded symbol as an icon
Double click the embedded symbol to add an animation Add a Show Symbolanimation and set it up as shown:
Do the same for the $m_SolenoidValve template.
In WindowViewer Press F5 and test the faceplates
8.4. Enable the Level Transmitters popup
Open InTouch Window Maker Create a new Memory Discrete tag called Trigger_ShowPopup with these steps
Create a new Memory Message tag called Requested_PopupName Create a new Memory Message tag called Requested_OwningObject
Locate the scripts pane Right-click Data Change item
Click New In the Tagname box supply the tag name Trigger_ShowPopup.
Add the following script
Click OK Open S_Level_Transmitter
IF Trigger_ShowPopup == 1 THENShow Requested_PopupName;
ELSEHide Requested_PopupName;
ENDIF;
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
55/56
55
Add the following Custom Properties:o Cfg_OwningObject
Type = String Description = Configured popup's owning object
o Cfg_PopupName Type = String
Description = Configured popup to displayo INT_Requested_OwningObject
Type = String Description = InTouch Tag for the requested owning object Reference = InTouch:Requested_OwningObject
o INT_Requested_PopupName Type =String Description = InTouch Tag for the requested popup name Reference = InTouch: Requested_PopupName
o INT_TriggerPopup Type = Boolean Description = InTouch Tag used to show a popup Reference = InTouch: Trigger_ShowPopup
Double-click the element and add this action script to the Right-Click event
Save and close Open the LevelTransmitter in the $m_Level_Transmitter
Click on the embedded S_Level_Transmitter and change its properties as follows:o Cfg_OwningObject
Visibility = Private Reference = me.Tagname
o Cfg_PopupName Visibility = Private POP_LevelTransmitter
o All the rest should just be set to private Open the LevelTransmitterPopup in the $m_Level_Transmitter
Add the following Custom Properties:o Cmd_SetOwningObject
Type = Boolean Description = Internal command that forces the owning object to
be seto INT_Requested_OwningObject
Type = String Description = InTouch Tag for the requested owning object Reference = InTouch:Requested_OwningObject
o INT_TriggerPopup Type = Boolean Description = InTouch Tag used to show a popup Reference = InTouch: Trigger_ShowPopup
IF INT_TriggerPopup THENIF INT_Requested_PopupName == Cfg_PopupName THEN
INT_Requested_OwningObject = Cfg_OwningObject;ENDIF;
ELSEINT_Requested_PopupName = Cfg_PopupName;INT_Requested_OwningObject = Cfg_OwningObject;INT_TriggerPopup = TRUE;
ENDIF;
-
7/30/2019 System Platform 3 - Implementing Best Practices~3(1)
56/56
o Click on the embedded Graphic and edit the following Property (Ctrl+M) CmdClose = INT_TirggerPopup
Click anywhere on the blank canvas of the graphic and press F10 to add somegraphic scripts
Under Predefined scripts ensure the trigger type is OnShow and add the followingscript
Add a script and call it OwnObjectChangeand configure it as follows:o Expression = INT_Requested_OwningObjecto Trigger = DataChangeo Script
Add another script and call it SetOwningObjectand configure it as follows:o Expression = Cmd_SetOwningObjecto Trigger = WhileTrueo Period = 50mso Script
Save and close In WindowMaker create a new Window and call it POP_LevelTransmitter Add a Window script to the POP_LevelTransmitterWindow and configure it as
follows:o Trigger = OnHideo Script
On this window embed the LevelTransmitterPopup graphic contained inS_E_MX01_T001_LT001 Note: this is a specific instance (the owning object willbe changed by the popup itself)
Close and save all windows
Close and Open WindowViewer, Press F5 and test the Level Transmitter by right-clicking on it.
IF NOT Cmd_SetOwningObject THENCmd_SetOwningObject = TRUE;
ENDIF;
IF NOT Cmd_SetOwningObject THENCmd_SetOwningObject = TRUE;
ENDIF;
IF IsGood(INT_Requested_OwningObject) THENIF INT_Requested_OwningObject "" THEN
P_LevelTransmitter1.OwningObject =INT_Requested_OwningObject;
Cmd_SetOwningObject = FALSE;ENDIF;
ENDIF;
Trigger_ShowPopup = 0;