Smartplant Instrumentation 2007: Using Rule Manager

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

SmartPlant Instrumentation 2007

Using Rule Manager

Intergraph 2007 Training Workshop


May 21, 2007
© 2007 Intergraph Corporation. All rights reserved.

The content of this document is proprietary work of Intergraph Corporation, or relevant third parties, and is
protected by copyright law and international treaty. Any use, duplication, distribution or disclosure of such,
other than as specified herein, is unauthorized and in violation of applicable copyright law and international
treaty. All rights in content or materials bearing copyright notice or other attribution of third party rights are
reserved to the relevant third party. United States Government license rights are limited to those mandatory
rights identified in DFARS 252.227-7015(b).

Intergraph may make improvements and/or changes in the products and/or the programs described in this
publication at any time without notice.

Any content or materials supplied hereunder are provided "as is", without warranty of any kind, either
expressed or implied, including, but not limited to, any implied warranties of merchantability, fitness for a
particular purpose, or against infringement. In no event shall Intergraph be liable for any damages arising
out of, or in connection with the downloading, viewing, use, duplication, distribution or disclosure of any
content or material published by Intergraph, including but not limited to any direct, indirect, incidental,
special, punitive or consequential damages, or loss or corruption of data.

Some jurisdictions do not allow the exclusions or limitations set forth above, so the above may not apply to
you. The exclusions or limitations shall apply in all jurisdictions to the maximum extent allowed by law.

Intergraph Corporation

P.O.Box240000
Huntsville, AL 35813

Phone:+1.256.730.2000
TollFreeUSA:+1.800.345.4856
Fax: +256.730.2048
Contents

Contents

SmartPlant Instrumentation 2007 Rule Manager Overview...................................................................... 5

Scope........................................................................................................................................................................................ 5

Rule Application ........................................................................................................................................................................ 6

Rule Level – Custom rules vs. System rules ............................................................................................................................ 6

Rule Types................................................................................................................................................................................ 6

Rule Components ..................................................................................................................................................................... 7

Rule Priority & Status................................................................................................................................................................ 7

Consistency .............................................................................................................................................................................. 8

Functions ................................................................................................................................................................................ 10

Rule Execution........................................................................................................................................................................ 10

Rule Solutions......................................................................................................................................................................... 11

Limitations and Cases............................................................................................................................................................. 11

Rule Manager Coverage ................................................................................................................................................. 11

Rules that Relate to Plant Groups................................................................................................................................... 11

Boolean Properties as Selected Values.......................................................................................................................... 12

Special Cases ......................................................................................................................................................................... 12

Rules that Apply to Specification Sheets and Process Data........................................................................................... 12

Rules that Relate to Wiring ............................................................................................................................................. 12

Rule Manager Basics................................................................................................................................. 13

Task 1 – Set Domain for Rule Manager Usage ...................................................................................................................... 13

Task 2 – Open Rule Manager................................................................................................................................................. 14

Task 3 – Rule Manager Tools................................................................................................................................................. 15

Task 4 – Review System Rules .............................................................................................................................................. 17

May 21, 2007 3


Contents
Create New Rules ...................................................................................................................................... 22

Task 1 – Create Single Component Rule (Check Data) ......................................................................................................... 22

Task 2 – Create a GUI Rule (Control Graphic Interface) ........................................................................................................ 27

Task 3 – Create a Relation Rule (Consistency & Copy) ......................................................................................................... 30

Task 4 – Additional Exercises................................................................................................................................................. 32

Notes........................................................................................................................................................... 33

May 21, 2007 4


Index

SmartPlant Instrumentation 2007 Rule Manager Overview

SmartPlant Instrumentation release V.2007 introduces a new tool for SPI users – the Rule Manager. With
the introduction of the rule manager, SPI becomes more consistent with other SmartPlant applications
which already use a rule manager, i.e. SmartPlant P&ID & SmartPlant Electrical.

There are many advantages for the rule manager. It can:


 Be used to validate data entry and inform the user in case of an inconsistency
 Copy/Propagate data from one property to another and in between objects
 Disable properties based on filters
 Reduce development time (system rules)

As such, users will appreciate the added value of the rule manager since it will provide the means to
overcome many of the software requirements which so far were not provided.

Scope
Rules are defined at domain level and are shared by all plants and plant-projects.

