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

Measurement and Control

Take theTedium out of Writing


Process
Descriptions
Setting up a special
function and a shorthand
system on a spreadsheet
can improve the descriptions
needed for implementing
a process control system,
while minimizing the
monotony in writing them.

P
Michael J. Gentilcore, rocess engineers often must write a detailed process descrip-
Mallinckrodt, Inc. tion to guide the programming of a process control system.
This description delineates the specific sequence of steps
needed to make a batch, or to startup, run, and shutdown a
continuous operation. It also typically specifies alarms, inter-
locks, and safety-shutdown conditions and sequences.
The task of writing a detailed process description usually is quite te-
dious. Formal tags are necessary for procurement and proper identification
of motors, valves, and instrumentation. These tags, however, are hardly fun
to write, type, or proofread — and don’t give a complete picture of the true
purpose of the particular device.
Consider the following short process description:
< Discuss This Article! > 1. Start AG-218.
To join an online discussion about this article 2. Open XV-215-23.
with the author and other readers, go to the 3. Confirm ZSC-215-23 is not made.
ProcessCity Discussion Room for CEP articles
4. Wait until TI-215-03 is greater than 70°C.
at www.processcity.com/cep.
5. Close XV-215-23.
This description minimizes work for the writer, but sacrifices clarity.
Was a tank heated with a utility fluid or by a chemical reaction? Was XV-
215-23 in its safe fail position at the end of the sequence? Was this really

CEP February 2001 www.aiche.org/cep/ 31


Measurement and Control

Table 1. Object Set Table 2. Verb Set for Valves

Shorthand Abbreviation Object Shorthand Abbreviation Verb

C Controllers O Open

D Discrete inputs ( i.e., switches) C Close

I Indicators ( i.e., continuous inputs) E Energize

M Motors D De-energize

V Valves N Name

the XV-215-23 valve or the XV- defining its name, and its arguments. space to highlight the basics of pro-
215-32 valve? Was there an open The goal is to write a sentence. gramming this function. Hopefully,
limit switch ZSO-215-23 that Remember the basic parts of a sen- your spreadsheet’s help menus can
should have been checked? The tence: subject, verb, and object. For supply additional explanation.
reader has no way of knowing. a process description, the subject The basic programming skills
Admittedly, this description always is “the computer control needed to write a SAY function are:
would make more sense with the system” and doesn’t need to be • Boolean, integer and string
relevant process and instrumenta- stated. So, our sentence reduces to: data types;
tion diagrams (P&IDs), plus a sym- verb, and object. But, which ob- • string (or text) functions, espe-
bol definition sheet. Even if the ject? We need to address a specific cially concatenation;
P&IDs were available, though, a object; therefore, let’s add an ad- • conditional and unconditional
reader would have to spend time to jective, and make our sentence: branching;
find each device mentioned in the “verb, specific, object.” • application object types, par-
description on the diagrams. A good name for our function is ticularly ranges; and
The description, of course, could WRITE. A better name is SAY, be- • calling functions.
be improved with additional, de- cause it has fewer letters. So, per- These allow programming an inter-
scriptive language — but this haps, the syntax of our function nal decision tree to return a sen-
means more work for the writer. could be SAY (Verb, Specific, Ob- tence via the SAY function. But,
So, how can we reduce the burden ject). While this syntax best illus- first, you need to establish a short-
on the writer and increase the clari- trates the intent of the function, I hand system for the words.
ty for the reader? Setting up a user- instead recommend SAY (Verb,
defined function in a spreadsheet is Object, Specific, OptionalText), The shorthand system
the answer. and will illustrate why. Creating such a system is pretty
I use Excel 97 as my spreadsheet simple. There are only two rules:
Creating software. Different versions of 1. Use a single letter for abbrevi-
a user-defined function Excel and other spreadsheet soft- ating a whole word or phrase.
Setting up the function starts with ware can implement the SAY func- 2. Don’t repeat a letter within a
understanding its basic goal, and tion. In this article, I only have set of objects, or a set of verbs.

Table 3. Verb Set for Motors Table 4. Verb Set for Indicators

Shorthand Abbreviation Verb Shorthand Abbreviation Verb

E Energize (Start)* S Sees (Test for "is" condition)

D De-energize (Stop)* A Alarm

N Name W Wait until

* As aTrekkee, I prefer to remember this as Engage and Disengage. N Name

32 www.aiche.org/cep/ February 2001 CEP


Table 5. Valve Table

Entry No. Prefix Suffix Valve Descriptive Name Fail Position Limit Switch Detail P&ID Reference

1 XV 705-12 RX-705 vent valve to vacuum pump VP-710 FC 3 030-100-006

