You are on page 1of 96

Bulk Configurator

User Guide

Invensys SimSci-Esscor 5760 Fleet Street, Suite 100, Carlsbad, CA 92008

Bulk Configurator User Guide Version 1.1


11-Feb-11 The software described in this document is furnished under a written agreement and may be used only in accordance with the terms and conditions of the license agreement under which you obtained it. The technical documentation is being delivered to you AS IS and Invensys Systems, Inc. makes no warranty as to its accuracy or use. Any use of the technical documentation or the information contained therein is at the risk of the user. Documentation may include technical or other inaccuracies or typographical errors. Invensys Systems, Inc. reserves the right to make changes without prior notice.

Copyright Notice
2011 Invensys Systems, Inc. All rights reserved. Invensys, Dynsim, SimSci-Esscor, ActiveFactory, ArchestrA, FoxDraw, FoxView, InFusion, I/A Series, and Wonderware are trademarks of Invensys plc, its subsidiaries and affiliates. Visual Fortran is a trademark of Intel Corporation. Windows 98, Windows ME, Windows NT, Windows 2000, Windows XP, Windows 2003 Server, Excel and MS-DOS are trademarks of Microsoft Corporation. Adobe, Acrobat, Exchange, and Reader are trademarks of Adobe Systems, Inc. All other products are trademarks of their respective companies. No part of this publication and protected by this copyright may be reproduced or utilized in any form or by any means, electronic or mechanical without the written permission from Invensys Systems, Inc., including photocopying, recording, broadcasting, or by any information storage and retrieval system.

Table of Contents
Welcome to Bulk Configurator..........................................................................................5 Getting More Information ...................................................................................................6 Glossary ..................................................................................................................................7 Introduction to the Bulk Configurator .............................................................................8 Checkout View (Tieback Simulation).......................................................................... 8 Features................................................................................................................... 8 Model Data View........................................................................................................ 8 Features................................................................................................................... 8 Intended Audience ...................................................................................................... 9 Additional Reading ................................................................................................... 10 Introduction to Tieback Simulation................................................................................11 Tieback Simulations ..........................................................................................................12 Important Simulation Concepts ......................................................................................16 Simulation Engines ................................................................................................... 16 Time Control and Synchronization............................................................................ 17 Cross Referencing..................................................................................................... 17 Model Objects and Parameters .................................................................................. 18 FSIM Engine Snapshots and Checkpoints ................................................................. 18 TRISIM Engine Snapshots........................................................................................ 19 FSIM Engine with Multiple I/A Series Control Processors ........................................ 19 TRISIM Engine Multiple PLC Simulation ................................................................ 20 Bulk Configurator ...............................................................................................................21 Launching the Bulk Configurator .............................................................................. 21 Components of the Bulk Configurator....................................................................... 22 Action Pane........................................................................................................... 23 Bulk Configurator Toolbar .................................................................................... 24 Checkout View (Tieback Simulation)........................................................................ 25 Tieback Simulation using the Bulk Configurator: Workflow ................................. 25 Cross Reference and Model Worksheets................................................................ 27 Rulebook............................................................................................................... 30 Import / Export Rules ............................................................................................ 33 Setting up a Rule Simple Example...................................................................... 34 Apply Rules .......................................................................................................... 36 Model (Checkout) Worksheet................................................................................ 39 Send to DSS.......................................................................................................... 43 Status Messages .................................................................................................... 44 Model Data View...................................................................................................... 45 Configure Model Data View ................................................................................. 47 Rename Model Objects ......................................................................................... 50 Model Data View settings ..................................................................................... 51 Model Data View Navigation Features .................................................................. 52

Bulk Configurator User Guide

Status Messages .................................................................................................... 56 Appendix A: Tieback Simulation Model Classes (Checkout View) .......................57 STATIC_DOUBLE .................................................................................................. 58 DYNAMIC_INTEGER............................................................................................. 60 STATIC_INTEGER.................................................................................................. 61 LATCH..................................................................................................................... 62 AND, OR.................................................................................................................. 63 FCTGEN .................................................................................................................. 64 RLIMIT .................................................................................................................... 65 PID ........................................................................................................................... 70 SUM ......................................................................................................................... 73 TIMER ..................................................................................................................... 74 LEADLAG ............................................................................................................... 78 MISCEQTN.............................................................................................................. 81 Custom for OTS Engineers ....................................................................................... 85 Appendix B: Using Regular Expressions with the Tieback Simulation (Checkout View) ..................................................................................................................86 Regular Expression ................................................................................................... 86 .NET Regular Expressions ........................................................................................ 86 Starter Syntax Examples ........................................................................................... 86 Search Syntax ........................................................................................................... 87 Regex Replace .......................................................................................................... 89 Examples specific to I/A Series and Triconex............................................................ 89 Regular Expression Basic Syntax Reference ............................................................. 91 Regular Expression Basic Syntax Reference ............................................................. 91 Other Resources........................................................................................................ 96

Bulk Configurator User Guide

Welcome to Bulk Configurator


This User Guide provides an overview of use cases and configuration of the Bulk Configurator tool, an Excel based application activated from within the Dynsim Dynamic Simulation Suite environment to streamline the DCS and PLC control validation process through dynamic simulation. The Bulk Configurator tool is an Excel spreadsheet front-end tool to provide a convenient, tabular way of entering model/equipment data and is designed for control and instrumentation specialists primary working with FOXBORO I/A Series software and TRICONEX software. It can be extended to any DCS or PLC process requiring process control loop validation through dynamic I/O stimulation. This tool resides outside of the simulation environment and displays static configuration model parameters typically specified when building a process model. Dynsim application is a process-modeling package that links instrument and control signals with a cross-reference database utility built into Dynsims Graphical User Interface (GUI). The Dynsim process model engine sends signals to and from DCS or PLC engines configured either directly through the Dynamic Simulation Suite interface (i.e., FSIM Plus engine/ TRISIM Plus engine / other PLC-type engine) or through a bridge to a third party application. If you are new to Dynsim application, FSIM Plus application, or TRISIM Plus application we suggest you review the relevant getting started guides to gain an understanding of basic simulation features and the Graphical User Interface: FSIM Plus Getting Started Guide (Foxboro I/A Series software) TRISIM Plus Getting Started Guide (Triconex TriStation 1131 software) Getting Started with Dynsim

Bulk Configurator User Guide

Getting More Information


The Bulk Configurator, FSIM Plus, TRISIM Plus, and Dynsim user guides are available on the product-specific installation CD. Access FSIM Plus application, TRISIM Plus application, and Dynsim application specific documentation through a variety of means: Through the GUI, from the Help pulldown menu In PDF format where the software is installed From the IOM website Support tab: http://iom.invensys.com

Find additional SimSci-EsscorTM specific documentation, downloadable software, and software updates and patches at the SimSci-Esscor Electronic Software Download website: http://www2.simsci.com/sim4me/esd/login.asp

Bulk Configurator User Guide

Glossary
API Checkpoint File Application Programming Interface The Control Database that resides on the host workstation and downloaded to the FCP270/ZCP270 or FSIM Station I/A Series Control Processor Distributed Control System Dynsim Data Manager Dynamic Simulation Suite Graphical User Interface Human-Machine Interface Intelligent Automation Series Input/Output I/A Series Configuration Component Integrated Control Configurator InFusionTM Engineering Environment Invensys Operations Management Object Editor/Viewer Operator Training Simulator Programmable Control Logic A parser that can search and manipulate text based on patterns. An Initial Condition or Backtrack that contains a picture of the state of a simulation engine at a specific point in time. For the FSIM Plus Engine, a picture of the Control Processor (CP) database memory. For the TRISIM Plus Engine, a textbased file that represents the state of the PT2 files objects and tags. Snapshot Management Utility Unit of Measure Cross Reference (List)

CP DCS DDM DSS GUI HMI I/A Series I/O IACC ICC IEE IOM OEV OTS PLC Regular Expression Snapshot

SSMU UOM XRef

Bulk Configurator User Guide

Introduction to the Bulk Configurator


The Bulk Configurator is an Excel based model configuration tool to provide a convenient, tabular way of entering model/equipment data. It supports two modes: o Checkout View o Model Data View

Checkout View (Tieback Simulation)


In Checkout View mode, the tool provides a mechanism to apply rules in order to automatically create model objects and tie them off to appropriate I/O points. The rules take advantage of I/O block naming conventions to specify the type of model to do the tieback (like a rate limit block to simulate the operation of a valve). The tieback-type rulebook was designed to rapidly configure low-fidelity, simple tieback models for control systems with thousands of I/O points, particularly when many typical control loops are repeated.

Features
1. Bulk Generate Models: Configure the Rulebook to generate tieback models based on I/O naming conventions. 2. Configure Cross Reference List: Manually or, through the Rulebook, automatically tie the cross reference data to the process model.

Model Data View


The Model Data View mode extends the tool to medium and high fidelity models. In Model Data View, model objects and their parameters display in tabular, customizable spreadsheet format that provide visualization and bulk parameterization capability. Bulk Configurator supports model objects from every available Dynsim engine, including Dynsim, Dynsim-P, Dynsim-C, and Dynsim-L engines.

Features
1. High, Medium, and Low Fidelity models: Supports parameterization of models generated for all available Dynsim-type engines, including: High-fidelity process modeling tool for oil and gas, refining, Dynsim and chemical industries engine Dynsim-P engine Dynsim-C engine High-fidelity process modeling tool for power generation industry Medium-fidelity process modeling tool for control and safety system checkout and operator familiarization across

Bulk Configurator User Guide

all industries Dynsim-L engine Low-fidelity, lite base equipment modeling tool for simple tie-back modeling across all industries

2. Customize display parameter list for each model: Modify which parameters display in the Excel spreadsheet for each model. 3. Change Management: Optionally opens most recent spreadsheet or replaces spreadsheet with current process model. 4. Unit of Measure support: Customize UOM for individual model parameters from the Model sheet. 5. Refresh: Optionally update Bulk Configurator Spreadsheet with modified process model without closing or re-opening the Dynsim simulation file or Bulk Configurator interface. 6. File Handling: The tool allows the user to create Excel files and associate them with the appropriate simulation. It supports saving (and opening) the Excel file in any folder location. 7. Link cells in spreadsheet or accept formula: Supports linking spreadsheet cells that represent parameters to cells in other spreadsheet tabs. Accepts Excel formula that is persistent when Dynsim data is imported. Handles equations present in the Dynsim OEV. Directly retrieve those equations into the Bulk Configurator worksheet and send them back to the Dynsim application to the Dynsim equation placeholder for the parameters. 8. Display Dynamic and Snapshot data: Displays dynamic runtime model parameter values for the simulation in the Model sheet value column. Restore a snapshot and refresh Bulk Configurator to view model parameter values saved in a different simulation state. 9. Rename model objects: Optionally rename model objects from Model sheet. 10. Create Custom Parameters: Add, delete and edit custom model parameters through Configure Model Data View window. 11. Configure Cross Reference List: Manually or, through the Checkout View Rulebook, automatically tie the cross reference data to the process model.

Intended Audience
This guide is intended for engineers (Application Engineers, Instrumentation and Control, or Process engineers) who have a high level of familiarity with Distributed Control Systems (DCS) or Programmable Logic Controllers (PLCs), and in particular Foxboro I/A Series and Triconex software (although the concepts apply to most control systems). Detailed knowledge of process simulation is not a pre-requisite to employ the tieback simulation Bulk Configurator.

Bulk Configurator User Guide

Additional Reading
The following guides and user manuals are available for further reference: FSIM Plus Installation Guide FSIM Plus Getting Started Guide (tutorials to build basic process simulations and connect to I/A Series software) FSIM Plus User Guide (reference manual covering I/A Series simulation) TRISIM Plus Installation Guide TRSIM Plus Getting Started Guide (tutorials to build basic process simulations and connect to Triconex TriStation 1131 software) TRSIM Plus User Guide (reference manual covering I/A Series simulation) Dynamic Simulation Suite Users Guide (detailed information concerning DSS simulation features, as well as documentation for high-fidelity process modeling) Checkout Equipment