Users should be aware that the rule manager does not differentiate between custom properties (UDF's) in
one plant and custom properties in another plant unless the plant name is used within the filter. If not
defined correctly in a domain with multiple plants, rules that are valid for one plant may be executed on
another.

There is no special access right for the rule manager. Instead, the Rule Manager component can be
omitted from being installed on a client machine so only the required personnel will have access to it.

The Rule Manager uses the new Data Dictionary which is incorporated into this release to read tables,
properties and available relationships.

The following components in SPI use the Data Dictionary:


 Explorers in SPI (Domain and Reference) for Find, Filter and Sort functions.
 ESL and CAD macros for Wiring and Hook-Up reports.

At this stage, rules cannot be exported or imported. This feature will be added in the future. As a
workaround, a seed database can be used to initialize new domains.

May 21, 2007 5


Index

Rule Application
Rules apply during:
 Normal work with the software
 Import of data. In this case, the import will not cease the process but will log the inconsistencies
in a log file.

Rules do not apply:


 When using the Merger utility
 During claim or merge
 When a rule(s) is/are disabled explicitly in the rule manager
 When the rule manager feature is disabled by domain administrator. In this case, only the system
rules will be active.

Rule Level – Custom rules vs. System rules


 System rules are shipped rules which cannot be modified and will always be active. SPI uses
these rules to reduce the amount of code, mainly for data validation for the purpose of interfacing
with other products.
 Custom rules are user rules. Such rules can be managed by an administrator.

Rule Types
There are three types of rules;
1. Control graphic interface (GUI Rules) - This type of rule provides the ability to disable a
property (or properties) from being available in forms and dialogs. Such rule can be conditional,
based on a certain filter or not. This rule type enforces the consistency type to "Disabled". These
rules will not work when working in the browser module.

2. Single Component (Check data) – This type of rule enables to validate the content of a property
(or properties) for the defined set of conditions.

3. Consistency & Copy (Relation Rules) - A consistency rule can be created as a rule that can
copy data from one property to another. This type is very powerful since it enables the user to
propagate data from one property to another or from one object to another. If a copy operation
pertains to multiple items data will be copied to all.

May 21, 2007 6


Index

Rule Components

When defining a rule the user selects the component or components that the rule will act upon.
 Single Component - If the rule pertains only to one type of object, a single component selection
is required, for example: Instrument, Panel, strip etc. In this case, the Single component check-
box should be selected.

 Two Components - If the rule acts or should validate data of an object (or its properties) which is
associated or depending on the contents of a property in another related item, user is required to
select two components. In such rule, the filter and consistency definitions can act on each of the
components.
Due to the fact that such rules are "directional", it is highly recommended that Component1 will
represent the object on which the rule actually acts on where Component2 represent the related
item. For example: if the rule should validate the content of the tag service against the loop
service when the tag service is changed, then Component1= Instrument and Component2 should
be the Instrument.Loop.

If required to validate the opposite situation (when changing the loop service), an additional rule
should be created where item1 is the loop and Item2 is the Instrument.Loop.

 Multi-Component - A rule may apply on multiple items. For example, in above example where
the consistency is between the loop (as Item1) and the Instrument (as Item2), the resolution of
the inconsistency will list every tag in the loop which the service is different from that of the loop's.

Rule Priority & Status


Rules are prioritized by assigning a priority to each. When SPI executes the validations, it starts checking
from the highest priority to the lowest one. Once a rule is not met, it will cease checking the rest of the
rules and perform the required action defined by the "Status".
 Error - reject the operation.
 Warning - warn the user about the inconsistency. When a rule is violated the software opens a
dialog reporting about the inconsistency. The users can approve the inconsistency or copy the
data to the target item.
 Log – register the inconsistency in a log file.

System rules are always checked. Rules which are defined as inconsistency "Error" are checked first.

May 21, 2007 7


Index

Consistency
The essence of the consistency check is driven by the compare function between the two parts of the
consistency definition.

The compare has the following options:

Compare
Function Description
Function

The first part of the consistency is smaller than


< Less than the second part of the consistency. This
compare also applies to strings.

The first part of the consistency is smaller or


<= Less than or equal to equal to the second part of the consistency. This
compare also applies to strings.

<> Different/Not equal The two parts of the consistency are different

= Equal The two parts of the consistency are equal.

The first part of the consistency is greater than


> Greater than the second part of the consistency. This
compare also applies to strings.

The first part of the consistency is greater than


>= Greater than or equal to or equal to the second part of the consistency.
This compare also applies to strings.

Empty Empty No data. May refer to Null.

Even Even The selected property value is even.

Odd Odd The selected property value is odd.

The selected property value is unique. With the


uniqueness rule it is required to select the
Unique Unique
property (of operand 2) for the uniqueness to be
validated for (such as panel, loop, domain etc).

May 21, 2007 8


Index

There are three consistency types;


1. Consistency – enables to define the constraint between properties or between a property and its
value. If the rule is between two components, these properties may belong to the two
components (example: instrument service and the loop service.
2. Copy & Consistency – This consistency enables to propagate values from one property to
another. The value that is copied can be a property in the same object (example: a user defined
field), a property in a related item or a constant value that you want to enforce.

a. When using a copy status function in a consistency:

i. The "Status" property is not available.

ii. The Compare property is forced to Equal (=) function.

Compare
Function Description
Function

The right (source) property or value will be


< Copy Item2 to Item1 if Null copied to the left (target) property only if the left
property is null.

The right (source) property or value will be


<= Copy Item2 to Item1 copied to the left (target) property even if this
property has a value.

A modification in any of the properties (left or


<=> Copy Bidirectional
right) will copy the value to the paired property.

A modification in any of the properties (left or


<> Copy Bidirectional if null right) will be copied to the paired property only if
that property is null.

The left (source) property or value will be copied


=> Copy Item1 to Item2 to the right (target) property even if this property
has a value.

The left (source) property or value will be copied


> Copy Item1 to Item2 if Null to the right (target) property only if this property
is null.

3. Disabled – This type is enforced when the rule is defined as "Control graphic interface". The
selected property will be disabled in the user interface.

May 21, 2007 9


Index

Functions

Consistency definition supports common functions:

Function Description

Length Returns the length in a string or a property value.

Lower Converts a string value to lowercase letters

Returns a string without spaces (including internal spaces). For


No Spaces
example “FT -100”will convert to “”FT-100

Returns the substring of a property value. Requires the definition


Substring
of the Start character and Length in adjacent columns.

Returns the actual string without the spaces at the beginning and
Trim
the end of the value.

Upper Converts a string value to uppercase letters.

Functions are available for the operand1 and operand2.

Rule Execution

Rules are addressed by the software in the following methods:

1. On existing or modified items, rules which should warn or log inconsistencies are checked (or
triggered) just before saving the data, provided there has been a change in the corresponding
property values.
2. When a new item is added and the rule is defined as a warning, all properties are checked during
the data saving.
3. Rules which are defined as error are always executed, including when a new item is created.

May 21, 2007 10


Index

Rule Solutions
When a rule is defined with a Warning status, once the rule is activated due to an inconsistency, a dialog
will pop up with the inconsistency. Each inconsistency has a Solution column that enables to pick the
action to take.

Actions available are:


 Approve inconsistency
 Copy data from Item2 to Item1
 Copy data from Item1 to Item2

Item1 and Item2 refer to Cmponent1 and Cmponent2 respectively in the case of relationship rule.

If the rule is a Single component rule the copy refers to the two selected properties containing the
consistency or the property and a constant value which was defined by the user.

A consistency rule where it’s status was defined as Error will not provide a copy solution. The software
will reject the change.

Limitations and Cases

Rule Manager Coverage


The rule manager is using a new technology to enhance and broaden the capabilities and data
consistency of SPI. As such, it may be used to enforce basic rules on items or between items. Due to its
strong dependency in the data dictionary it may only be able to cope with rules pertaining to items and
relationships which are fully and correctly defined in the data dictionary and which have been foreseen as
required. As more demand and experience is gained by SPI users, the rule manager may be enhanced
even further to overcome design and engineering requirements which could not be given a proper
solution previously.

Rules that Relate to Plant Groups

Rules are defined per domain.

It is possible to limit a rule to be applied on specific plant hierarchy. In this respect, a filter should be used
that limits the rule. Such a filter can make use of the following properties:
 Highest Plant Group
 Intermediate Plant Group
 Lowest Plant Group
Each of the listed properties will provide a pick list for their values.
nd
When a plant structure has more than three levels, the intermediate level will always refer to the 2
lowest level.

May 21, 2007 11


Index

Boolean Properties as Selected Values


There are certain properties in SPI which appear as check-boxes in the user interface. The rule manager
does not always support these properties as pick-lists. Instead, the correct string may need to be used in
the rule manager in order to be valid for filters and consistency.

Example: Panel has an "Intrinsic Safety" property which its values may be either "T" or "F".

The SmartPlant Instrumentation documentation should indicate the dialogs and properties which need
special care.

Special Cases

Rules that Apply to Specification Sheets and Process Data

In order to create a rule on a spec, it is required to create the rule between the main object (Instrument for
example) and the specification item.

For instrument, Item2 is "Instrument.SpecGoverningCase"

In a similar manner, rules for the process data relate to "Instrument.ProcessDataGoverningCase"


*****Only governing cases are applicable.

Rules that Relate to Wiring

Due to the high degree of flexibility in the wiring module, there are many wiring object types for which
rules may be applied. SPI includes a various number of system rules, most of them related to wiring.
Users are encouraged to make use of this capability in order to apply engineering practices.

May 21, 2007 12


Index

Rule Manager Basics

Task 1 – Set Domain for Rule Manager Usage


4. Open SPI2007 Administration Module as System Administrator.
5. Open the Domain Definition screen.

6. Check the Rule Manager option from the Domain Features.


7. Save the changes and close the System Administration Session.

May 21, 2007 13


Index

Task 2 – Open Rule Manager

1. Open Rule Manager.

a. Open Windows Explorer. Navigate to the \Program Files\SmartPlant\Instrumentation folder.

Find and launch SPIRuleManager.exe . Log in using the DBA/DBA username and password
then select Demo in the Domain list. A sample list of Rule Folders and Rules will open.
OR

b. Start> Programs >SmartPlant Instrumentation >Rule Manager.

2. Log in as DBA/DBA user name and password.

3. Select Demo.

May 21, 2007 14


Index

Task 3 – Rule Manager Tools


Rule Manager Tools are available from pulldown menus, the main toolbar and as right click fly-out menus.

1. File Menu Pulldown

a. Save - Saves the Rule to the Rules database.

b. Expand All – Expands all folders in the tree view.

c. Collapse All – Collapses all folders in the tree view.

d. Exit – Quits the Rule Manager without saving.

2. Edit Menu Pulldown

a. Cut – Allows a rule to be cut from a folder to the Clipboard. It will remain on the Clipboard
until another rule is cut or copy another rule onto it.

b. Copy – Copies an entity (Rule or Folder) to the Clipboard for immediate Paste.

c. Paste – Pastes an entity (Rule or Folder) from the Clipboard to the target location.

May 21, 2007 15


Index

d. Delete – Deletes the selected entity (Rule or Folder). System Rules/Folders cannot be
deleted.
e. Rename – Renames the selected entity (Rule or Folder). F2 or clicking directly on a rule will
also access this command.

f. Add Folder – Folders can be added to any sub-folder of the Rule List folder.

g. Add Rule – Adds a Rule to the selected folder/location.

h. Properties - Opens the Rule property dialog. System Rule properties can be viewed only.

3. Help Menu Pulldown

a. Help – Also can be accessed with F1.


b. About – Version & System information can be found here. This information may be requested
by support for troubleshooting purposes.

May 21, 2007 16


Index

Task 4 – Review System Rules


System Rules are delivered with the software. They are not editable nor can they be deleted. In this task
we will examine the System Rule for unique names on a CS3000 controller and test it in the SPI2007
GUI.

1. Expand the Interfaces>Consistency folder. Highlight the Rule Controller is Unique for Domain.

2. Right click and select Properties.

May 21, 2007 17


Index

3. The Rule type is System.

4. Open the Consistency tab and extend the dialog box with the icon at the top right corner.

5. Notice the Compare is set to Unique meaning the controllers must have unique names. As a test
Open SPI2007 and create several controllers with the same name. You will receive an error
message indicating that it is not permitted.

6. Open SPI2007.

May 21, 2007 18


Index

7. Open the Domain Explorer, drill to the DCS Panels folder, expand 101-DCS-001 to the File
Number 1 Slot 1 Properties screen.

8. Create 3 new controllers. A1, A2 and A1 again. Click OK. See the error message generated by
the Rule Manager.

May 21, 2007 19


Index

9. Click Reject Operation to return to the Controller Properties dialog. At this point you cannot save
any of the newly created data in this window. You must Cancel and select No when asked to
save.

May 21, 2007 20


Index

10. Since no rule exists for a Junction Box the user will be able to create a new JB with the name JB-
1 and only get a warning from SPI code (not the Rule Manager) and will be able to continue.

May 21, 2007 21


Index

Create New Rules


This section of the class will walk the user through a basic creation of each type of Rule.

Task 1 – Create Single Component Rule (Check Data)


This exercise the user will create a new rule restricting Flow Transmitters to Rosemount as a
manufacturer. The new rule will then be tested in SPI2007.

1. Open Rule Manager.

2. In the Instrument Index folder, under the Consistency folder create a new Rule. Right click on the
folder and select Add Rule. (or Edit>Add Rule)

May 21, 2007 22


Index

3. The Rule name will be FT with Mfr=Rosemount only.

4. Set the Rule action to Check data.

May 21, 2007 23


Index

5. On the Rule Components tab, for Component1, click the ellipsis and select Instrument.

6. Check on the Single Instrument box.

7. Click OK.

8. Click on the Consistency tab and fill in the data as follows:

May 21, 2007 24


Index

9. Click OK.
10. File > Save
11. Open SPI2007.
12. Create New Loop 101-F-600 and Tag 101-FT-600.
13. Click OK to accept the default properties. (Manufacturer is blank)
14. You will NOT get a warning about the blank Manufacturer field not matching the Rule.
15. Go back to the instrument Properties, change the manufacturer to Foxboro and click Apply. The
Rule Manager dialog box will appear.

16. Approve the inconsistency by clicking on Accept Solutions. The tag will now be allowed to use
Foxboro as a manufacturer.

17. Create Instrument 101-FT-600A. Use Foxboro as the manufacturer. Click Apply.

May 21, 2007 25


Index

18. Change the Solution by using the dropdown. Select Copy data from item2 to item1.
Item 2 = Operand 2 Value (Rosemount), Item 1 = Current Tag’s Manufacturer

19. Click Accept Solutions.

20. Click OK on the Tag Properties. (Note: the manufacturer will not have changed at this point.)

21. Reopen the Tag Properties screen and see Rosemount is now the manufacturer.

May 21, 2007 26


Index

Task 2 – Create a GUI Rule (Control Graphic Interface)


This exercise will walk the user through creation of a new rule restricting access to the Manufacturer and
Model fields in the Instrument Index Module. The rule will then be tested in SPI2007.
1. Open Rule Manager.
2. Open the Instrument Index folder and select the Disable Properties folder.
3. Select Add Rule to create a new rule named Disable access to Manufacturer & Model field for
Tag.

4. Select the Control graphic interface radio button.

May 21, 2007 27


Index

5. Click the Rule Components tab. Set the Item type to Instrument and Check on Single component.

6. Click the Consistency tab. Set Operand1 to Instrument and select Instrument Manufacturer as the
Property.

May 21, 2007 28


Index

7. In the second row Set Operand1 to Instrument and select Instrument Model as the Property.
8. Click OK.
9. Save the changes in the Rule Manager.
10. Close the Rule Manager.
11. Open SmartPlant Instrumentation 2007.
12. Open the Properties Screen for 101-FT-600. The Manufacturer and Model fields are now disabled
noted by the gray highlight.

13. Note: The Manufacturer and Model information can still be changed in the Specification sheet as
well as in the Instrument Index Browser. Create Rules in the respective Modules to disable
Manufacturer and Model from those Modules.

May 21, 2007 29


Index

Task 3 – Create a Relation Rule (Consistency & Copy)


This exercise will walk the user through creation of a new rule forcing the Tag Service to the Loop. The
rule will then be tested in SPI2007.

1. Open Rule Manager.


2. Add a Rule to The Instrument Index>Consistency folder. Name it Copy Tag Service to Loop
Service.
3. Select the Check data radio button under the Rule Action section.

May 21, 2007 30


Index

4. Click the Rule Components tab. Select Instrument and Instrument – Loop.

5. Click the Consistency tab as follows;


a. Operand1 = Instrument
b. Property = Instrument Service
c. Copy = Copy Item 1 to Item 2
d. Compare = ‘=’
e. Operand2 = Instrument- Loop
f. Property Value = Loop Service

May 21, 2007 31


Index

6. Save the Rule and Close the Rule Manager.


7. Open SmartPlant Instrumentation 2007.
8. Create new Tag 101-PT-700.
9. Uncheck Apply Service to Tags in the Loop properties dialog box. Enter the Loop Service
Pressure for Loop P-700.
10. Enter Tag Service - Pressure for Tag PT-700. Click OK.
11. Open the Loop Properties. Notice the new Service.

Task 4 – Additional Exercises

Restrict special characters from Tag Names.

Auto-populate Cable End Description 1 & 2.

May 21, 2007 32


Index

Notes

May 21, 2007 33

You might also like