Академический Документы
Профессиональный Документы
Культура Документы
DYNSIM® 5.3.2
Bulk Configurator
User Guide
December 2016
All terms mentionedin this documentation that are known to be trademarks or service marks have
been appropriately capitalized. Schneider Electric Software, LLC. cannot attest to the accuracy of
this information. Use of a term in this documentation should not be regarded as affecting the
validity of any trademark or service mark
ActiveFactory, ArchestrA, ARPM, AssayCentral, Autonomous, Avantis, Avantis.PRO,
Connoisseur, CrudeManager, CrudeSuite, DATACON, DATAPREP, DT Analyst, DYNSIM,
DYNSIM Power, Esscor, EYESIM, Factelligence, FactorySuite, FactorySuite A², Foxboro,
Foxboro Evo, FSIM Plus, HEXTRAN, Hot Links, I/A Series, IMPACT, IMServ, InBatch,
InControl, Industrial Portal, IndustrialSQL Server, InFusion, INPLANT, InSQL, IntelaTrac,
InTouch, IPact, Invensys, Logic Validator, MBM, NETOPT, PIPEPHASE, PRO/II,
PROVISION, QI Analyst, ROMeo, SCADAlarm, SIM4ME, SimCentral, SimSci, SimSci-Esscor,
Skelta, Skelta BPM.NET, Skelta Sharepoint, Skelta Sharepoint Accelerator, Spiral Software,
SuiteVoyager, TACITE, Tactical Batch, The Simulator, TRISIM Plus, VISUAL FLARE,
VISUAL FLOW, VISUAL FLOW SUITE, VISUAL NETWORK, Visual Solutions,
VOYAGER, WindowMaker, WindowViewer, Wonderware, Wonderware InTouch, and ZI ZHI
are trademarks of Schneider Electric SE, its subsidiaries and affiliated companies.
© 2016 by Schneider Electric Software, LLC. All rights reserved.
No part of this documentation shall be reproduced, stored in a retrieval system, or transmitted by
any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written permission of Schneider Electric Software, LLC. No liability is assumed with respect to
the use of the information contained herein.
Although precaution has been taken in the preparation of this documentation, Schneider Electric
Software, LLC assumes no responsibility for errors or omissions. The information in this
documentation is subject to change without notice and does not represent a commitment on the
part of Schneider Electric Software, LLC. The software described in this documentation is
furnished under a license agreement. This software may be used or copied only in accordance
with the terms of such license agreement.
ArchestrA, Avantis, DYNSIM, EYESIM, Foxboro, Foxboro Evo, I/A Series, InBatch, InduSoft,
IntelaTrac, InTouch, PIPEPHASE, PRO/II, PROVISION, ROMeo, Schneider Electric, SIM4ME,
SimCentral, SimSci, Skelta, SmartGlance, Spiral Software, VISUAL FLARE, WindowMaker,
WindowViewer, and Wonderware are trademarks of Schneider Electric SE, its subsidiaries, and
affiliated companies. An extensive listing of Schneider Electric Software, LLC trademarks can be
found at: http://software.schneider-electric.com/legal/trademarks/. All other brands may be
trademarks of their respective owners.
Schneider Electric Software, LLC
26561 Rancho Parkway South
Lake Forest, CA 92630 U.S.A.
(949) 727-3200
http://software.schneider-electric.com/
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
Pre-requisites and Excel Settings for Bulk Configurator .....................................11
Pre-requisites................................................................................................................. 11
Re-installing Pre-Requisites.......................................................................................... 11
.Net Framework ........................................................................................................ 11
VSTO 2005 SE ......................................................................................................... 11
VSTO 40 ................................................................................................................... 11
MS Office PIAs......................................................................................................... 11
Excel Settings................................................................................................................ 12
.NET Programmability Support ................................................................................ 12
Excel Security Settings ............................................................................................. 15
VBA feature Settings ................................................................................................ 18
Introduction to Tieback Simulation .........................................................................21
Tieback Simulations ..................................................................................................22
Important Simulation Concepts ...............................................................................26
Simulation Engines ....................................................................................................... 26
Time Control and Synchronization ............................................................................... 27
Cross Referencing ......................................................................................................... 27
Model Objects and Parameters ..................................................................................... 28
FSIM Engine Snapshots and Checkpoints .................................................................... 28
TRISIM Engine Snapshots ........................................................................................... 29
FSIM Engine with Multiple I/A Series Control Processors.......................................... 29
TRISIM Engine Multiple PLC Simulation ................................................................... 30
Bulk Configurator ......................................................................................................31
Launching the Bulk Configurator ................................................................................. 31
Components of the Bulk Configurator.......................................................................... 32
Action Pane ............................................................................................................... 33
Bulk Configurator Toolbar ....................................................................................... 34
Checkout View (Tieback Simulation) .......................................................................... 35
Tieback Simulation using the Bulk Configurator: Workflow................................... 35
Cross Reference and Model Worksheets .................................................................. 37
Rulebook ................................................................................................................... 40
Import / Export Rules................................................................................................ 44
Setting up a Rule – Simple Example ........................................................................ 45
Apply Rules .............................................................................................................. 47
Model (Checkout) Worksheet ................................................................................... 50
Send to DSS .............................................................................................................. 54
Status Messages ........................................................................................................ 55
Model Data View .......................................................................................................... 56
Configure Model Data View..................................................................................... 58
Rename Model Objects ............................................................................................. 61
Model Data View settings ......................................................................................... 62
Model Data View Navigation Features..................................................................... 63
Status Messages ........................................................................................................ 67
Appendix A: Tieback Simulation Model Classes (Checkout View) .....................68
STATIC_DOUBLE ...................................................................................................... 69
DYNAMIC_INTEGER ................................................................................................ 71
STATIC_INTEGER ..................................................................................................... 72
LATCH ......................................................................................................................... 73
AND, OR ...................................................................................................................... 74
FCTGEN ....................................................................................................................... 75
RLIMIT ......................................................................................................................... 76
PID ................................................................................................................................ 81
SUM .............................................................................................................................. 84
TIMER .......................................................................................................................... 85
LEADLAG .................................................................................................................... 89
MISCEQTN .................................................................................................................. 92
Custom for OTS Engineers ........................................................................................... 96
Appendix B: Using Regular Expressions with the Tieback Simulation
(Checkout View) .........................................................................................................97
Regular Expression ....................................................................................................... 97
.NET Regular Expressions ............................................................................................ 97
Starter Syntax Examples ............................................................................................... 97
Search Syntax................................................................................................................ 98
Regex Replace ............................................................................................................ 100
Examples specific to I/A Series and Triconex Applications ...................................... 100
Regular Expression Basic Syntax Reference .............................................................. 102
Regular Expression Basic Syntax Reference .............................................................. 102
Other Resources .......................................................................................................... 107
Welcome to Bulk Configurator
This User Guide provides an overview of use cases and configuration of the Bulk
Configurator tool, an Microsoft 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
Microsoft 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.
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:
Access FSIM Plus application, TRISIM Plus application, and DYNSIM application
specific documentation through a variety of means:
o Checkout View
o Model Data View
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.
Features
1. High, Medium, and Low Fidelity models: Supports parameterization of models
generated for all available DYNSIM-type engines, including:
• DYNSIM High-fidelity process modeling tool for oil and gas, refining,
engine and chemical industries
2. Customize display parameter list for each model: Modify which parameters
display in the Microsoft 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 Microsoft Excel files and
associate them with the appropriate simulation. It supports saving (and opening)
the Microsoft 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 Microsoft
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.
Additional Reading
The following guides and user manuals are available for further reference:
Please install Microsoft Excel before installing the DYNSIM / BulkConfigurator and
verify appropriate Excel and VBA settings as described in later sections.
Re-installing Pre-Requisites
If the Bulk Configurator does not launch, check for the pre-requisites and if they are not
present, please re-install them manually as described below.
.Net Framework
In one of the folders DotNet.3.5 of install, you will find RunFx.bat . Run this to install the
.Net Framework 3.5.
VSTO 2005 SE
Run vstor.exe from the folder “.. \supportdir\ThirdPartyUtilities\VSTO2.0SE” to install
the Visual Studio 2005 Tools for Office.
VSTO 40
Run vstor40_x64.exe (64 bit OS) or vstor40_x86.exe (32 bit OS) from the folder
VSTO40 to install the Microsoft VSTO 4.0 runtime.
MS Office PIAs
Install Microsoft Office PIAs for the respective Office 2010 if it does not exist.
Please see the below sections to ensure that the proper settings have been selected for
Office / Excel.
1. Go to Control Panel
2. Select Add or Remove Programs
3. Select Microsoft Office 2010 or 2013 or 2016 and click Change.
MS Office 2010
If “.NET Programmability Support” is not installed (), then select it and from drop-down
menu, select Run from My Computer and click Continue.
MS Office 2013
MS Office 2016
If “.NET Programmability Support” is not installed (), then select it and from drop-down
menu, select Run from My Computer and click Continue.
Excel 2010/2013/2016
If Microsoft Excel 2010, then Bulk Configurator requires that in addition to macros and
VBA access ActiveX controls be enabled. The following screenshots show how these
settings can be changed. (OptionsTrust CenterTrust Center SettingsMacro
Settings / ActiveX Settings).
If user does not have permission to change these settings, then add user folder to the
trusted locations in Microsoft Excel (OptionsTrust CenterTrust Center
SettingsTrusted Locations).
Office 2016
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:
(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.
Tieback Simulations
A tieback simulation attempts to test the behavior of a control system in a simulated real-
world environment. Figure 1 shows a simple representation of the pieces of a process
control system installed in a plant.
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 floor-
environment:
Specially- K ⌠
inserted Modify
Simulation blocks to
Block turn off
AOUT AIN connection
to I/O
Module
LAG
To I/O From
Module I/O
Module
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
Each of these previous tieback simulation approaches has the following disadvantages:
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):
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.
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
Dynsim
DCS Engine
SIM4ME
PLC Excel®
Engine
3rd Party
Engine
The Simulation Executive controls each engine’s 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):
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.
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 LT5T27’s OUT output
parameter connecting to the analog input block LI5T27, in Compound 5ADD_SYSTEM.
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. FSIM’s 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.
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.
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.
Launch the Bulk Configurator from the DSS GUI by selecting Tools->Bulk Configurator
(Figure 10).
The user is prompted to create or open an Microsoft Excel spreadsheet. After launching
the Bulk Configurator, the current model data and cross reference table in the DSS
database/simulation, are imported into the Microsoft Excel spreadsheet.
(a) Perform model edits and manual cross referencing by simply typing
into the Excel cells.
(b) 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)
(c) 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).
(d) 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.
• 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
Simulation Name
When BulkConfigurator launches, the simulation name displays automatically in this
field.
View
Through the Action Pane, choose how the data displays:
• Checkout View Bulk Configure model objects through the Rulebook and
automatically tie I/O to model objects
• Model Data Parameterize model objects created using any DYNSIM,
View DYNSIM-P, DYNSIM-C, or DYNSIM-L library
Update
After bulk configuring a new tieback model or parameterizing model objects perform the
following actions:
• Send to DSS Send the modified data to DYNSIM simulation
• 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.
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.
Along with the standard Excel menu options, a “SIMSCI” menu option contains
additional menu options (Figure 13).
• Document Actions (activate Actions Pane),
• Help (Bulk Configurator documentation)
The figure below shows the start-of-day to end-of-day workflow procedures in using a
tieback simulation.
(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.
Cross Reference and Model Worksheets
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.
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.
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
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.
1. Enable Rule When selecting Apply Rules, this rule will execute
2. Overwrite:
• None Does not overwrite previously-defined
or custom entries for XRef or model
(“None” will overwrite default points
in XRef)
• XRef Overwrite any applicable XRef entries
• Model Overwrite any applicable model entries
• Both Overwrite model and XRef entries
3. Description Text field describing rule
4. Control Engine The non-DYNSIM engine, such as FSIM Plus engine
or TRISIM Plus engine
5. Filter Using Tells the rule which I/O point is the “search” tag and
Out/In Tag which is the resulting “paste” tag
6. Model Engine The DYNSIM engine that models the process
Note: Incomplete rules are indicated by a red error mark adjacent to the rule number.
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.
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.
Export and import rules facilitate rulebook reusability for multiple projects.
Export
.
Figure 20. Save Rules
Import
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
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 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.
• 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
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 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.
Model (Checkout) Worksheet
The Model Worksheet displays available bulk-configured model data in a “Model” sheet
as shown in Figure 28a.
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.
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.
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.
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).
Figure 29a. Parameter Input Dialog
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.
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.
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.
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 over-
writing 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
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:
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.
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.
Figure 33. Configure Model Data View
After selecting the list of parameters the Model sheet appears as shown in Figure 34.
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.
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.
Figure 38. Export Dialog
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.
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. Renaming model objects will not work for text based ICs.
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 45. Bulk Configurator Display of TOWER Spacing data at different sections
Validate Data
The Bulk Configurator validates DYNSIM Parameter naming conventions at the Unit-
Operation 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.
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.
Tieback Simulation Model Classes
DYNAMIC_DOUBLE
Type: General Purpose Double Precision Variable
Parameters:
Field I/A
FLOW TRANSMITTER
1CST:FI049.POINT FT049 (0 TO 550 GPM)
FT049 AIN
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
Parameters:
15
10
-25 15 25
-15
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.
Enter an array directly into the Model flowsheet or, alternatively, add it in the DSS GUI.
Tieback Simulation Model Classes
DYNAMIC_INTEGER
Parameters:
1MCC:XU6P13.COUT 1MCC:XU6P13_M.CIN
MOTOR
6P13 COUT XU6P13M CIN
RUN
COMMAND
Parameterization:
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).
Tieback Simulation Model Classes
STATIC_INTEGER
Parameters:
1CST:PB1_LOCAL.FBCIM
MOTOR
LOCAL/REMOTE
PB1_LOC CIN STATUS (1=REMOTE)
Parameterization:
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).
Tieback Simulation Model Classes
LATCH
Parameters:
MOTOR
6P13 COUT LATCH CIN
START
COMMAND
1MCC:XU6P13SP.COUT
MOTOR
6P13 COUT
STOP
COMMAND
Parameterization:
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.
Tieback Simulation Model Classes
AND, OR
Parameters:
1PHFAN:XUPHF.COUT 1PHFAN:XUPHF_M.CIN
XUPHF
PENTHOUSE
FAN RUN COUT AND CIN
COMMAND
1PHFAN:XUPHFLO.COUT
PENTHOUSE
FAN LOCAL COUT
LOCKOUT
Parameterization:
Note: The AND block feeds back running status if Run Command is true and Local
Lockout is not true.
FCTGEN
Parameters:
Field I/A
PRESS_VS_TEMP
1HC:PI512.POINT
TT512 1HC:TI512.POINT
Tieback Simulation Model Classes
Parameterization:
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.
Enter a function generator directly into the Model flowsheet or add it in the DSS GUI.
RLIMIT
Parameters:
Example Use #1: Control Valve with open and closed limit switch feedback
I/A Field I/A
1FP:ZSC224.CIN
1FP:FY224.OUT FV224
CIN CLOSED LIMIT SWITCH
LO_LIM
AOUT IN RLIMIT
HI_LIM
CIN OPEN LIMIT SWITCH
1FP:ZSO224.CIN
Parameterization:
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.
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.
1FP:FY224.OUT 1FP:FI224.POINT
FV224
Flow
Control
AOUT IN RLIMIT Flow: 0 to 225 GPM
Valve, OUT AIN
0-100%
Parameterization:
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 AIN’s 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 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:
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:
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).
1FP:XS301R.COUT 1FP:ZSC301.CIN
VALVE 301 V301
RAISE COUT
CIN CLOSED LIMIT SWITCH
V301R LO_LIM
RLIMIT
LOWER
COUT V301L HI_LIM
CIN OPEN LIMIT SWITCH
1FP:XS301L.COUT
1FP:ZSO301.CIN
Parameterization:
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:
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 economically-
created. 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:
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:
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:
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:
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 wouldn’t 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
Parameters:
FT224
1FP:FY224A.OUT 1FP:FI224.POINT
IN[0] SUM OUT
Flow
Control
AOUT IN[1] AIN Flow: 0 to 500 GPM
Valve A,
0-100% 1FP:FY224B.OUT
Flow
Control
Valve B, AOUT
0-100%
Parameterization:
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
Parameters:
Insert Igniter
COUT TIMER CIN
Igniter Inserting
Off-delay
Tieback Simulation Model Classes
Parameterization:
LEADLAG
Parameters:
VESSEL VESSEL
E01 AOUT LEADLAG AIN E01
PRESSURE PRESSURE
CONTROL
Parameterization:
MISCEQTN
Parameters:
The MISCEQTN equation syntax is identical to the Microsoft Excel application. The
following types of operations are supported:
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.
EQFF
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 zero’th
element of an DYNSIM vector point to be used for interpolation. The DYNSIM point
array elements must be in the following format
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
CINTRP1(237.,ETABLE[0])
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.
Tieback Simulation Model Classes
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.
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.
• 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.
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
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.
.*\. 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
Negated versions of these are also available. Refer to Regular Expression Basic
Syntax Reference.
a[123]b matches with a1b, a2b but not with abb or a11b.
a[\d]b matches with a1b, a2b, …, a9b but not with aab and abb.
a[\d]*b matches with a1b, a12b and a111b
• ^ immediately after [ has a different meaning. [^…] matches any single character
not between the square brackets.
ab{2}c matches with abbc and 123abbc456 but not with abbbc.
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.
After
Search Syntax Matches Replace Syntax Replacement
FI FIxy XT XTxy
abcFIxyFIde XT abcXTxyXTde
FI(.*) FIxy XT XT
FIxy XT$1 XTxy
abcFIxy XT abcXT
abcFIxy XT$1 abcXTxy
(.*)FI(.*) aFIxy XT$1 XTa
abcFIba $1XT$2 abcFIba
22_FI_xy XT$2 XT_xy
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.
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.
Model
name
Filter based Tag names to be bulk Search syntax to Tieback tag The corresponding tieback replace Generated
on configured ensure match replace syntax tags syntax model names
1B03_MW:FY5F01.OUT (.*):FY(.*)\.OUT $1:FI$2.MEAS1 1B03_MW:FI5F01.MEAS1 XV$2 XV5F01
1B03_MW:FY5F02.OUT 1B03_MW:FI5F02.MEAS1 XV5F02
Block
Names 1B03_MW:FY5F03.OUT 1B03_MW:FI5F03.MEAS1 XV5F03
1B04_MW:FY5F04.OUT 1B04_MW:FI5F04.MEAS1 XV5F04
1B05_MW:FY5F05.OUT 1B05_MW:FI5F05.MEAS1 XV5F05
Block +
1B03_MW:FY5F01.FBCO_3 1B03_MW:FY5F01.FBCIN_3 DIFY5F01_3
Parameter
Names
1B03_MW:FY5F02.FBCO_1 1B03_MW:FY5F02.FBCIN_1 DIFY5F02_1
Characters
\xFF where FF are 2 Matches the character with the specified \xA9 matches ©
hexadecimal digits ASCII/ANSI value, which depends on the when using the
code page used. Can be used in Latin-1 code page.
character classes.
Any character All characters except the listed special [abc] matches a, b
except ^-]\ add that characters. or c
character to the
possible matches for
the character class.
\ (backslash) followed A backslash escapes special characters [\^\]] matches ^
by any of ^-]\ to suppress their special meaning. or ]
Anchors
Word Boundaries
Character Description Example
\b Matches at the position between a word .\b matches c in
character (anything matched by \w) and a abc
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.
Alternation
Quantifiers
*? (lazy star) Repeats the previous item zero or more ".*?" matches
times. Lazy, so the engine first attempts "def" in abc
to skip the previous item, before trying "def" "ghi" jkl
permutations with ever increasing
matches of the preceding item.
+? (lazy plus) Repeats the previous item once or more. ".+?" matches
Lazy, so the engine first matches the "def" in abc
previous item only once, before trying "def" "ghi" jkl
permutations with ever increasing
matches of the preceding item.
{n} where n is an Repeats the previous item exactly n a{3} matches aaa
integer >= 1 times.
{n,m} where n >= 1 Repeats the previous item between n and a{2,4} matches
and m >= n m times. Greedy, so repeating m times is aa, aaa or aaaa
tried before reducing the repetition to n
times.
{n,m}? where n >= 1 Repeats the previous item between n and a{2,4}? matches
and m >= n m times. Lazy, so repeating n times is aaaa, aaa or aa
tried before increasing the repetition to m
times.
{n,} where n >= 1 Repeats the previous item at least n a{2,} matches
times. Greedy, so as many items as aaaaa in aaaaa
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.
{n,}? where n >= Repeats the previous item between n and a{2,}? matches aa
1 m times. Lazy, so the engine first matches in aaaaa
the previous item n times, before trying
permutations with ever increasing
matches of the preceding item.
Other Resources
• Books (several)
• Google® for .NET regular expressions
• Tools
o RegexCoach (http://www.weitz.de/regex-coach)
o RegexBuddy (http://www.regexbuddy.com)