Bulk Configurator User Guide

10

Introduction to Tieback Simulation


Tieback simulation is a method for testing process control system loop configurations, by connecting output I/O back to input I/O (within the same control loop), either directly or through some kind of filtering function. For instance, a MOTOR RUN COMMAND digital output can be connected directly back to the MOTOR RUNNING STATUS digital input in a simulation environment, to test operation of the motor control logic. Another example would be to test a vessel level control loop by tying the VESSEL LEVEL CONTROL VALVE (0-100%) analog output back to the VESSEL LEVEL (FT) analog input, through a Lag block with some gain to simulate level. Why do tieback simulation? The purpose is to test the function of the control logic, loops, interlocks, graphics, alarms, etc. in a dynamic environment, meaning that the loops provide/receive stimuli and act upon those stimuli with (hopefully) the right sense, direction, and magnitude in other words, to prove to the greatest extent possible that the control system is going to work once it is installed in the plant. Tieback testing is usually simple in nature, but is sufficient to find misconnected control blocks, parameterization errors, mis-linked graphics, incorrect high/low limits, etc., that could not (very easily) be found by static testing. A Bulk Configuration tool is extremely valuable for tieback simulation, in that it provides a mechanism to apply rules in order to automatically create model objects and tie them off to appropriate I/O points; the rules take advantage of I/O block naming conventions to specify the type of model to do the tieback (like a rate limit block to simulate the operation of a valve). It is especially handy for control systems with thousands of I/O points, especially when many typical control loops are repeated. This document describes the function and use of the Tieback Simulation Bulk Configurator, used in conjunction with the Invensys Dynamic Simulation Suite (DSS): FSIM Plus application, TRISIM Plus application, and Dynsim application. These are: FSIM Plus: FOXBORO I/A Simulation TRISIM Plus: TRICONEX and Trident Simulation Dynsim: Dynamic Simulation modeling environment

(Note: The GUI for all of the above products is the same though the underlying engines are different. Hence all the products have the same look and feel. The term DSS GUI may be used to refer to any of the product user interfaces.) This document will discuss tieback simulation types and general simulation topics, before getting into the specifics of the Bulk Configurator.

Bulk Configurator User Guide

11

Tieback Simulations
A tieback simulation attempts to test the behavior of a control system in a simulated realworld environment. Figure 1 shows a simple representation of the pieces of a process control system installed in a plant.

Figure 1. Typical Process Plant Control System To simulate plant processes simply, output signals can be tied back onto input signals, either directly or through some kind of filter or signal generator in a lab or staging floorenvironment:

Figure 2. Tieback Testing in Lab or Staging Floor Environment

Bulk Configurator User Guide

12

Until recently, tieback-type testing required various configurations of control system hardware to accomplish. One type of tieback simulation involves staging the entire hardware and software systems to be assembled, with tieback done by using actual wires or signal generators to loop output signals back to input signals on the I/O module (as already shown in Figure 2). Another approach, requiring less hardware, is to build simulation-type blocks within the actual control system software, and connect these simulation blocks to the I/O software blocks (Figure 3).

Speciallyinserted Simulation Block

Modify blocks to turn off connection to I/O Module

AOUT LAG

AIN

To I/O Module

From I/O Module

Figure 3. Tieback Simulation built within Control System Blocks

This approach does away with the need for the actual I/O modules, however real control processors are still required for block processing. I/O software blocks modification, to turn off the connection to I/O hardware, and to reconfigure the block to accept inputs from the simulation block is required Another method (Figure 4) uses commercially available simulation software, such as CAPE VPLink, to provide simple process simulation algorithms to stimulate the control system I/O. Like the second method, the I/O control blocks still need to be modified to turn off their connection to the physical I/O modules, but now the off-board simulation software reads/writes to the I/O blocks via a special Application Programming Interface (API).

Bulk Configurator User Guide

13

Figure 4. Tieback Simulation using 3rd-Party Application

Each of these previous tieback simulation approaches has the following disadvantages: All require actual control system hardware, including networking interfaces. Method 1 requires actual I/O modules. Methods 2 and 3 require that the control system configuration be modified to turn off connection to physical I/O

With the Tieback Simulation Bulk Configurator addition to the Dynamic Simulation Suite, many of the shortcomings of the alternative tieback approaches have been addressed through an approach called Virtual Stimulation Control Simulation (Figure 5):

Bulk Configurator User Guide

14

Figure 5. Virtual Stimulation Control System Simulation Virtual Stimulation means that the control processors and I/O modules are simulated on a desktop or laptop computer, by porting the source code that runs on this hardware to run in a PC environment. Multiple controllers and I/O modules can be simulated on a single platform. In addition, this platform includes all control system applications (configuration tools, alarm manager, historian), HMI display tools, and includes Dynsim process modeling software (Figure 6). The Tieback simulation Bulk Configurator builds simple Dynsim models to interact with the control system.

Figure 6. Integrated Simulation Environment on Single Platform

Bulk Configurator User Guide

15

In the subject of control system checkout using tieback simulation, the primary challenge lies with understanding control engineering and with the specifics of the control system itself. However, essential simulation concepts are requisite to tieback simulation Bulk Configurator discussion.

Important Simulation Concepts


The concepts discussed in this section are a subset of those contained in the FSIM Plus Getting Started Guide and the Trisim Plus Getting Started Guide. They are presented here as an introduction and the minimum pre-requisite knowledge required before tieback simulations can be built. Please refer to these manuals as well as the Installation and User Guides for more detailed information.

Simulation Engines
In process simulation, every entity in that simulation is considered an Engine. A typical basic simulation requires at least two simulation engines: one for the Foxboro I/A Series control system (or Triconex controller) and one for the tieback process model. A more complex system example to be includes a Foxboro I/A Series DCS and a Triconex safety system; in this case, three engines include one for I/A Series, one for Triconex, and one for the process model. As a complex example, a large high-fidelity Operator Training Simulator might have many control systems and an extensive process model. Such a system may have tens of engines one for each of the control system entities, and perhaps several for the process model itself (large detailed process models need to be split up to be able to run on different computers or processors in order to have acceptable speed). Figure 7 shows the engine concept.
GUI

DCS SIM4ME

Dynsim Engine

PLC 3rd Party Engine

Excel Engine

Figure 7. Simulation Engine Architecture

Bulk Configurator User Guide

16

Time Control and Synchronization


One advantage the Invensys Dynamic Simulation Suite has over the types discussed in previous sections is the concept of time control. In a nutshell, time control refers to the ability to make each of the simulation engines march in lock-step (synchronization), and to control their execution in the following manners: Freeze/Run halt processing, or proceed Slow/Fast Time make the simulation run slow (so as for instance to watch fastevolving sequences in detail), or fast (to get past a long waiting time for the process, like the filling of a large vessel). Expressed as a % of real time (i.e. the wall clock; 100% = execute at real time, 200% = 2X real time, etc.) Single Step extremely useful for debugging sequence or Boolean control logic

The Simulation Executive controls each engines execution cycle (like Basic Processing Cycle in I/A Series software), sending commands to each engine to run, and receiving a message back indicating the engine execution cycle completes (Figure 7). The regulation of this time-marching sequence controls the simulation speed (Slow, Real, or Fast Time). The Simulation Executive ensures deterministic operation, meaning that exactly the same results occur for an operation scenario run from a saved initial condition, if the actions in the scenario are repeated. One important point to remember: the control blocks are not processing (executing) unless the simulation is in Run mode. For instance, if controls are loaded or incrementally changed, the change does not take effect until the block has processed at least one cycle.

Cross Referencing
Cross Referencing can be thought of like a marshalling cabinet (Figure 5): it connects control system I/O points to the simulated process, like the copper wires that connect I/O modules to sensors and actuators in the field in the real world. Cross Referencing connects the points in one engine to another (Figure 7) via a Cross Reference Table (Figure 8):

Figure 8. Cross Reference Table In the figure, DynsimEngine refers to the process model; FSIMEngine refers to the control system. Therefore, From DynsimEngine to FSIMEngine refers to an I/A Series software input (analog input in this illustration). The points connected are the From Symbol and To Symbol. As a minimum, one line exists in the Cross Reference table for each I/O point in the entire simulation.
Bulk Configurator User Guide

17

Model Objects and Parameters


The Dynsim dynamic simulation environment is object-oriented, with each modeling object a certain Class that defines what the model does (like LATCH, TIMER, VALVE); each instance of an object must have a unique name (the name cannot begin with a number; special characters are also not allowed). A particular value of a model is referenced by the ObjectName.Parameter; a parameter can be an input, output, or a configuration or tuning constant. Examples of common parameters are: IN (input value) OUT (output value) RATE (time constant) HI_LIM (output high clamping limit) etc.

In Figure 8, the points to be cross-referenced are the model object LT5T27s OUT output parameter connecting to the analog input block LI5T27, in Compound 5ADD_SYSTEM.

FSIM Engine Snapshots and Checkpoints


A snapshot is the record of all internal states of each engine, such that these states can be restored to the exact same operating point as when the snapshot was taken. Save and restore snapshots through the Dynamic Simulation Suite Graphical User Interface. For FSIM, a snapshot can be thought of as a checkpoint file, the main difference is that a snapshot includes the current model states, such as automatic, running, or timing. For the FSIM engine, two intractable considerations relate to snapshots and checkpoints. The first is that older snapshots must be updated if new controls are added or existing controls modified. FSIMs Snapshot Management Utility (SSMU) performs this action automatically when an out-of-date snapshot restores. The update starts with the checkpoint file and pushes values of settable/connectable parameters from the snapshot in to the checkpoint file, then saves the result as the updated snapshot. The second consideration is that the checkpoint file must be valid when rebooting the computer or restoring a snapshot. With simulation the checkpoint file is only valid if blocks process after (re)deploying the controls (i.e., run the simulation) and manually performing Checkpoint after processing blocks: the automatic checkpoint that occurs before blocks process is not valid. With FSIM 4.5 and beyond, the checkpoint file is saved external to the simulation and restores automatically on a reboot. To clear the checkpoint file contents, initialize all controls mapped to the FSIM Station and reboot the FSIM Station.

Bulk Configurator User Guide

18

TRISIM Engine Snapshots


For the TRISIM engine, restoring older snapshots is not problematic: if an object or tag existed in the old controls, those values populate the control system on a reset. New objects begin at their default values. With the TRISIM engine, it is possible to edit the contents of the text-based snapshot file.

FSIM Engine with Multiple I/A Series Control Processors


Tieback Simulation using Invensys Dynamic Simulation Suite has a major advantage over other methods in that multiple I/A Series Control Processors (CPs) can be simulated on a single desktop or laptop PC (Figure 6). Additionally, a mix of I/A Series CPs and Triconex Tricon/Trident controllers can be simulated simultaneously. Recent advances in FSIM Plus and simulation enhancement added to I/A Series software now allow multiple CPs to be kept segregated, even though they are all run on one super control processor, or FSIM Station. CP mapping utilities maintain segregation. In FSIM, this configuration takes place prior to deploying controls and depends on the configurator: ICC, IACC, or IEE. Each configurator makes use of a different mechanism to segregate controls. This step is typically a one-time setup for each project. Refer to the FSIM Plus User Guide for details. Another important point is the physical limit to the number of I/A Series CPs mapped to a single FSIM Station. This limit is based on the size of the control set, the number of peer-to-peer connections, the number of blocks, and the number of non-repeating strings. The maximum number is variable based on the specifics of the project, but for estimation sake figure on 10 CPs per machine. If the number of physical CPs is greater than 10, then additional machines (again, typical laptop or desktop PCs) need to be networked (Figure 9), and additional instances of control engines are required.

Figure 9. Extending the Simulation Platform to Accommodate Large number of Simulated Control Processors

Bulk Configurator User Guide