2 XV 705-15 RX-705 vent valve to atmosphere FO 2 030-100-006

3 SV 710-03 Seal flush valve to vacuum pump VP-710 FC 4 P&ID 030-100-010


Reference

4 XV 725-03 Cooling water valve on condenser HE-725 FO 3 030-100-006


030-100-007

Note: FC = fail closed; FO = fail opened. Pink shaded area is named "Valves," and the tab sheet is named "Valves" .

First, develop a shorthand sys- This shorthand Table 6. Definition of Limit Switch Detail
tem for each of the objects, such as system also can be
controllers and valves, in a control used the old fash- Limit Switch Detail ZSC ZSO
system — fortunately, we need deal ioned way with a 1 Y Y
with only a limited number of these pencil and paper or
objects. Table 1 illustrates such a on a blackboard to 2 N Y
shorthand set, which, of course, can sketch out a se-
3 Y N
be easily expanded. quence of steps or a
Next, create a shorthand set of simple flowchart be- 4 N N
verbs associated with each object. fore actually gener-
Tables 2–4 show some verb sets for ating the final Note: ZSC = closed limit switch, ZSO = open limit switch;
Y = yes, N= no
different object types. spreadsheet docu-
Discrete inputs and outputs do ment. In this case,
not need the “optionaltext” argu- the previous examples could be writ- Don’t be stingy with informa-
ment. Continuous signals will use it ten: OV5, DM2, SI-4 35PSIG, and tion. Tables are easy to fill out, and
to pass a dimensioned number like WD-3. are independent of any control se-
35°C or 45 psig. Continuous sig- With the shorthand system in quence. The SAY function will do
nals also will require extra coding place and prior to programming the the work of delivering the informa-
for “less than” or “greater than.” SAY function, you now must orga- tion to the final process description.
This additional coding is easily nize the specific object information. You will save time in the long run
combined into the specific, with a Every specific object will need to by having a document that reduces
negative meaning “less than.” For have its own table in the spreadsheet. the need to relook at the P&IDs.
discrete inputs, the negative can It is best to devote a single sheet to In Table 5, the limit switch de-
mean “is not.” each. Table 5 shows an example for tail number determines if the valve
Let’s illustrate a few shorthand valves. Name the sheet after the ob- has open or close limit switches —
examples: ject, in this case, “Valves.” Also, the numbers are defined in Table 6.
Say (“O,” “V,” 5) name the range of the table contain-
Open Valve No. 5. ing the object information (the pink The SAY function
Say (“D,” “M,” 2) shaded area in Table 5). Here, we also If you have Excel 97, press the
(De-energize and) Stop Motor No. 2. use “Valves” as the range name. “ALT” and “F11” keys. Welcome to
Say (“S,” “I,” -4, “35 PSIG”) The table should include all avail- the Microsoft Visual Basic Editor.
(See that) Indicator No. 4 is less able information supplied on the Select “Insert a module.” Enter the
than 35 psig. P&ID. This includes the formal tag, code for the SAY function. Table 7
Say (“W,” ”D,” -3) fail position, and limit switch detail. details the code for the function,
Wait until Discrete Input No. 3 is Finally, add a descriptive name for which, in turn, calls specific object
not made. each device. functions for valves, motors, etc.

CEP February 2001 www.aiche.org/cep/ 33


Measurement and Control

The code for the valve function