19

TRISIM Engine Multiple PLC Simulation


With Triconex TriStation, configuring multiple PT2 files per simulation also requires initial setup to instantiate emulator filenames (to the NodeName). Although no changes to the program files are needed, the TriStation project options need point to multiple instances under the emulator options. If controllers communicate directly via peer-topeer (TRICON to TRICON) with USEND / URCV commands, additional configuration is required within the TRISIM engine. For communication between FSIM and TRISIM, some manual cross referencing within DSS is needed. The TRISIM Plus User Guide contains details for each of these configurations.

Bulk Configurator User Guide

20

Bulk Configurator
Launching the Bulk Configurator
Launch the Bulk Configurator from the DSS GUI by selecting Tools->Bulk Configurator (Figure 10).

Figure 10. Launching the Bulk Configurator The user is prompted to create or open an Excel spreadsheet. After launching the Bulk Configurator, the current model data and cross reference table in the DSS database/simulation, are imported into the Excel spreadsheet. The user can then, (a) (b) Perform model edits and manual cross referencing by simply typing into the Excel cells. Use Microsoft Excel functions, like Search, Replace, Copy, Paste, Filter, etc., to i. find and modify certain model objects, ii. create additional model objects (only in Checkout View) and/or iii. delete existing model objects (only in Checkout View)
21

Bulk Configurator User Guide

(c)

(d)

Use the Rulebook (described in subsequent sections) to automatically bulk-configure a large number of model objects, based on parsing I/O tag records in the cross reference table (only in Checkout View). Rename model objects in bulk and update the database, cross reference and ICs appropriately (only in Model Data View).

Note: Launch the Bulk Configurator from the DSS GUI and not by double-clicking the Excel file.

Components of the Bulk Configurator


Once launched, two main interfaces appear (Figure 11a): Excel Workbook 1. Cross Reference Worksheet Tab 2. Model (Checkout) Worksheet Tab (Checkout View) Or Model Worksheet Tab (Model Data View) Action Pane 1. View selection 2. User Action Buttons 3. Status Messages display box

Figure 11a. Tieback Simulation Bulk Configurator


Bulk Configurator User Guide

22

Action Pane
The Action Pane (figure 11b) includes the following sections:

Figure 11b. Bulk Configurator Action Pane

Simulation Name
When BulkConfigurator launches, the simulation name displays automatically in this field.

View
Through the Action Pane, choose how the data displays: Bulk Configure model objects through the Rulebook and Checkout View automatically tie I/O to model objects Parameterize model objects created using any Dynsim, Model Data Dynsim-P, Dynsim-C, or Dynsim-L library View

Update
After bulk configuring a new tieback model or parameterizing model objects perform the following actions: Send the modified data to Dynsim simulation Send to DSS
Bulk Configurator User Guide

23

Refresh

Update data from the Dynsim application into the XRef and Model (Checkout)/Model sheets. No need to close and open Bulk Configurator to update with this integrated two-way data transfer option. o View the IC data after the IC is loaded in the Dynsim application using Refresh. o View the Dynamic (Runtime) data when simulation is in Frozen mode using Refresh.

Actions
The active actions depend on the view. Checkout View activates Rulebook and Apply Rules. Model Data View activates Configure Model Data View, Rename Model Objects, and Model Data View settings. Checkout View Actions Rulebook

Apply Rules

Create rules to parse I/O in Cross Reference table, create and configure tieback models based on filter criteria Update Cross Reference table and model objects within the Bulk Configurator environment Select which objects appear based on the Dynsim library, such as Checkout Equipment, Process Equipment, or Controls Globally replace model object names Specify which parameter columns appear in Model Data View

Model Data View Actions Configure Model Data View Rename Model Objects Model Data View settings

These actions are discussed in further detail in the Error! Reference source not found. section.

Status Messages
The Status Message display box indicates action progress, warnings and errors.

Bulk Configurator Toolbar


Along with the standard Excel menu options, a SIMSCI-ESSCOR menu option contains additional menu options (Figure 13). Document Actions (activate Actions Pane), Help (Bulk Configurator documentation)

Bulk Configurator User Guide

24

Figure 13. Bulk Configurator Toolbar

Checkout View (Tieback Simulation)


Tieback Simulation using the Bulk Configurator: Workflow
The figure below shows the start-of-day to end-of-day workflow procedures in using a tieback simulation.

Tieback Simulation Workflow More generally, the workflow includes (for a new project): 1. Load new controls 2. Create a new (empty) simulation 3. Create a Cross Reference table (pre-populated with default values until a model can be created) 4. Launch the Bulk Configurator. Select Checkout View. 5. Open the Rulebook and configure the Rules 6. Apply Rules and populate the Cross Reference and Model (Checkout) sheet s

Bulk Configurator User Guide

25

7. Send the modified Cross Reference table and model objects back to the simulation 8. Use the simulation to test loopback control logic 9. Repeat 3-8 as needed (The Model Data View may be used to view and modify model objects that are not supported in the Checkout View). The following sections will discuss in detail items 4-7. Details for all other items may be found in the FSIM Plus or TRISIM Plus User Guides. Find details for other items in the FSIM Plus, TRISIM Plus, or Dynsim User Guides.

Bulk Configurator User Guide

26

Cross Reference and Model Worksheets

Figure 14. Tieback Simulation Bulk Configurator The Cross Reference worksheet contains all the model-to-control system I/O connections, and is identical in format to the Cross Reference table as accessed by the DSS GUI. By default, when the Bulk Configurator launches, Checkout View is selected. In this view, under the Model tab, only model objects configurable through the Rulebook appear. To view model objects that are not configurable with the Rulebook, but exist in the process model, select Model Data View radio button from the Action Pane. The Model worksheet format differs slightly between Checkout View and Model Data View, but the general concepts are the same. The Model worksheet contains all details of the model objects for the tieback simulation. The format for model definition in the Bulk Configurator is tabular (Figure 15a) unlike the DSS GUI where a model object is represented graphically on a flowsheet (Figure 15b). The graphical representation of the model object is shown in the flowsheet on the right and the model object and its parameters are shown in the Instances tree on the left.

Bulk Configurator User Guide

27

Figure 15a. Model Worksheet in Bulk Configurator showing Configuration for Model Object XV1

Figure 15b. DSS GUI showing Flowsheet and Model Object ASOV_61005_5 Figure 15c shows the Dynsim Object Editor Viewer representation of the same model object.

Bulk Configurator User Guide

28

Figure 15c. Object Editor View of Model Object XV1 Figures 15a, 15b, and 15c are all different views of the same model object. However, only a subset of the parameters are shown in the Checkout View of the Bulk Configurator (Figure 15a) when compared to the DSS GUI (Figure 15c). This was done intentionally to provide the users of the Bulk Configurator with the most commonly used parameters that are needed for tieback simulation. The Model Data View of Model objects, shown in Figure 15d, provides more object parameterization flexibility. Model Data View can be configured to display every object, in the process model, including all objects available in Dynsim, Dynsim-P, Dynsim-C, and Dynsim-L libraries. The tool can be configured to display user-specified parameters within specific object types.

Figure 15d. Model Data View of Model Object XV1

Bulk Configurator User Guide

29

Utilize any of the four views in Figure 15 to make editing changes. However, for the sake of simplicity, this document concentrates only on the Bulk Configurator (refer to the Dynamic Simulation Suite Users Guide for more details on creating/editing models from the DSS GUI).

Rulebook
The Rulebook (Figure 16) enables rule creation to parse I/O block (tag) names in the Cross Reference table, create and configure model objects based on matches to filter criteria, and then connect the model inputs and outputs to the I/O block outputs and inputs respectively. It is active when Checkout View is selected.

Figure 16. Bulk Configurator Rulebook Checkout View The Control OUT, IN, Model Name, and model parameter fields (in the parameter pane) all support Regular Expressions (see Appendix B). Figures 17a and 17b detail a Rulebook Entry.

Figure 17a. Rulebook Entry (part 1) 1. 2. Enable Rule Overwrite: When selecting Apply Rules, this rule will execute None Does not overwrite previously-defined or custom entries for XRef or model (None will overwrite default points in XRef) Overwrite any applicable XRef entries

Bulk Configurator User Guide

XRef

30

3. 4. 5. 6.

Description Control Engine Filter Using Out/In Tag Model Engine

Model Overwrite any applicable model entries Overwrite model and XRef entries Both Text field describing rule The non-Dynsim engine, such as FSIM Plus engine or TRISIM Plus engine Tells the rule which I/O point is the search tag and which is the resulting paste tag The Dynsim engine that models the process

Figure 17b. Rulebook Entry (part 2) 7. Control Out/In Tag Control System analog/digital output or input tag name associated with the control loop. One point is the search tag while the other is the paste tag, depending on the Filter flag (see #4 previous page). While the search tag is required and must be specified for a rule to be valid, specifying the other tag is not required. If specified, the Bulk Configurator ties the paste tag to the model.

Important: Be sure to properly specify search/replace expressions and select the correct Filter checkbox for the Control Out and In Tag fields. Notice the wild-cards (.*) on the Control Out Tag and the checkbox on Filter Using Out Tag align. Selecting Filter Out Tag: A search expression [e.g., (.*):LY(.*)\.(.*)] should be specified in the Control Out Tag field. A replace expression [e.g., $1:U$2.POINT] may be specified in the Control In Tag field. Selecting Filter In Tag: The expressions have to be interchanged, i.e., a search expression [e.g., (.*):XU(.*)\.(.*)] should be specified in the Control In Tag field. A replace expression [e.g., $1:XP$2.OUT] may be specified in the Control Out Tag field. 8. 9. Model Class Model Name Type of tieback model (explained in next section) Name to give the created model object using the search and paste criteria from the Regular Expressions. Be sure to generate valid DSS model names (start with alphabet and no special characters) when applying the rule.

Bulk Configurator User Guide

31

10.

Model In Param

11.

Model Out Param

12.

XRef Auto Scale

Tie the control system Output Tag to this Model Input parameter. A selection of None implies no tie back for that tag. Tie this model Output parameter back to this control system Input Tag. A selection of None implies no tie back for that tag. Auto scale the model output. Applies only to analog signals.

Note: Incomplete rules are indicated by a red error mark adjacent to the rule number. Parameter Input Dialog Selecting a rule displays a Parameter Input Dialog corresponding to the model class specification to the right side of the rulebook table.

Figure 18. Parameter Input Dialog

The user specifies parameter values for rules in this dialog box. Each rule has a model class and a set of parameter values associated with it. Applying a rule creates several model objects based on matches in the XRef sheet and populates the model object parameters with the values specified in the Parameter Input Dialog. Similar behavior occurs in the Parameter Input Dialog for the Model (Checkout) sheet . Only a subset of the entire parameter list appear in the Parameter Input Dialog, limited to those considered most important in tieback models. Access the complete parameter list of parameters through the DSS GUI. If needed, online documentation and the Dynamic Simulation Suite User Guide can help. A replace regular expression may be used to bulk configure equations for parameter fields. Prefix this expression with # to indicate that it is a regular expression.

Bulk Configurator User Guide

32

Figure 19. Regular Expression

When processing this rule, the expression automatically expands and parameter values fill with the corresponding equation. In the above example, the parameter PV could be expanded to FV5F01.OUT, FV5F02.OUT, FV5F03.OUT, etc. This feature enables model object linking and is useful for complex control loop scenarios. Default Rules When Bulk Configurator opens, the previously used rules automatically load.

Import / Export Rules


Export and import rules facilitate rulebook reusability for multiple projects. Export Select Export to save rules in a separate text-base .xrl file.

. Figure 20. Save Rules

Bulk Configurator User Guide

33

Import Select import to restore a previously exported rulebook file.

The rules currently in the Rulebook replace with the rules in the imported file. Therefore, consider exporting/saving the rules before importing a new set of rules.

Figure 21. Import Rules

Setting up a Rule Simple Example


As a general example of a rule, suppose a control engineer wishes to create a tieback model for the following control loop (Figure 22):

Bulk Configurator User Guide

34

Figure 22. Typical Control Loop If this loop is typical and repeated many times in the control system, the user can create a rule to generate a tieback model for each instance of this loop type. An English-language version of the rule might state: 1. Find any DCS output tag in a) any compound, b) that has block name starting with LY, c) with any loop ID 2. Create a PID model object called LT and append the same loop ID, 3. Connect the DCS output tag to the SP parameter of the model object 4. Find any DCS input tag in a) the same compound, b) that has block name beginning with LI and c) the same loop ID, and 5. Connect the DCS input tag to the OUT parameter of the model object Diagrammatically, the tieback model looks like Figure 23:

Figure 23. Tieback Representation of Level Control Loop Figure 24 displays the Rulebook entry corresponding to the numbered rules:

Figure 24. Rulebook Entry to Create Level Control Loop Tieback Model

The Rulebook makes use of what are called Regular Expressions. Regular Expressions are a special kind of text syntax that allows for easy filtering, searching, and replacing based on string patterns. Figure 25 shows an example of a Regular Expression.

Bulk Configurator User Guide

35

Figure 25. Breakdown of a Regular Expression The use and meaning of Regular Expressions will become clearer through the use and examples contained in subsequent sections and examples. Appendix B provides a detailed explanation of Regular Expressions and a reference manual. Select Apply Rules (from Action Pane) to processes rules sequentially: Parse each line in the cross reference, searching for a Filter criteria based on the rules Create a specified model object and name it based on the Filter search string Parameterize each model object based on the rule definition Connect the cross reference table I/O output and input tags to the newly-created model object Repeat for each enabled rule

Once the rules have been processed and the engineer satisfied with the result, export to the DSS through the Send to DSS button on the Action Pane. This action re-bundles the model and cross reference configuration files and reloads the DSS database. Returning to the DSS GUI, the model objects and cross reference connections contained in the Bulk Configurator appear in flowsheets and the Instances Tree. Finally, the engineer loads the simulation in to memory, runs it, and performs desired testing. Should he/she wish to make modifications to the model, relaunch the Bulk Configurator repeat the process.

Apply Rules
Rules processing creates Dynsim models based on block naming patterns that connect to I/O points through an updated cross-reference table. It also modifies models when

Bulk Configurator User Guide

36

Dynsim Model specifications for a given rule change and the rule reprocesses (see Rulebook Section below). Model (Checkout) sheet validation occurs first, prompting for errors, as needed. Correct the errors before proceeding. XRef rows in error highlight in red. Detailed status messages appear. Modify or correct rules and re-Apply Rules.

Figure 26. Apply Rules

Figure 27a. Bulk Configurator Cross Reference Table - EQUATION entry for scaling

Bulk Configurator User Guide

37

When the entries change by applying rules, the updated cells highlight to emphasize Rulebook processing (Figure 23b). Previously highlighted lines clear when reapplying rules.

Figure 27b. Bulk Configurator Cross Reference Table Highlighted after Rules Applied Validation DSS expects the cross reference data in a certain format and therefore Bulk Configurator prevents column deletion or rearrangement. Likewise, it prevents sheet deletion or renaming.

Bulk Configurator User Guide

38

Model (Checkout) Worksheet


The Model Worksheet displays available bulk-configured model data in a Model sheet as shown in Figure 28a. Model Object Definition Model Parameters

Figure 28a. Model Worksheet Model Class Note that only objects corresponding to model classes supported by the Bulk Configurator are imported. The model classes that are currently supported are AND, DYNAMIC_DOUBLE, DYNAMIC_INTEGER, FCTGEN, GAUSSRAND, LATCH, LEADLAG, MISCEQTN, OR, PID, RLIMIT, SELECT, STATIC_DOUBLE, STATIC_INTEGER, SUM, SWITCH, TIMER and VALVE. High-fidelity Dynsim process models (HeatExchanger, Drum, Column, etc.) are not supported by the Bulk Configurator, and do not appear in the model worksheet when opened. The Send to DSS command does not overwrite the portion of the simulation containing model classes not maintained by the Bulk Configurator.

Bulk Configurator User Guide

39

Parameters The parameter names for the model objects display at the top of the worksheet with appropriate parameters for the model class in line with the highlighted cell. Selecting a row with a different model class updates the header row with the appropriate set of parameters. Only a subset of the complete model parameters display, those that are typically modified in a tieback simulation. Reducing the parameter set to the minimum eases configuration.

Figure 28b. Model Worksheet N/A Parameters and Comments The number of supported parameters for the different model classes differs. The DYNAMIC_INTEGER for example, supports only one parameter (VALUE) while a VALVE supports more. An unused column displays N/A in the corresponding header cell. Send to DSS updates valid columns and ignores columns that display N/A. Header cells include comments for clarity. Select and manipulate data using standard Excel features, such as Conditional Filtering. Parameter Input Dialog Select a row in the Model sheet and right click on any cell to display Parameter Input Dialog for the corresponding DSS model object from the context menu (Figure 29a). The dialog populates its fields with values from the Excel cells. Edit values within the sheet or from Input Parameter Dialog (updating data in one updates the data in the other, Figure 29b).

Bulk Configurator User Guide

40

Figure 29a. Parameter Input Dialog

Figure 29b. Parameter Input Dialog

Bulk Configurator User Guide

41

Edit with the Parameter Input Dialog for manual configuration. Invalid values (e.g., out of range value) are rejected. When opening the dialog, invalid Excel cell values display an error in the dialog (a related error message displays in the Status Messages box). Upon OK, the value(s) in the dialog write back to the Excel cell(s). Some model parameters allow DSS equations / parameter references. Specify a numeric value or an equation in such cases. Validation is not performed in the equation field and may impact dynamic performance. During rule configuration, the same dialog in the Rulebook appears for parameterization. Unsupported model classes disable the menu option dialog launch. Adding / Deleting Model Objects Create model objects of supported model classes by inserting a new row in the Model (Checkout) sheet and filling in the information. Delete model objects by deleting the row in the Model (Checkout) sheet. Be sure to delete empty rows: when performing Send to DSS, a blank line interprets as the end of the file: subsequent rows do not process. Flowsheet The flowsheet must exist in the DSS simulation to be valid. Create multiple flowsheets in the DSS before opening the Bulk Configurator. Non-existent flowsheet specification defaults the flowsheet value to the first flowsheet in the DSS simulation. In addition, if a model object already exists in a flowsheet in the DSS GUI, it cannot be moved to another flowsheet by changing the flowsheet name in the Model (Checkout) sheet . The flowsheet name resets to the flowsheet containing the original object. Move objects between flowsheets through the DSS interface.

Bulk Configurator User Guide

42

Equation Bulk Configurator rulebook output data populates the Equation field of the DSS parameter irrespective of whether a numeric value or an equation is entered.

Figure 30. DSS Object Editor Viewer Value in Equation Field Note: Processing model rows stops when a blank row is encountered. Subsequent rows are ignored. Therefore, arrange model rows continuously without blank rows in between. Save The user has the ability to save the workbook by selecting File / Save or by pressing the Save button on the toolbar. The 'Save As' option is disabled intentionally to prevent configuration file proliferation. When the Bulk Configurator relaunches, either choose to re-initialize the sheets from the DSS database or reuse the contents of the Excel file. Before proceeding verify the launching simulation name matches expectations. If multiple simulations are open in the DSS, the last simulation opened populates the Bulk Configurator. After changing the simulation, Bulk Configurator copies the .xls file before overwriting it (the location indicated via a pop-up message). During re-initialization, the Bulk Configurator modifies only the XRef and Model (Checkout) sheet s; all other Excel data are retained (charts, additional worksheets, drawings, etc.), which may be useful in model configuration when linking cells in some other Excel-based spreadsheet, like PRO/II software.

Send to DSS
Send to DSS regenerates the xml and cross-reference files and sends the updates to the simulator. Any changes made in DSS while the Bulk Configurator is open are overwritten. If the user makes a change in DSS (with the Bulk Configurator closed) and
Bulk Configurator User Guide

43

subsequently opens the Bulk Configurator, the Bulk Configurator automatically picks the DSS changes. Although the DSS GUI and Bulk Configurator can remain open simultaneously, recommended workflow to avoid inadvertent conflicts follows these steps: 1. From DSS, launch Bulk Configurator 2. Do not make any further changes to model through DSS while Bulk Configurator is open 3. Make desired modeling changes within Bulk Configurator 4. When done, send to DSS 5. Close Bulk Configurator 6. Repeat as needed Configure either within the Bulk Configurator or within the DSS GUI, but not both at the same time.

Status Messages
Information, Warning, and Error messages display in the Status Message window, color coded with Information (blue), Warning (orange) and Error (red). Review status messages for warning and error details.

Figure 31. Status Messages

Bulk Configurator User Guide

44

Messages are also displayed in Excel status bar.

Figure 32. Invalid Configuration The Clear button removes accumulated messages.

Model Data View


The Model Data View contains the XRef (cross reference) and Model worksheets. When the Model Data View radio button is selected, the Rulebook and Apply Rules buttons become inactive and the Configure Model Data View, Rename Model Objects, and Model Data View settings buttons become active. Before actually viewing models under Model Data View, set up the model classes and parameters to view using the Configure Model Data View button. When the Configure Model Data View button is clicked, the Configure Model Data View dialog pops-up displaying the Dynsim Libraries tree view as shown in Figure 33. The tree structure consists of a list of Libraries, Models, Group and Parameters from which the user can select the list of parameters to be shown in the Model sheet.

Bulk Configurator User Guide

45

Figure 33. Configure Model Data View

Bulk Configurator User Guide

46

After selecting the list of parameters the Model sheet appears as shown in Figure 34.

Figure 34. Bulk Configurator Worksheet in Model Data View

Configure Model Data View


Use this feature to specify which model objects appear under Model Data View and if the Unit of Measure selection should be overwritten. Objects are broken down into categories related to their library. For instance, objects available with a Dynsim-C license are grouped under Base Checkout Equipment. Within a library, individual objects can be included or excluded. This file can be exported and shared or modified, as needed.

Bulk Configurator User Guide

47

Customize the models and parameters


By default, Model Data View displays parameters that likely require parameterization and not every available parameter. The reason is that for most objects, the default settings are adequate. To add a parameter that does not appear in the list, right click, select Insert Parameter, and type the parameter name, as shown in Figure 35.

Figure 35. Customize Model and Parameter On clicking the Insert Parameter, the Custom Parameter Form dialog appears as shown in Figure 36.

Figure 36. Custom Parameter Form Enter the Parameter Name, Description, Parameter Class, UOM Type and Unit of Measure in the respective fields and click OK.

Bulk Configurator User Guide

48

Import / Export Model Data View


Import the predefined view and Export the customized view through the Configure Model Data View dialog. The Model Data View can be exported / imported only in xml format.

Import
Import a predefined Model Data View by clicking on the Import button. Select the desired xml file from the Import XML File window and click Open, as shown in Figure 37.

Figure 37. Import Dialog

Export
Export the customized Model Data View selection file by clicking on the Export button. Select the customized Model Data View xml file from the Save dialog and click Save, as shown in Figure 38.

Bulk Configurator User Guide

49

Figure 38. Export Dialog

Restore Default View


Restore the original Model Data View before making changes to the Model sheet by clicking the Restore Default View button.

Global UOM slate for Model Data View


Select the desired global UOM slate for the complete Model Data View from the dropdown menu, which updates all parameters with the global UOM.

Rename Model Objects


Globally rename the objects in bulk or individually using the Rename Model Objects button. When changing an object name, the Bulk Configurator locates all references located within the simulation, such as the cross reference list, inputs or outputs to other objects or equations, object references or inputs to widgets, and snapshots. To rename the model objects globally, enter the new model name in the New Model Name field and click Rename Model Objects button. The current Model object is replaced with the new model name.