appears in Table 8. This function il-
Table 7. Visual Basic Code Listing for SAY Function
lustrates the basic statements need-
ed to get information from the Function Say(Verb As String, Object As String, Specific As Integer, _
valve table and then use it to form a Optional AdditionalText As String) As String
sentence. The valve function also
employs the spreadsheet function 'Translate Specific into Positive Number and Logical Test Result
Dim WasNegative As Boolean
VLOOKUP. Most spreadsheet Select Case Specific
functions can be accessed in Visual Case Is < 0
Basic with the Application modifi- WasNegative = True
er. Other object functions are not Specific = -Specific
Case Is = 0
shown, but can be easily created Say = "SPECIFIC IS ZERO"
based on these examples. Exit Function
The SAY function maintains its Case Is > 0
simplicity by not requiring all in- WasNegative = False
End Select
formation to be passed as argu-
ments. When an argument is 'Translate all Verbs and Objects to Upper Case
changed, it will return a revised Verb = UCase(Verb)
sentence. When information in an Object = UCase( Object )
underlining table is changed, how- 'Make initial branch based on Object Type, which calls Object Function
ever, the SAY function will not If Object = "V" Then
know to automatically update its Say = Valve(Verb, Specific)
Elself Object = "M" Then
sentence. To deal with this draw- Say = Motor(Verb, Specific)
back, we need to slightly modify Elself Object = "D" Then
the function’s syntax to: Say (Verb, Say = DiscreteIn(Verb, Specific, WasNegative)
Object, Specific * UpdateCell, Op- Elself Object = "I" Then
Say = Indicator(Verb, Specific, WasNegative, AdditionalText)
tionalText). Elself Object = "C" Then
UpdateCell is a single cell in the Say = Controller(Verb, Specific, WasNegative, AdditionalText)
spreadsheet that will have the value Else:
of either 1 or 0. The writer will Say = "UNRECOGNIZED OBJECT TYPE"
End If
have to change the cell from 1 to 0
and back to force the SAY function End Function
to reread all table information. Up-
dateCell is best given a range
name.
The spreadsheet then should be
organized to produce a process de- date, D5) — thus automatically ments in the description, such as
scription in a uniform format. reading the arguments in Columns for Rows 4–7 and 14–17 in Table 9.
Table 9 illustrates a convenient A–D for Row 5. Rows are easily inserted and
layout in which Columns A–D are Cell F1 is where the writer can deleted in a spreadsheet. So, as the
devoted to the arguments of the enter 0 or 1. Cell D1 is the Update number of rows is modified, it is a
SAY function. Column E provides Cell and contains the formula: =IF great convenience to be able to have
a step number, Column F a place (F1=1,1,0). The name “update” also all the steps renumber. The follow-
to enter a logic statement (If, must be defined for cell D1. The ing formula entered in cell E3 will
While, Then, EndIf, And, Or, formula prevents the specific from automatically renumber itself:
etc.), and Column G a single step being multiplied by a number other =MAX (INDIRECT (“$E$2:E”&
description. than 0 or 1. (CELL (“row”, E3)-1), TRUE))+1
Establishing a uniform format You, of course, can enter text It can be copied and pasted into
allows the SAY function to be rather than the SAY function in other cells in column E, providing a
copied and pasted rather than Column G, such as was done in step number that automatically
typed. For example, the formula in Row 3 and Rows 8–13, which do renumbers when rows are inserted
cell G4 in Table 9 is =say (A4, not have entries generated by the or deleted.
B4, C4*Update, D4). When SAY function. For a typical process To complement the automatic
copied and pasted to cell G5, it description, however, the function renumbering of steps, also use a
becomes =say (A5, B5, C5*Up- will provide the bulk of the state- formula to reference steps. For ex-

34 www.aiche.org/cep/ February 2001 CEP


ample, in cell G9, the formula is
= “Proceed to Step” & E14.
Table 8. Visual Basic Code Listing for Valve Function
Advanced features
Function Valve(Verb As String, Specific As Interger) As String
Dim Valves As Range
This article has outlined all the
Set Valves = Worksheets("Valves").Range("Valves") fundamentals for creating your own
If Specific> Valves.Rows.Count Then shorthand system and user-defined
Valve = "SPECIFIC OUTSIDE OF RANGE" SAY function. You need to exercise
Exit Function
End If
some judgment as to how much the
'Get All Valve Information from Table SAY function is expected to do.
Dim Prefix As String After all, you can always type text.
Dim Suffix As String Once your SAY function is up
Dim ValveName As String
Dim FailPosition As String
and running, consider learning
Dim LimitSwitch As Integer some more-advanced features of
Prefix = Application.VLookup(Specific,Valves, 2, False) the spreadsheet and Visual Basic.
Suffix = Application.VLookup(Specific,Valves, 3, False) Online articles are available from
ValveName = Application.VLookup(Specific,Valves, 4, False)
FailPosition = Application.VLookup(Specific,Valves, 5, False)
Microsoft (www.microsoft.com),
LimitSwitch = Application.VLookup(Specific,Valves, 6, False) and many books (e.g., Refs. 1 and
'Assemble Formal Name with Tag 2) provide guidance. These features
Dim FormalName As String can turn your process description
FormalName = ValveName & "(" & Prefix & "-"& Suffix & _
")[" & FailPosition & "-" & LimitSwitch & "]"
writer into a specialized spread-
If Verb = "N" Then sheet application, with a general
Valve = FormalName user interface.
Exit Function Some of these features include:
End If
'Translate Energize/Deenergize to Open/Close
• writing macros, for instance, to
If Verb = "E" And FailPosition = "FC" Then Verb = "O" create a properly formatted sheet
If Verb = "E" And FailPosition = "FO" Then Verb = "C" with standard column widths, or in-
If Verb = "D" And FailPosition = "FC" Then Verb = "C" sert a “standard” row with the step
If Verb = "D" And FailPosition = "FO" Then Verb = "O"
'Now open or close the valve
numbering formula and the SAY
If Verb = "O" Then function, or update the spreadsheet;
'Determine Limit Switch Confirmation • producing a new customized
Select Case LimitSwitch toolbar that runs the macros;
Case Is = 1, 2
Confirm = ", and confirm ZSO-" & Suffix & " is made"
• using custom user forms to
Case Is = 3 create drop-down menus of the
Confirm = ", and confirm ZSC-" & Suffix & " is not made" shorthand system;
Case Is = 4 • saving your SAY function as a
Confirm = ""
Case Else
.xla file, making an Excel add-in;
Confirm = "UNRECOGNIZED LIMIT SWITCH DETAIL" and
End Select • password-protecting the Visual
Valve = "Open" & FormalName & Confirm Basic code.
Exit Function
Elself Verb = "C" Then
'Determine Limit Switch Confirmation Final thoughts
Select Case LimitSwitch Investing some programming ef-
Case Is = 1, 3 fort to write a SAY function can
Confirm = ", and confirm ZSC-" & Suffix & " is made"
Case Is = 2
save time for the process descrip-
Confirm = ", and confirm ZSO-" & Suffix & " is not made" tion writer, the typist, the proof-
Case Is = 4 reader, and all reviewers of the pro-
Confirm = "" cess descriptions.
Case Else
Confirm = "UNRECOGNIZED LIMIT SWITCH DETAIL"
The SAY function changes the
End Select use of your computer from a word
Valve = "Close" & FormalName & Confirm processor to an information proces-
Exit Function sor. Many repetitive decisions no
End If
Valve = "UNRECOGNIZED VERB FOR VALVE OBJECT"
longer burden the writer of the pro-
End Function cess description, but are imbedded
in the internal decision tree of the

CEP February 2001 www.aiche.org/cep/ 35


Measurement and Control

Table 9. Spreadsheet Example of Process Description

A B C D E F G

1 Update 1 1 Change cell to 0 and 1 to update

2 Verb Object Specific Extra Step No. Logical Description

3 1 Prior to starting, all valves are de-energized.


P&ID Reference

4 d v 1 Close RX-705 vent valve to vacuum pump VP-710030-100-006


(XV-705-12)[FC-3], and confirm ZSC-705-12 is made.

5 d v 2 Open RX-705 vent valve to atmosphere (XV-705-15)


[FO-2], and confirm ZSO-705-15 is made.

6 d v 3 Close seal flush valve to vacuum pump VP-710


(SV-710-03)[FC-4].

7 d v 4 Open cooling water valve on condenser HE-725


(XV-725-03)[FO-3], and confirm ZSC-725-03 is made.

8 2 IF The EVACUATE button is pressed.

9 3 THEN Proceed to Step 7.

10 4 ELSEIF The BYPASS button is pressed.

11 5 THEN Proceed to Step 12.

12 6 ELSE Do not proceed.

13 ENDIF

14 o v 1 7 Open RX-705 vent valve to vacuum pump VP-710


(XV-705-12)[FC-3], and confirm ZSC-705-12 is not made.

15 c v 2 8 Close RX-705 vent valve to atmosphere (XV-705-15)[FO-2]


and confirm ZSO-705-15 is not made.

16 e m 2 9 Start vacuum pump VP-710, and confirm AUX contact is made.

17 w i -2 35 C 10 Wait until RX-705 pot temperature (TI-705-02) is less than 35˚C.

function. Therefore, the writer can


better focus on the true content of
the document, no longer mind-
Literature Cited M. J. GENTILCORE is an engineering
consultant at Mallinckrodt, Inc. (recently
numbed from repetitive details. 1. Person, R., “Using EXCEL for Win- acquired by Tyco International), St. Louis
Thanks to your own customized dows ‘95,” Que, Carmel, IN (1995). ((314) 654–4031; Fax: (314) 654–7174;
2. “Programmer’s Guide, Microsoft Visual E-mail: Mike.Gentilcore@mkg.com). He
SAY function, your process de- presently is working in the firm’s
Basic,” Microsoft, Redmond, WA (1993).
scriptions will be: Imaging Products Development Center.
• quicker to generate; He has 25 years of experience in design,
• more understandable; research and development, and
Related Web Sites manufacturing. Holder of several
• consistent in both wording and patents, he received a BS in chemical
www.microsoft.com — for information on ad-
style; engineering from Clarkson University,
vanced features of Excel and Visual Basic.
• easy to update; and www.isawriter.net—information on interac-
and an MS in engineering management
• compliant with your company’s from the University of Missouri - Rolla.
tive process-description-writer software He is a member of AIChE, and a licensed
instrumentation standards. CEP
by the author. Professional Engineer in Missouri.

36 www.aiche.org/cep/ February 2001 CEP

You might also like