Bulk Configurator User Guide

50

Figure 39. Rename Model Objects

Note: Renaming will work only on the ICs stored in the local machine where the BulkConfigurator is running. Before renaming, user collects all his ICs on to his local machine by using the Collect feature in the Dynsim application. After renaming, user should redistribute the ICs.

Model Data View settings


Most objects contain a set of shared parameter names, such as Value, UOM, or Assignment. When viewed through Model Data View, those parameters do not universally align in a single column heading. In order to limit the data viewed through Bulk Configurator, users can optionally hide or show specific parameters through Model Data View settings. On clicking the Model Data View settings button a dialog pops-up displaying the parameter columns. Select / unselect the parameter columns to hide / unhide.

Figure 40. Model Data View settings

Bulk Configurator User Guide

51

Model Data View Navigation Features


Within the Model Data View, Bulk Configurator includes additional custom features to facilitate object parameterization. These features are discussed below.

Convert UOM
The Convert UOM option enables the user to change/convert the default units to the desired units. The Convert UOM dialog appears by right-clicking on the UOM cell that contains an existing UOM (i.e., MISSING UOM is not valid) and by selecting the change/convert Units menu. Select the desired UOM and click Change Units or Convert Value button. Select the Long Descriptions checkbox to display the long descriptions of UOM.

Figure 41. Convert / Change Units

Custom Column Views


A column is a special case and contains several vector parameters whose size is dependent on the number of stages. Unlike other vector parameters, the column vector parameters are displayed in rows. This mode of display is more convenient for the user to have all stage wise data in one column.

Figure 42. OEV Display of TOWER temperature data at different stages

Bulk Configurator User Guide

52

Figure 43. Bulk Configurator display of TOWER temperature data at different stages The column/tower also has sections and many vector parameters that are of the size equivalent to number of sections. Bulk Configurator segregates all the vector parameters of section and displays it row wise, which reduces the display of number of columns.

Figure 44. OEV display of TOWER -Spacing data at different sections

Figure 45. Bulk Configurator Display of TOWER Spacing data at different sections Similarly, composition at various stages / plates is conveniently displayed ROW wise.

Bulk Configurator User Guide

53

Figure 46. OEV display of TOWER - composition data at different stages

Figure 47. Bulk Configurator display of TOWER composition data at different stages Note: The following index parameters for TOWER model are not displayed on Model worksheet: STAGEIDX, STAGEIDX2, STAGEIDX3, STAGEIDXSUMP Flash001.SolidIDX and SumpFlash.SolidIDX.

Bulk Configurator User Guide

54

Static, Dynamic and States Data


The Bulk Configurator displays all the STATIC data including the Default Data. This data is obtained from Dynsim Edit Engine. It also displays the parameter values when the Simulation is in FROZEN state, Backtrack State etc. These values are similar to the Value column, which can be seen in the actual Dynsim OEV. Note that the data is not live it does not update continually but it does represent a snapshot at a point in time, similar to restoring an IC and remaining in frozen mode.

Validate Data
The Bulk Configurator validates Dynsim Parameter naming conventions at the UnitOperation level. The error message box displays in a Status Message box and highlights in red under Status Messages. The tool does not provide validation of the model parameter values. Care should be taken to provide valid Dynsim data.

Figure 48. Validate Data Message Box

Bulk Configurator User Guide

55

The user can view the Status Messages box, after selecting OK, for more information on the error messages as shown in Figure 49.

Figure 49. Error Messages on Status Message Box

Status Messages
The Information, Warning, and Error messages are displayed in the Status Message window (Figure 49 above). The messages are color coded as Information (blue), Warning (orange) and Error (red). View the status messages for more details on the errors messages. The Clear button removes accumulated messages in the Status Messages window.

Bulk Configurator User Guide

56

Tieback Simulation Model Classes

Appendix A: Tieback Simulation Model Classes (Checkout View)


This section describes the various model classes available within the Bulk Configurator through Checkout View. Each class is organized by name, what it does, available parameters, and example usage. The same or similar-type tieback model can be created many different ways, according to the preference of the control engineer. The reader should carefully review the all examples to get an idea of alternate approaches to building models, as well how to handle special situations (like selectively overwriting or protecting previously created models).

DYNAMIC_DOUBLE
Type: General Purpose Double Precision Variable Parameters: Parameter VALUE[0] Value Any real number Description Variable value

Example Use: Point to stimulate an Analog Input:


Field I/A FLOW TRANSMITTER FT049 (0 TO 550 GPM)

1CST:FI049.POINT FT049 AIN

Example Rulebook Entry:

Bulk Configurator User Guide

57

Tieback Simulation Model Classes Note: A Dynamic point value updates while the simulation runs. Either change the value via the Monitor Tab, directly on the flowsheet, or add a slider bar widget (see Figure).

Slider Bar Widget

Monitor The value is saved and restored with Snapshots. For a constant, use a STATIC_DOUBLE model point.

STATIC_DOUBLE
Type: General Purpose Double Precision Constant, or Table Array Parameters: Parameter ISFUNCTABLE Value TRUE/FALSE Description TRUE implies table-lookup array (see FCTNGEN description). FALSE implies single dynamic (i.e. variable) double precision number Only used for a table array Only used for a table array Only used for a table array Only used for a table array Only used for a table array Only used for a table array Only used for a table array Only used for a table array Only used for a table array

VALUE[0] VALUE[1] VALUE[2] VALUE[3] VALUE[4] VALUE[5] VALUE[6] VALUE[7] VALUE[8] VALUE[9]

Any FP number Any FP number Any FP number Any FP number Any FP number Any FP number Any FP number Any FP number Any FP number Any FP number

Bulk Configurator User Guide

58

Tieback Simulation Model Classes Example Use: Lookup Table Array

15 10 -25 15 25

-15

Parameter ISFUNCTABLE VALUE[0] VALUE[1] VALUE[2] VALUE[3] VALUE[4] VALUE[5] VALUE[6] VALUE[7] VALUE[8] VALUE[9] VALUE[10] VALUE[11]

Value TRUE 5 0 -100000 -15 -25 -15 15 10 25 15 100000 15

Description X-Y Table Array Number of X-Y Pairs (not used) 1st Pair X Value 1st Pair y Value 2nd Pair X Value 2nd Pair Y Value 3rd Pair X Value 3rd Pair Y Value 4th Pair X Value 4th Pair Y Value 5th Pair X Value 5th Pair Y Value

Note: Use with FCTGEN block. If the X lookup value exceeds 100000 in the example above, the value clamps to the last Y value in the table (i.e. the table lookup does not extrapolate). Similarly, if lookup falls below -100000, the output clips. Example Rulebook Entry: Enter an array directly into the Model flowsheet or, alternatively, add it in the DSS GUI.

Bulk Configurator User Guide

59

Tieback Simulation Model Classes

DYNAMIC_INTEGER
Type: General Purpose Integer Variable Parameters: Parameter VALUE Value Any positive or negative integer, or zero Description

Example Use: Motor Run Command/Feedback Status


I/A Field I/A

1MCC:XU6P13.COUT MOTOR 6P13 RUN COMMAND COUT XU6P13M

1MCC:XU6P13_M.CIN CIN

Parameterization: Parameter VALUE Value Description Assigned in Cross Reference table for both output and input

Example Rulebook Entry:

Note: In this example, the control system Digital Output writes to the DYNAMIC_INTEGER, which in turn writes back to the Digital Input. The user may observe the value of the point from the Monitor tab but does not alter the value, except through Cross Reference I/O Override utility (accessed from the Cross Reference tool from the user interface).

Bulk Configurator User Guide

60

Tieback Simulation Model Classes

STATIC_INTEGER
Type: General Purpose Integer Constant Parameters: Parameter VALUE Value Any positive or negative integer, or zero Description

Example Use: Local/Remote Interlock Status

1CST:PB1_LOCAL.FBCIM PB1_LOC CIN MOTOR LOCAL/REMOTE STATUS (1=REMOTE)

Parameterization: Parameter VALUE Value 1 Description Always Remote Status

Example Rulebook Entry:

Note: The value of this static integer remains at 1, and the Digital Input remains true. The user cannot change the value of this point (except by overriding the I/O point in the cross reference table).

Bulk Configurator User Guide

61

Tieback Simulation Model Classes

LATCH
Type: Set/Reset Latching Block (flip-flop) Parameters: Parameter SET RESET SET_DOM MA OUT OUTR Value 0/1 0/1 SET_PRIORITY/ RESET_PRIORITY 0/1 0/1 1/0 Description Set latch Reset latch Set/Reset Dominance (if both signals are true, which dominates default = reset dominant) Man/Auto Output Inverse Output

Example Use: Motor Run Start/Stop Command with Feedback Status


I/A Field I/A

1MCC:XU6P13ST.COUT MOTOR 6P13 START COMMAND COUT

XU6P13M

1MCC:XU6P13_M.CIN CIN

LATCH

1MCC:XU6P13SP.COUT MOTOR 6P13 STOP COMMAND COUT

Parameterization: Parameter SET RESET Value Description Leave blank (connected in cross reference) Leave blank (connected in cross reference)

Example Rulebook Entry:

Note: The first rule defines the latch block, connects the SET (i.e. Start command) parameter, and feeds back the latch output status OUT to the running status feedback. The second rule connects the stop command to the RESET parameter.

Bulk Configurator User Guide

62

Tieback Simulation Model Classes

AND, OR
Type: Logic Blocks, with four inputs Parameters: Parameter INP[0] INP[1] INP[2] INP[3] INV_INP[0] INV_INP[1] INV_INP[2] INV_INP[3] MA OUT Value 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 Description First input Second input Third input Fourth input Invert first input Invert second input Invert third input Invert fourth input Man/Auto Output

Example Use: Fan run command with Local Lockout


I/A Field I/A

1PHFAN:XUPHF.COUT PENTHOUSE FAN RUN COMMAND COUT

XUPHF AND

1PHFAN:XUPHF_M.CIN CIN

1PHFAN:XUPHFLO.COUT PENTHOUSE FAN LOCAL LOCKOUT COUT

Parameterization: Parameter INP[0] INP[1] INP[2] INP[3] INV_INP[0] INV_INP[1] INV_INP[2] INV_INP[3] Value Description Leave blank (set in cross reference) Leave blank (set in cross reference) Unused Unused Default Invert local lockout Unused Unused

0 1

Bulk Configurator User Guide

63

Tieback Simulation Model Classes Example Rulebook Entry:

Note: The AND block feeds back running status if Run Command is true and Local Lockout is not true.

FCTGEN
Type: Function Generator Parameters: Parameter IN TABLE HI_OUT LO_OUT MA MANSET OUT HI_LIM LO_LIM Value Description Any FP number Input x-coordinate to interpolate DYNAMIC_DOUBLE[0] Name of table array previously defined (see DYNAMIC_DOUBLE) Any FP number High output limit Any FP number Low output limit 0, 1 Man/Auto Any FP number Value of output when in Manual Any FP number Output value 0, 1 Flag to indicate high limit reached 0, 1 Flag to indicate low limit reached

Example Use: Temperature as a function of Pressure


Field I/A

PRESS_VS_TEMP

1HC:PI512.POINT Hydrocarbon Pressure

PT512

AIN

F(x) TT512

AIN 1HC:TI512.POINT

Hydrocarbon Temperature

Bulk Configurator User Guide

64

Tieback Simulation Model Classes Parameterization: Parameter IN TABLE HI_OUT LO_OUT MA MANSET OUT HI_LIM LO_LIM Value PT512 PRESS_VS_TEMP[0] Description Pressure variable Table array that relates temperature vs. pressure (optional, can leave blank)

Assigned in Cross Reference table

Note: In this example, the user sets the value of PT512. The corresponding temperature feedback depends on the table look up using this value. See STATIC_DOUBLE to configure table array. Example Rulebook Entry: Enter a function generator directly into the Model flowsheet or add it in the DSS GUI.

RLIMIT
Type: Rate Limit Block. Parameters: Parameter IN RTYPE RATE Value Any FP LINEAR, FIRST_ORDER Any FP >= 0.0 Description Input value or point to be rate-limited Rate limit type: linear or first-order lag Ramp rate, in Units/second. If RTYPE = FIRST_ORDER, then RATE is first-order lag time constant Tau (steady-state reached in approximately 3 * Tau) Scalar on input value Bias on input value High output limit Low output limit Man/Auto status Value of output when in Manual Output value Flag to indicate high limit reached Flag to indicate low limit reached

K_IN B_IN HI_OUT LO_OUT MA MANSET OUT HI_LIM LO_LIM

Any FP or point Any FP or point Any FP or point Any FP or point 0, 1 or integer point Any FP or point Any FP 0, 1 0, 1

Bulk Configurator User Guide

65

Tieback Simulation Model Classes

Example Use #1: Control Valve with open and closed limit switch feedback
I/A Field I/A

1FP:ZSC224.CIN 1FP:FY224.OUT AOUT FV224 LO_LIM IN RLIMIT HI_LIM CIN 1FP:ZSO224.CIN OPEN LIMIT SWITCH CIN CLOSED LIMIT SWITCH

Parameterization: Parameter IN RTYPE RATE K_IN B_IN HI_OUT LO_OUT Value LINEAR 5 Description Assigned in Cross Reference table Linear rate limit 5%/second; full travel in 20 seconds Scalar on input value Bias on input value High output limit when output reaches 100% Low output limit when output reaches 0%

100 0

Example #1 Rulebook Entry:

Note: This example illustrates the power of the rulebook and its ability to create a model and connect several I/O points at the same time. Interpret the first line as follows: for all flow control valves FY*, create a rate limit block and call it FV*. In the second and third lines, the algorithm searches for the same flow control, but overwrite is set to XRef only, which does not redefine the rate limit block created in the first line, but connects the Low and High Limit outputs of the (already created) rate limit block to the Closed and Open Limit Switch digital inputs, respectively. Ensure loop identifier consistency (224 in this example in the figure above) for all three I/O points.

Bulk Configurator User Guide

66

Tieback Simulation Model Classes Setting HI_OUT = 100 and LO_OUT = 0 causes the block output flags to trigger when OUT = 100% and 0%, respectively. If the limit switches trigger before the valve shuts tight or wide-open, then set the limit settings inside the range, 2% and 98%, for example. Example Use #2: Flow/Pressure/Temperature Control Valve with Analog Feedback
I/A Field I/A

1FP:FY224.OUT Flow Control Valve, 0-100% AOUT IN

FV224 RLIMIT OUT

1FP:FI224.POINT AIN Flow: 0 to 225 GPM

Parameterization: Parameter IN RTYPE RATE K_IN B_IN HI_OUT LO_OUT Value FIRST_ORDER_LAG 3 Description Assigned in Cross Reference table Response with first order lag 3 second time constant (approx 9 seconds to steady-state) Scalar on input value Bias on input value (leave blank auto scaling will handle see Note) (leave blank auto scaling will handle See Note)

Bulk Configurator User Guide

67

Tieback Simulation Model Classes Example #2 Rulebook Entry:

Note: In this example, the XRef Auto Scale checkbox is ticked. This selection automatically scales the feedback to the Analog Input such that 0% input equates to the AINs LSCALE parameter, and 100% equates to HSCALE (MIN SCALE and MAX SCALE in the Cross Reference table). This functionality is achieved by automatically creating an equation entry in the table, rather than pasting into the FROM SYMBOL column:

The auto scaling equals: MIN SCALE + VALUE (0-100%)*(MAX SCALE MIN SCALE) / 100 The user can make custom equations in the cross reference table, however, only include one entry in the FROM SYMBOL column or the EQUATION column, not both (which causes a run time error message when attempting to load the cross reference table). Example Use #3: Same as Example #2, except engineer desires to calculate Engineering Units instead of auto scaling. When the valve reaches 80% open, the rated flow measures 200 GPM Parameterization: Parameter IN RTYPE RATE K_IN B_IN HI_OUT LO_OUT Value FIRST_ORDER 3 2.5 0 250 0 Description Assigned in Cross Reference table Response with first order lag 3 second time constant (approx 9 seconds to steady-state) Scalar on input value Bias on input value

Bulk Configurator User Guide

68

Tieback Simulation Model Classes The XRef Auto Scale checkbox should not be ticked, and instead the user should specify K_IN and B_IN to give the desired rated flow: K_IN = 200GPM / 80% (rated flow) B_IN = 0 (no flow for closed valve) Example #3 Rulebook Entry:

It is not strictly necessary to specify HI_OUT and LO_OUT, as signal limiting also occurs in the cross reference table (signal limited to a maximum of 225 GPM). Example Use #4: Jog Valve
I/A Field I/A

1FP:XS301R.COUT VALVE 301 RAISE LOWER COUT V301R COUT 1FP:XS301L.COUT V301L V301 RLIMIT LO_LIM HI_LIM

1FP:ZSC301.CIN CIN CIN 1FP:ZSO301.CIN CLOSED LIMIT SWITCH

OPEN LIMIT SWITCH

Parameterization: Parameter IN RTYPE RATE K_IN B_IN HI_OUT LO_OUT Value (see Note below) LINEAR 5 Description Assigned in Cross Reference table Linear rate limit 5%/second; full travel in 20 seconds Scalar on input value Bias on input value High output limit when output reaches 100% Low output limit when output reaches 0%

100 0

Bulk Configurator User Guide

69

Tieback Simulation Model Classes Example #4 Rulebook Entry:

Note: In this two-step model, Open and Close command points are bulk-created and an equation simulates a jog valve in the Rate Limit block. The syntax of the equation follows: V301.IN = IF(V301R = 1, 100, IF(V301L = 1, 0, V301.OUT)) Translating to: If Raise Command is true, then rate limit input is 100%, else if Lower Command is true, then rate limit input is 0%, else input = current position. Equation syntax is very powerful and many types of models can be economicallycreated. See standard DSS documentation for MISCEQTN to find more information on valid equation syntax.

PID
Type: General Proportional plus Integral plus Derivative Math Block (uses PID control algorithm) Parameters: Parameter SP PV KP KI KD HI_OUT LO_OUT MA MANSET OUT HI_LIM LO_LIM Value Any FP, point Any FP, point Any FP Any FP Any FP Any FP Any FP 0, 1 or integer point Any FP or point Any FP 0, 1 0, 1 Description Setpoint Process Variable Proportional Gain Integral Gain Derivative Gain High output limit Low output limit Man/Auto status Value of output when in Manual Output value Flag to indicate high limit reached Flag to indicate low limit reached

Bulk Configurator User Guide

70

Tieback Simulation Model Classes Algorithm: Error = SP PV Proportional = Kp * Error d/dt Integral = Kp * Ki * Error d/dt Deriv = PV Deriv / (Period + 1/Kd) Derivative = Kp * Kd *(PV Deriv) Out = Proportional + Integral + Derivative Example Use #1: Tank with Level Control Valve and Pumps

Parameterization: Parameter SP PV KP KI KD HI_OUT LO_OUT Value Description Connected to Level Control valve output in Cross Reference table (0 100%) Flow out tank = 45% * Pump A and/or B run status (90% maximum) Leave blank for integral-only action Adjust to obtain desired fill/drain rate Derivative Gain High output limit Low output limit
71

45 * (XU5P57A + XU5P57B) 0.01 100 0

Bulk Configurator User Guide

Tieback Simulation Model Classes Example#1 Rulebook Entry

Note: This example is another illustration of models combination, as well as an example of an equation in a parameter field. The first line in the rulebook defines the tieback model for motors (as previously described in the example for DYNAMIC_INTEGER. The second line defines the tank model. The level control valve LY5T27 fills this tank and the pump motor status XU5P27A and B define the drain: OUT = KI * (SP PV) or LEVEL = KI * (LY5T27 45*(XU5P27A + XU5P27B)) The equation for PV in the rulebook contains a # character; which is necessary to tell the rules processing to paste in substitute strings, rather than a literal paste (i.e. $2 is pasted literally). After processing, here is what the PID model entry looks like in the Model worksheet:

Example Use #2: Same as above, but suppose that the level control valve is in one control compound and the tank level indication is in another: Level control valve I/O point: 5TH02_MUDWSH:LY5T57.OUT
different compounds, same loop ID

Tank level indication I/O point: 5T57_MUDWSH:LI5T57.POINT

Bulk Configurator User Guide

72

Tieback Simulation Model Classes

If the rulebook entry in Example #1 above was used as-is, the output from the tank model would not be entered in the cross reference table, since the analog input is in a different compound from the analog output. To remedy this limitation, add another entry:

Note the following: Rule #2: removed Control In Tag (because the tag is in a different compound the rule would be unsuccessful for tying back the analog input because it wouldnt be found). Rule #3: moved the Control In Tag here from Rule 2, and Filter using In Tag is checked. Rule #3: Model Name repeated from Rule 2, however Overwrite is set to XRef in Rule 3. This algorithm means that the model object defined by Rule 2 is not overwritten, but its output is used to tie back to the analog input.

SUM
Type: Sums two signals. Each input signal can be scaled. Parameters: Parameter IN[0] IN[1] K_IN[0] K_IN[1] B_IN[0] B_IN[1] HI_OUT LO_OUT MA MANSET OUT HI_LIM LO_LIM Value Any FP, point Any FP, point Any FP Any FP Any FP Any FP Any FP Any FP 0, 1 or integer point Any FP or point Any FP 0, 1 0, 1 Description First input Second input Scalar on first input Scalar on second input Bias on first input Bias on second input High output limit Low output limit Man/Auto status Value of output when in Manual Output value Flag to indicate high limit reached Flag to indicate low limit reached

Bulk Configurator User Guide

73

Tieback Simulation Model Classes Example: Split Range Control Valves and Flow Feedback
I/A Field I/A

FT224 1FP:FY224A.OUT Flow Control Valve A, 0-100% Flow Control Valve B, 0-100% AOUT 1FP:FY224B.OUT AOUT IN[0] IN[1] SUM OUT 1FP:FI224.POINT AIN Flow: 0 to 500 GPM

Parameterization: Parameter IN[0] IN[1] K_IN[0] K_IN[1] B_IN[0] B_IN[1] 0.25 0.75 Value Description Leave blank connected in cross reference table Leave blank connected in cross reference table 1st valve 25% of capacity (small valve) 2nd valve 75% of capacity (big valve) Leave blank (=0) Leave blank (=0)

Example Rulebook Entry

Note: This model is configured with two rules: the first to define the SUM block and connect the A valve, the second to connect the B valve. The first rule also connects to the single flow transmitter feedback. In Rule 2 that Overwrite is set to XRef; this ensures that the model defined in Rule 1 is not overwritten; only the cross reference entries are connected. The XRef Auto Scale is selected so that 0 100% on the input automatically scales to high and low scale engineering units of the analog input.

TIMER
Type: Time delay on, time delay off, pulse timer

Bulk Configurator User Guide

74

Tieback Simulation Model Classes Parameters: Parameter START PRESET TYPE Value 0,1 Any FP PULSE EXTENDED PULSE ON DELAY STORED ON DELAY OFF DELAY 0,1 0,1 FP 0,1 Description Start timer Timer setting (seconds) Type of timer

MA OUT ACCUM TIMING

Man/Auto Timer output Stored timing value Timing in progress

The various types of timers are illustrated by the figures below:

Bulk Configurator User Guide

75

Tieback Simulation Model Classes

Bulk Configurator User Guide

76

Tieback Simulation Model Classes

Example: Igniter Insert


I/A Field I/A

5IGN:IGNA1_INS.COUT Insert Igniter COUT

IGNA1 TIMER Off-delay

5IGN:IGNA1_TRV.COUT CIN Igniter Inserting

Bulk Configurator User Guide

77

Tieback Simulation Model Classes Parameterization: Parameter START PRESET TYPE Value Description Leave blank connected in cross reference table Igniter takes 10 seconds to insert Inserting signal stops 10 seconds after Insert signal is false

10 OFF_DELAY

Example Rulebook Entry

LEADLAG
Type: Process Lead/Lag Parameters: Parameter IN KLAG KLEAD K_IN B_IN HI_OUT LO_OUT MA MANSET OUT HI_LIM LO_LIM Value Any FP, point Any FP, point Any FP Any FP Any FP Any FP Any FP 0, 1 Any FP or point Any FP 0, 1 0, 1 Description Process input Lag time constant Lead time constant Scalar on input Bias on input High output limit Low output limit Man/Auto status Value of output when in Manual Output value Flag to indicate high limit reached Flag to indicate low limit reached

Bulk Configurator User Guide

78

Tieback Simulation Model Classes Example: Pressure Control Valve


I/A Field I/A

5E01:PY5E01.OUT VESSEL E01 PRESSURE CONTROL AOUT

PTE01 LEADLAG

5E01:PI5E01.OUT AIN VESSEL E01 PRESSURE

Parameterization: Parameter IN KLAG KLEAD Example Rulebook Entry Value Description Leave blank, will be connected in cross reference table 10 second time constant (reaches steady-state in approximately 30 seconds) Not used

10

Bulk Configurator User Guide

79

Tieback Simulation Model Classes

Bulk Configurator User Guide

80

Tieback Simulation Model Classes

MISCEQTN
Type: General purpose miscellaneous equation block Parameters: Parameter OUT[0] OUT[1] OUT[2] OUT[3] OUT[4] OUT[5] OUT[6] OUT[7] OUT[8] OUT[9] OUT[10] OUT[11] Value Equation Description Any valid Dynsim equation

The MISCEQTN equation syntax is identical to the Microsoft Excel application. The following types of operations are supported:

Operator Description

+ x / ^ &

> < == !

Operator Specified First Plus No Minus No Multiply No Divide No Negative Yes Power No And (result is No 1.0 if both are not 0.0) Or (result is No 1.0 if either is not 0.0) greater than No less than No Equal to No Not (inverse Yes

Argument Style Operands No No No No No No No

Priority

# of Operands 2 2 2 2 1 2 2

Example

3 3 2 2 1 1 4

Var1 + Var2 Var1 - Var2 Var1 x Var2 Var1 / Var2 - Var1 Var1 ^ Var2 Var1 & Var2

No

Var1 | Var2

No No No No

4 4 4 1

2 2 2 1

Var1 > Var2 Var1 < Var2 Var1 == Var2 ! Var1

Bulk Configurator User Guide

81

Tieback Simulation Model Classes Operator Description Operator Specified First Yes Argument Style Operands Yes Priority # of Operands Example

EQFF

CINTRP 1 LIM01

LIMV

MAX MIN ABS RAND IF

logical) Equivalent flow coefficients in series Function generator Limits between 0.0 and 1.0 Limits between minimum and maximum maximum of 2 values minimum of 2 values absolute value random noise if statement

eqff(Var1, Var2)

Yes Yes

Yes Yes

1 1

2 1

cintrp1(Var1, Tab1) lim01(Var1)

Yes

Yes

limv(Var1, Min, Max)

Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes

1 1 1 1 1

2 2 1 2 3

max(Var1, Var2) min(Var1, Var2) abs(Var1) rand(Amp, Period) if(condition, true value, false value) sin(var1) cos(var1) tan(var1) asin(var1) acos(var1) atan(var1) exp(var1) log(var1)

SIN COS TAN ASIN ACOS ATAN EXP LOG

LOG10

Sine Cosine Tangent Arc sine Arc cosine Arc tangent Exponential, base e Natural logarithm (base e), argument must be greater than 0 Base 10 logarithm,

Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes

1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1

Yes

Yes

Log10(var1)

Bulk Configurator User Guide

82

Tieback Simulation Model Classes Operator Description Operator Specified First Argument Style Operands Priority # of Operands Example

SQRT

H_PTX1

R_PH1

S_PH1

T_PH1

argument must be greater than 0 Square root, argument must be nonnegative Enthalpy f(fluid type, pressure, temperature, quality) Density f(fluid type, pressure, enthalpy) Entropy f(fluid type, pressure, enthalpy) Temperature f(fluid type, pressure, enthalpy)

Yes

Yes

sqrt(var1)

Yes

Yes

h_ptx(fluid type, pressure, temperature, quality) r_ph(fluid type, pressure, enthalpy) S_ph(fluid type, pressure, enthalpy) t_ph(fluid type, pressure, enthalpy)

Yes

Yes

Yes

Yes

Yes

Yes

These equation types are valid only with the Power Industry Libraries.

The operands of equations and arguments of operators can be constants or valid Dynsim point names. For example, a MAX equation can be of the form MAX(2.,3.) or MAX(2.,HDR1.P). In this second example HDR1.P might be the pressure of a header object named HDR1. Some of the operators need some additional discussion is provided below. EQFF EQFF is an operator for combining flow coefficients of resistances in series in a flow path. If two resistances, K1 and K2, are in series in a flow path, the equivalent resistance can be calculated from the equation: K1 K 2 EQFF = K 12 + K 2 2

Bulk Configurator User Guide

83

Tieback Simulation Model Classes CINTRP1 CINTRP1 is used for linear interpolation of a monotonic function. The first argument is the independent variable used in the interpolation. The second argument is the zeroth element of an Dynsim vector point to be used for interpolation. The Dynsim point array elements must be in the following format
Element 0 = number of x/y pairs in the table Element 1 = dummy place holder just initialize to zero

Element 2 = first x value Element 3 = first y value Element 4 = second x value Element 5 = second y value As an example consider a table with 3 x/y pairs (x1 = 100, y1 = 175, x2 = 200, y2 = 225, x3 = 300, y3 = 275) that we need to use for linearly interpolating. We will use the vector point ETABLE to hold the table for use with the CINTRP1 operator. The elements of ETABLE would then be:
ETABLE[0] = 3

ETABLE[1] = 0 ETABLE[2] = 100 ETABLE[3] = 175 ETABLE[4] = 200 ETABLE[5] = 225 ETABLE[6] = 300 ETABLE[7] = 275 ETABLE can then be used in a CINTRP1 equation such as
CINTRP1(237.,ETABLE[0])

The table provided to CINTRP1 must be monotonic. H_PTX, R_PH, T_PH, S_PH These functions are used to get fluid properties at a given thermodynamic condition using the Power Industry Library fluid types. They cannot access the SIM4ME Portal Thermodynamics methods. H_PTX returns the enthalpy at a given pressure, temperature and vapor quality. R_PH returns the density and a given pressure and enthalpy. T_PH returns the temperature at a given pressure and enthalpy. S_PH returns the entropy at a given pressure and enthalpy. In all cases the fluid type must be specified by the integer value for that fluid type. The pressure, temperature, quality and enthalpy arguments can be entered as constants or valid Dynsim point names.

Bulk Configurator User Guide

84

Tieback Simulation Model Classes

Custom for OTS Engineers


Type: User defined Parameters: None Purpose: The model classes and input parameters that an OTS engineer typically uses are different than the model classes available in the Bulk Configurator. For this reason the Custom model option is provided to allow the OTS engineer to use the rulebook to bulk-generate cross reference table entries to models he or she has already created. Since the OTS engineer has already created the detailed plant models via the DSS user interface, no models will be bulk-created when the "Custom" rule is applied). The Model Engine combo box in the rulebook will contain an additional item called Any and will be in italic font. The purpose of this selection is to save the user from having to figure out which model engine and/or flowsheet contains an existing DSS model object instance (e.g. "PUMP: P123" contained in "Dynsim2" model engine located on flowsheet "Water System").When Any is selected the Bulk Configurator will automatically fill in the cross reference "To Engine" or "From Engine" fields with the correct model engine for the referenced Dynsim model name and parameter name. Because the Custom Rulebook entry does not create new models, an error will occur if there is no model object instance to match the supplied regular expression. When this occurs, the offending rows will be highlighted red in the cross reference table, and will not be processed upon "Send to DSS." A message detailing the row and model name will be output to the status window for each row the error occurred on, and the message box will display a warning to alert the user. The user can input Model In Param and Model Out Param fields of his choice and may even choose to leave them blank. Example Rulebook Entry

Bulk Configurator User Guide

85

Regular Expressions

Appendix B: Using Regular Expressions with the Tieback Simulation (Checkout View)
A regular expression is a set of pattern matching rules based on string syntax used widely with many text editors and formal computer languages to parse text for copy, paste, replace, or to generate input and output data in a formal programming language. Programmers have employed regular expressions for decades and have created standardized set of symbols defining the syntax. This appendix is not intended to serve as a full-fledged reference but rather to get the user up and running quickly in using the Bulk Configurator. Users are encouraged to refer to the numerous online resources and books that are available on regular expressions for better understanding.

Regular Expression
A regular expression (aka regex or regexp) is a special way of specifying search patterns. A simple example of a search pattern is *.doc or *.xls to search for files in Windows Explorer. Another example is the Find and Replace (using wild cards) feature in Microsoft Word. Regular expressions enable us to perform searches within a given text block. They can be used to match strings in a text block, validate data based on specific character sequences, and to form new text strings by replacement. The regex equivalents of the above examples are .*\.doc$ and .*\.xls$ respectively.

.NET Regular Expressions


Regular expressions are supported by several languages and tools such as Perl programming language, Java programming language, the Microsoft .NET languages, awk, the UNIX grep tool, etc. Though the exact syntax and supported features could vary among the different languages, for practical purposes, the syntax is quite similar. For a comparison of the different flavors, refer to: http://www.regular-expressions.info/refflavors.html

The Bulk Configurator was developed using Microsoft .NET language and therefore uses the .NET regular expression engine and its syntax.

Starter Syntax Examples


In the Bulk Configurator Rulebook, a rule specification includes:

Bulk Configurator User Guide

86

Regular Expressions 1. A search regular expression to search for an input or output tag matching a certain pattern 2. A replace regular expression to generate a model name by replacing parts of the matched tag 3. A replace regular expression to determine the other tag name that needs to be connected back to the tag in (1) to complete the tieback.

Therefore a basic knowledge of both search and replace syntax is essential. A few basic syntax examples are listed below. Please refer to section Regular Expression Basic Syntax Reference in this document for a more detailed reference.

Search Syntax
The characters [\^$.|?*+(){}have special meaning in regular expressions. All other characters (alphabets, numerals, other special characters) match a single instance of themselves. The character . (dot) means, match any character. The character * means, match the previous character zero or more times. Combining the above two, .* means, match any character zero or more times. .* is the regex equivalent of the wildcard * in Windows Explorer search. Similarly, a* means match the character a zero or more times and would match with abc, baac, bcaaa but not with bcd. ab*c would match with abc, fabdcg but not with fbbc. A backslash \ in front of any of the above special characters suppresses their special meaning.
\. means match the character .. .*\ .*\. would match with a.c, d123.f but not with abcd

The character ? means, the previous character is optional. abc1?d will match with abcd and abc1d but not with abc11d (1 is optional, i.e., either zero or one 1 but not more). Instead of using the . which would match with any character, one could use \w or \d to customize the search
\w means, match with a letter or digit or _. \d means, match with a digit.

Bulk Configurator User Guide

87

Regular Expressions
\w* would match with abc, 12_345 but not with a!bc. \d* would match with 123

but not with abc or ab!c. Negated versions of these are also available. Refer to Regular Expression Basic Syntax Reference.
[] matches any single character between the square brackets. a[123]b matches with a1b, a2b but not with abb or a11b. a[\ a[\d]b matches with a1b, a2b, , a9b but not with aab and abb. a[\ a[\d]* d]*b matches with a1b, a12b and a111b

^ means, start of string. ^ab matches with abcd but not with cabcd.

^ immediately after [ has a different meaning. [^] matches any single character

not between the square brackets.


a[^1]b matches with a2b but not with a1b

$ means, end of string. abc$ matches with abc, 123abc but not with 123abc456.

{n} means, match the previous character exactly n times. ab{2}c matches with abbc and 123abbc456 but not with abbbc.

() is used to specify grouping and is useful in building a replace regular

expression.

Bulk Configurator User Guide

88

Regular Expressions

Regex Replace
A search regular expression and a replace regular expression could be used in combination to first match a string and then form a different string by replacement. The ()is quite useful for this purpose. As mentioned earlier, it is used to specify grouping. The string $1, $2, etc., is used to indicate the subgroups to use in the replacement. Search Syntax
FI FI(.*) FI(.*) Matches FIxy abcFIxyFIde FIxy FIxy abcFIxy abcFIxy aFIxy abcFIba 22_FI_xy Replace Syntax XT XT XT XT$1 XT$1 XT XT$1 XT$1 XT$1 XT$1 $1XT $1XT$2 XT$2 XT$2 XT$2 After Replacement XTxy abcXTxyXTde XT XTxy abcXT abcXTxy XTa abcFIba XT_xy

(.*)FI (.*)FI(. FI(.*) (.*)

As can be seen from the above examples, the new string is formed by replacing the matches in the original string with the replacement string. The different replacement sequences are listed below:
$1, $2, ${name} $` $ $& $+ $_

Matched text of a subgroup Matched text of a named capture group Text before match Text after match Text of match Last subgroup match Original input string

Examples specific to I/A Series and Triconex Applications


The Bulk Configurator looks at the entire I/O tag in the cross-reference file. I/A Series software tags are of the format CompoundName:BlockName.ParameterName. TRISIM tags are simpler and just have the point name with no delimiters like : and .. Some examples specific to the Bulk Configurator are shown below. Note: Valid Dynsim model names should start with an alphabet, contain no special characters other than _ and should be less than 60 characters in length. In addition, the tagnames used here are made up to demonstrate the regex use and may not conform to any naming standards.

Bulk Configurator User Guide

89

Regular Expressions

Filter based Tag names to be bulk on configured 1B03_MW:FY5F01.OUT 1B03_MW:FY5F02.OUT Block Names 1B03_MW:FY5F03.OUT 1B04_MW:FY5F04.OUT 1B05_MW:FY5F05.OUT

Search syntax to ensure match (.*):FY(.*)\.OUT

Tieback tag replace syntax $1:FI$2.MEAS1

Model name The corresponding tieback replace syntax tags 1B03_MW:FI5F01.MEAS1 1B03_MW:FI5F02.MEAS1 1B03_MW:FI5F03.MEAS1 1B04_MW:FI5F04.MEAS1 1B05_MW:FI5F05.MEAS1 XV$2

Generated model names XV5F01 XV5F02 XV5F03 XV5F04 XV5F05

1B03_MW:FY5F01.FBCO_1 (.*):(.*)\.FBCO_(.*) 1B03_MW:FY5F01.FBCO_2 Block + Parameter Names 1B03_MW:FY5F01.FBCO_3 1B03_MW:FY5F02.FBCO_1 1B03_MW:FY5F02.FBCO_2 1B03_MW:FY5F02.FBCO_3

$1:$2.FBCIN_$3

1B03_MW:FY5F01.FBCIN_1 DI$2_$3 1B03_MW:FY5F01.FBCIN_2 1B03_MW:FY5F01.FBCIN_3 1B03_MW:FY5F02.FBCIN_1 1B03_MW:FY5F02.FBCIN_2 1B03_MW:FY5F02.FBCIN_3

DIFY5F01_1 DIFY5F01_2 DIFY5F01_3 DIFY5F02_1 DIFY5F02_2 DIFY5F02_3

1B03_MW:FY5F01.OUT 1B03_MW:FY5F02.OUT 1B03_MW:FY5F03.OUT 1B04_MW:FY5F04.OUT 1B05_MW:FY5F05.OUT

(.*)MW:FY(.*)\.OUT $1AWD:FI$2.POINT 1B03_AWD:FI5F01.POINT 1B03_AWD:FI5F02.POINT 1B03_AWD:FI5F03.POINT 1B04_AWD:FI5F04.POINT 1B05_AWD:FI5F05.POINT

XV$1_$2

XV1B03_5F01 XV1B03_5F02 XV1B03_5F03 XV1B04_5F04 XV1B05_5F05

Compound + Block

Simple

40001 40002 40003 40004

400(.*)

500$1

50001 50002 50003 50004

D_45_$1 D_45_01 D_45_02 D_45_03 D_45_04

Bulk Configurator User Guide

90

Regular Expressions

Regular Expression Basic Syntax Reference


Characters

Character Any character except [\^$.|?*+()

Description All characters except the listed special characters match a single instance of themselves. { and } are literal characters, unless they're part of a valid regular expression token (e.g. the {n} quantifier).

Example
a matches a

\ (backslash) followed by any of [\^$.|?*+(){} \Q...\E

A backslash escapes special characters to suppress their special meaning.

\+ matches +

Matches the characters between \Q and \E literally, suppressing the meaning of special characters. Matches the character with the specified ASCII/ANSI value, which depends on the code page used. Can be used in character classes. Match an LF character, CR character and a tab character respectively. Can be used in character classes. Match a bell character (\x07), escape character (\x1B), form feed (\x0C) and vertical tab (\x0B) respectively. Can be used in character classes. Match an ASCII character Control+A through Control+Z, equivalent to \x01 through \x1A. Can be used in character classes.

\Q+Q+-*/\ */\E matches +-*/

\xFF where FF are 2 hexadecimal digits

\xA9 matches when using the Latin-1 code page.

\n, \r and \t

\r\n matches a DOS/Windows CRLF line break.

\a, \e, \f and \v

\cA through \cZ

\cM\ cM\cJ matches a DOS/Windows CRLF line break.

Bulk Configurator User Guide

91

Regular Expressions

Character Classes or Character Sets [abc]

Character
[ (opening square bracket)

Description Starts a character class. A character class matches a single character out of all the possibilities offered by the character class. Inside a character class, different rules apply. The rules in this section are only valid inside character classes. The rules outside this section are not valid in character classes, except \n, \r, \t and \xFF All characters except the listed special characters.

Example

Any character except ^-]\ add that character to the possible matches for the character class. \ (backslash) followed by any of ^-]\

[abc] matches a, b or c

A backslash escapes special characters to suppress their special meaning.

[\^\]] matches ^ or ]

- (hyphen) except immediately after the opening [ ^ (caret) immediately after the opening [

Specifies a range of characters. (Specifies a hyphen if placed immediately after the opening [) Negates the character class, causing it to match a single character not listed in the character class. (Specifies a caret if placed anywhere except after the opening [) Shorthand character classes matching digits 0-9, word characters (letters and digits) and whitespace respectively. Can be used inside and outside character classes. Negated versions of the above. Should be used only outside character classes. (Can be used inside, but that is confusing.)

[a[a-zAzA-Z0Z0-9] matches any letter or digit

[^a[^a-d] matches x (any character except a, b, c or d)

\d, \w and \s

[\d\s] matches a character that is a digit or whitespace

\D, \W and \S

\D matches a character that is not a digit

Bulk Configurator User Guide

92

Regular Expressions
[\b]

Inside a character class, \b is a backspace character.

[\b\t] matches a backspace or tab character

Dot

Character
. (dot)

Description Matches any single character except line break characters \r and \n. Most regex flavors have an option to make the dot match line break characters too.
Anchors

Example
. matches x or (almost) any other character

Character
^ (caret)

Description Matches at the start of the string the regex pattern is applied to. Matches a position rather than a character. Most regex flavors have an option to make the caret match after line breaks (i.e. at the start of a line in a file) as well. Matches at the end of the string the regex pattern is applied to. Matches a position rather than a character. Most regex flavors have an option to make the dollar match before line breaks (i.e. at the end of a line in a file) as well. Also matches before the very last line break if the string ends with a line break. Matches at the start of the string the regex pattern is applied to. Matches a position rather than a character. Never matches after line breaks. Matches at the end of the string the regex pattern is applied to. Matches a position rather than a character. Never matches before line breaks, except for the very last line break if the string ends with a line break.

Example
^. matches a in abc\ndef. Also matches d in "multiline" mode.

$ (dollar)

.$ matches f in abc\ndef. Also matches c in "multiline" mode.

\A

\A. matches a in abc

\Z

.\Z matches f in abc\ndef

Bulk Configurator User Guide

93

Regular Expressions
\z

Matches at the end of the string the regex pattern is applied to. Matches a position rather than a character. Never matches before line breaks.
Word Boundaries

.\z matches f in abc\ndef

Character
\b

Description Matches at the position between a word character (anything matched by \w) and a non-word character (anything matched by [^\w] or \W) as well as at the start and/or end of the string if the first and/or last characters in the string are word characters. Matches at the position between two word characters (i.e the position between \w\w) as well as at the position between two non-word characters (i.e. \W\W).
Alternation

Example
.\b matches c in abc

\B

\B.\ B.\B matches b in abc

Character
| (pipe)

Description Causes the regex engine to match either the part on the left side, or the part on the right side. Can be strung together into a series of options. The pipe has the lowest precedence of all operators. Use grouping to alternate only part of the regular expression.

Example
abc|def|xyz matches abc, def or xyz

| (pipe)

abc(def|xyz) matches abcdef or abcxyz

Quantifiers

Character
? (question mark)

Description Makes the preceding item optional. Greedy, so the optional item is included in the match if possible.

Example
abc? matches ab or abc

Bulk Configurator User Guide

94

Regular Expressions
??

Makes the preceding item optional. Lazy, so the optional item is excluded in the match if possible. This construct is often excluded from documentation because of its limited use. Repeats the previous item zero or more times. Greedy, so as many items as possible will be matched before trying permutations with less matches of the preceding item, up to the point where the preceding item is not matched at all. Repeats the previous item zero or more times. Lazy, so the engine first attempts to skip the previous item, before trying permutations with ever increasing matches of the preceding item. Repeats the previous item once or more. Greedy, so as many items as possible will be matched before trying permutations with less matches of the preceding item, up to the point where the preceding item is matched only once. Repeats the previous item once or more. Lazy, so the engine first matches the previous item only once, before trying permutations with ever increasing matches of the preceding item. Repeats the previous item exactly n times. Repeats the previous item between n and m times. Greedy, so repeating m times is tried before reducing the repetition to n times. Repeats the previous item between n and m times. Lazy, so repeating n times is tried before increasing the repetition to m times.

abc?? matches ab or abc

* (star)

".*" matches "def" "ghi" in abc "def" "ghi" jkl

*? (lazy star)

".*?" matches "def" in abc "def" "ghi" jkl

+ (plus)

".+" matches "def" "ghi" in abc "def" "ghi" jkl

+? (lazy plus)

".+?" matches "def" in abc "def" "ghi" jkl

{n} where n is an integer >= 1 {n,m} where n >= 1 and m >= n

a{3} matches aaa

a{2,4} matches aa, aaa or aaaa

{n,m}? where n >= 1 and m >= n

a{2,4}? matches aaaa, aaa or aa

Bulk Configurator User Guide

95

Regular Expressions
{n,} where n >= 1

Repeats the previous item at least n times. Greedy, so as many items as possible will be matched before trying permutations with less matches of the preceding item, up to the point where the preceding item is matched only n times. Repeats the previous item between n and m times. Lazy, so the engine first matches the previous item n times, before trying permutations with ever increasing matches of the preceding item.

a{2,} matches aaaaa in aaaaa

{n,}? where n >= 1

a{2,}? matches aa in aaaaa

Other Resources
Books (several) Google for .NET regular expressions Tools o RegexCoach (http://www.weitz.de/regex-coach) o RegexBuddy (http://www.regexbuddy.com)

Bulk Configurator User Guide

96

You might also like