edeneqp
TRANSCRIPT
-
PDS Eden Interface Reference Guide - Volume 2: Equipment Document Number Version Date Pages DPDS3-PB-200041A PDS 7.3 October 2004 1-306 DPDS3-PB-200041B PDS 8.0 SE November 2005 Cover/Notice DPDS3-PB-200041C PDS 8.0 SE March 2007 307-312
-
Copyright Copyright 1984-2007 Intergraph Corporation. All Rights Reserved.
Including software, file formats, and audiovisual displays; may be used pursuant to applicable software license agreement; contains confidential and proprietary information of Intergraph and/or third parties which is protected by copyright law, trade secret law, and international treaty, and may not be provided or otherwise made available without proper authorization.
Restricted Rights Legend Use, duplication, or disclosure by the government is subject to restrictions as set forth below. For civilian agencies: This was developed at private expense and is restricted computer software submitted with restricted rights in accordance with subparagraphs (a) through (d) of the Commercial Computer Software - Restricted Rights clause at 52.227-19 of the Federal Acquisition Regulations (FAR) and its successors, and is unpublished and all rights are reserved under the copyright laws of the United States. For units of the Department of Defense (DoD): This is commercial computer software as defined at DFARS 252.227-7014 and the rights of the Government are as specified at DFARS 227.7202-3.
Unpublished rights reserved under the copyright laws of the United States.
Intergraph Corporation Huntsville, Alabama 35894-0001
Warranties and Liabilities All warranties given by Intergraph Corporation about equipment or software are set forth in your purchase contract, and nothing stated in, or implied by, this document or its contents shall be considered or deemed a modification or amendment of such warranties. Intergraph believes the information in this publication is accurate as of its publication date.
The information and the software discussed in this document are subject to change without notice and are subject to applicable technical product descriptions. Intergraph Corporation is not responsible for any error that may appear in this document.
The software discussed in this document is furnished under a license and may be used or copied only in accordance with the terms of this license.
No responsibility is assumed by Intergraph for the use or reliability of software on equipment that is not supplied by Intergraph or its affiliated companies. THE USER OF THE SOFTWARE IS EXPECTED TO MAKE THE FINAL EVALUATION AS TO THE USEFULNESS OF THE SOFTWARE IN HIS OWN ENVIRONMENT.
Trademarks Intergraph, the Intergraph logo, PDS, SmartPlant, SmartSketch, FrameWorks, INtools, MARIAN, ISOGEN, and IntelliShip are registered trademarks and SupportModeler and SupportManager are trademarks of Intergraph Corporation. Microsoft and Windows are registered trademarks of Microsoft Corporation. MicroStation is a registered trademark of Bentley Systems, Inc. Other brands and product names are trademarks of their respective owners.
-
If You Need Assistance________________
If You Need Assistance
Intergraph Online
Our web site brings you fast, convenient, up-to-the-minute information about Intergraphsproducts, services, and direction. Our web address is: http://www.intergraph.com.
Support
For the lasest Support Services information, use a World Wide Web browser to connect tohttp://www.intergraph.com/ppo/services/support.asp.
If you are outside of the United States, please call your local Intergraph office. The most up-to-date list of international offices and distributors is available on the web athttp://www.intergraph.com.
Intergraph Directory
The following numbers are only valid in the United States unless otherwise indicated. If youare outside the United States, please call your local Intergraph office.
Intergraph General Information
All countries 1-256-730-2000
Training Registration
1-800-766-7701 (U.S. Only)
1-256-730-5400 (Outside the U.S.)
Mailing Address
Intergraph Process, Power & Offshore300 Intergraph WayMadison, Alabama 35758U.S.A.
You can also reach us by electronic mail at [email protected].
3
-
________________
Documentation Contacts
We are constantly working on updates and improvements to the documents and othereducational media. If you have any suggestions on where we can improve the documentationor where you think more information is needed, let us know. You can reach us by:
Mail Intergraph Process, Power & OffshoreDocumentation Manager300 Intergraph WayMadison, AL 35758
4
-
Table of Contents________________
Table of Contents
If You Need Assistance ........................................................................................................ 3Intergraph Directory ............................................................................................................. 3
General Conventions .................................................................................................................... 11
Keyboard Conventions ......................................................................................................... 12Terminology ......................................................................................................................... 13
1. The Eden Basics ........................................................................................................................... 15
Equipment Symbol Processor ...................................................................................................... 16Tutorial Definition Table ............................................................................................................. 20Forms Interface ............................................................................................................................ 25
2. Eden Language Structure ............................................................................................................. 27
Beginning Statements .................................................................................................................. 28Ending Statements ....................................................................................................................... 28
Begin ..................................................................................................................................... 29Begin EQP Category ............................................................................................................. 31
Variables ...................................................................................................................................... 33Common Keywords ..................................................................................................................... 39Comments .................................................................................................................................... 41Operators ...................................................................................................................................... 42Expressions .................................................................................................................................. 44Functions ...................................................................................................................................... 47Primitives ..................................................................................................................................... 48
Convert NPD to Subunits ..................................................................................................... 48Define Active Orientation ..................................................................................................... 49Draw Cone ............................................................................................................................ 51Draw Cylinder ...................................................................................................................... 52Draw Eccentric Cone ............................................................................................................ 53Draw Projected Rectangle .................................................................................................... 54Draw Projected Triangle ....................................................................................................... 56Draw Semi-Ellipsoid ............................................................................................................ 58Draw Sphere ......................................................................................................................... 59Draw Torus ........................................................................................................................... 60Abort ..................................................................................................................................... 62Convert Unit ......................................................................................................................... 63Define Active Point .............................................................................................................. 64Define Datum Point .............................................................................................................. 65Define Library ....................................................................................................................... 66
5
-
PDS Eden for Equipment - April 2002________________
Define Nozzle ....................................................................................................................... 68Define Orientation By Points ................................................................................................ 70Define Placepoint .................................................................................................................. 71Define Point .......................................................................................................................... 72Display Message ................................................................................................................... 73Display Tutorial .................................................................................................................... 74Draw Arc ............................................................................................................................... 76Draw Complex Surface ......................................................................................................... 77Draw Con Prism ................................................................................................................... 80Draw Curve ........................................................................................................................... 81Draw Ecc Prism .................................................................................................................... 82Draw Ecc Transitional Element ............................................................................................ 84Draw Ellipse ......................................................................................................................... 85Draw Line ............................................................................................................................. 86Draw Line String .................................................................................................................. 87Draw Proj Hexagon .............................................................................................................. 88Draw Proj Octagon ............................................................................................................... 90Draw Proj Shape ................................................................................................................... 92Draw Rectangular Torus ....................................................................................................... 93Draw Revolved Shape .......................................................................................................... 94Draw Shape ........................................................................................................................... 96Draw Transitional Element ................................................................................................... 97Get Arc Points ....................................................................................................................... 98Get Arc Size .......................................................................................................................... 99Get Date ................................................................................................................................ 100Get EQP Category ................................................................................................................ 101Get Line Size ........................................................................................................................ 102Get Point ............................................................................................................................... 103Move Along Arc ................................................................................................................... 105Move Along Axis ................................................................................................................. 106Move Along Line .................................................................................................................. 107Move By Distance ................................................................................................................ 108Move Data ............................................................................................................................ 109Move To Placepoint .............................................................................................................. 110Place COG ............................................................................................................................ 111Position Cursor ..................................................................................................................... 113Put Field ................................................................................................................................ 114Read Table ............................................................................................................................ 115Retrieve Nozzle Parameters .................................................................................................. 117Rotate Orientation ................................................................................................................. 119Start Complex Shape ............................................................................................................ 120Stop Complex Shape ............................................................................................................. 121Store Orientation ................................................................................................................... 122Store Nozzle Parameters ....................................................................................................... 123User Function ........................................................................................................................ 124
User Function FLAT_OVAL_PRISM .......................................................................... 125User Function FLAT_OVAL_TOR .............................................................................. 126User Function FLAT_OVAL_SEG_TOR1 ................................................................... 127User Function FLAT_OVAL_SEG_TOR2 ................................................................... 128
6
-
Table of Contents________________
User Function ROUND_SEG_TOR1 ............................................................................ 129User Function ROUND_SEG_TOR2 ............................................................................ 130User Function RECT_SEG_TOR .................................................................................. 131User Function RECT_FLAT_OVAL ............................................................................ 132User Function ROUND_RECT ..................................................................................... 133
3. Creating a New Equipment Component ...................................................................................... 135
Setup for Equipment .................................................................................................................... 135Default Project Control Data ....................................................................................................... 137Extracting Sample Modules ......................................................................................................... 139Editing Modules ........................................................................................................................... 140Compiling New Modules ............................................................................................................. 141Revising Modules ........................................................................................................................ 142Basic Use of Forms ...................................................................................................................... 143Input Fields .................................................................................................................................. 144System-Defined Field Numbers ................................................................................................... 145Application Commands ............................................................................................................... 146
User-Defined Application Commands .................................................................................. 147
Additional Features of the Form Interface ................................................................................... 149
4. Defining Symbols ........................................................................................................................ 151
5. Eden Debugger ............................................................................................................................. 155
Invoking the Debugger ................................................................................................................ 156Exiting the Debugger ................................................................................................................... 157Concurrent Display ...................................................................................................................... 158Debugger Commands ................................................................................................................... 159
Switch Modes (ON and OF) ................................................................................................. 160Set Line Break (B) ................................................................................................................ 161Call Tutorial (C) ................................................................................................................... 162Deposit Global (DG) ............................................................................................................. 163Deposit Local (DL) ............................................................................................................... 164Examine Local Variables (EL) ............................................................................................. 165Examine Global Variables (EG) ........................................................................................... 166
Appendix A: Codelist (CL330) ........................................................................................................ 171
Appendix B: Equipment Data Definition ......................................................................................... 175
B.1 Equipment Group Database Table ............................................................................................. 176B.2 Equipment Nozzle Database Table ............................................................................................ 177
Appendix C: EQP Eden Program Examples .................................................................................... 179
7
-
PDS Eden for Equipment - April 2002________________
Example 1 (Use of loops): .................................................................................................... 179Example 2 (Use of arrays and loops): ................................................................................... 180Example 3 (Placing nozzles): ............................................................................................... 180Example 4 (Use of character string variables): ..................................................................... 181Example 5 (Graphic selection commands): .......................................................................... 181Example 6: ............................................................................................................................ 181Example 7: ............................................................................................................................ 182Example 8: ............................................................................................................................ 183Example 9: ............................................................................................................................ 183
Appendix D: Delivered Parametrics ................................................................................................ 189
D.1 Circular Platform (A001) .......................................................................................................... 191D.2 Miscellaneous Platform (A003) ................................................................................................ 194D.3 Holes for Platforms (A015) ....................................................................................................... 196D.4 Holes for Miscellaneous Platforms (A016) ............................................................................... 199D.5 Thru Ladder A (A021) .............................................................................................................. 202D.6 Thru Ladder Details (A029) ...................................................................................................... 204D.7 Side Ladder A (A031) ............................................................................................................... 206D.8 Side Ladder Details (A039) ....................................................................................................... 208D.9 Stairs A (A041) ......................................................................................................................... 210D.10 Handrail A (A051) .................................................................................................................. 212D.11 Davit A (A061) ........................................................................................................................ 214D.12 Davit B (A063) ........................................................................................................................ 216D.13 Define (E200) .......................................................................................................................... 218D.14 Define Weights (E201) ............................................................................................................ 220D.15 Complex Vertical Cylindrical Equipment, Skirt (E205) ......................................................... 222D.16 Simple Vertical Cylindrical Equipment, Skirt (E210) ............................................................ 225D.17 Simple Vertical Cylindrical Equipment, Legs (E215) ............................................................ 227D.18 Spherical Equipment (E230) ................................................................................................... 229D.19 Complex Horizontal Cylindrical Equipment (E240) .............................................................. 231D.20 Simple Horizontal Cylindrical Equipment (E245) .................................................................. 234D.21 Horizontal Shell and Tube Exchanger (E305) ........................................................................ 237D.22 Kettle Exchanger (E307) ......................................................................................................... 240D.23 Vertical Shell and Tube Exchanger (E310) ............................................................................. 243D.24 Exchanger Ends (E319) ........................................................................................................... 246D.25 Double Pipe Exchanger (E320) ............................................................................................... 248D.26 Plate Exchanger (E325) ........................................................................................................... 251D.27 Air Cooler (E330) .................................................................................................................... 253D.28 Induced Draft Air Cooler Bay (E332) ..................................................................................... 255D.29 Forced Draft Air Cooler Bay (E334) ....................................................................................... 257D.30 Horizontal Rotating Equipment and Driver (E405) ................................................................ 259D.31 Vertical Rotating Equipment and Driver (E410) .................................................................... 262D.32 E1 Ends (E905) ....................................................................................................................... 264D.33 E2 Ends (E906) ....................................................................................................................... 266D.34 E3 Ends (E907) ....................................................................................................................... 268D.35 Complex Vertical Cylindrical Equipment (N205) .................................................................. 269D.36 Simple Vertical Cylindrical Equipment (N210) ...................................................................... 269D.37 Simple Vertical Cylindrical Equipment (N215) ...................................................................... 270D.38 Spherical Equipment (N230) ................................................................................................... 270
8
-
Table of Contents________________
D.39 Complex Horizontal Cylindrical Equipment (N240) .............................................................. 271D.40 Simple Horizontal Cylindrical Equipment (N245) ................................................................. 271D.41 Horizontal Shell and Tube Exchanger (N305) ........................................................................ 272D.42 Kettle Exchanger (N307) ......................................................................................................... 272D.43 Vertical Shell and Tube Exchanger (N310) ............................................................................ 273D.44 Double Pipe Exchanger (N320) .............................................................................................. 273D.45 Plate Exchanger (N325) .......................................................................................................... 274D.46 Air Cooler (N330) ................................................................................................................... 274D.47 Horizontal Rotating Equipment and Driver (N405) ................................................................ 275D.48 Vertical Rotating Equipment and Driver (N410) .................................................................... 275D.49 Gear Cover (U850) .................................................................................................................. 276D.50 Round Torus Miter (U860) ..................................................................................................... 278D.51 Rectangular Torus Miter (U861) ............................................................................................. 280D.52 Vertical Oval Torus Miter (U862) ........................................................................................... 282D.53 Flat Oval Torus Miter (U863) ................................................................................................. 284D.54 Flat Oval Prism (U870) ........................................................................................................... 286D.55 Flat Oval Torus (U880) ........................................................................................................... 288D.56 Rectangular 90 Cone Torus with Offset (U881) ..................................................................... 290D.57 User Projected Shape (USRPRJ) ............................................................................................. 292
Glossary ............................................................................................................................................... 293
Index .................................................................................................................................................... 301
9
-
PDS Eden for Equipment - April 2002________________
10
-
Table of Contents________________
General Conventions
This document contains many visual cues to help you understand the meaning of certainwords or phrases. The use of different fonts for different types of information allows you toscan the document for key concepts or commands. Symbols help abbreviate and identifycommonly used words, phrases, or groups of related information.
Typefaces
Italic Indicates a system response, which is an explanation of what the software isdoing. For example,
The text is placed in the viewing plane.
Bold Indicates a command name, parameter name, or dialog box title. Commandpaths are shown using an arrow between command names. For example,
Choose File > Open to load a new file.
Sans serif Indicates a system prompt or message, which requires an action be taken bythe user. For example,
Select first segment of alignment
Bold TypewriterIndicates what you should literally type in. For example,
Key in original.dat to load the ASCII file.
Normal TypewriterIndicates an actual file or directory name. For example,
The ASCII report is stored in the layout.rpt file.
11
-
PDS Eden for Equipment - April 2002________________
SymbolsThis document uses the following symbols to represent mouse buttons and to identify specialinformation:
Command button Data button (usually the left mouse button) Reset/reject button (usually the right mouse button) Tentative button (usually the center mouse button)
Note Important supplemental information.
Warning Critical information that could cause the loss of data if not followed.
Technical tip or information provides information on what the software isdoing or how it processes information.
Map or path shows you how to get to a specific command or form.
More information indicates there is additional or related information.
Need a hint used with activities and labs, provides a tip or hint for doing theexercises.
Keyboard Conventions
The following list outlines the abbreviations this document uses for keyboard keys anddescribes how to use them in combination. You can make some menu selections through theuse of keyboard accelerators, which map menu selections to key combinations.
ALT Alternate keyCTRL Control keyDEL Delete keyENTER Enter keyESC Escape key
CTRL+z To hold down the Control key and press Z.ESC,k To press the Escape key, then K.
12
-
Table of Contents________________
Terminology
Click To use a mouse or key combination to pick an item that begins anaction. For example,
Click Apply to save the changes.
Select To mark an item by highlighting it with key combinations or by pickingit with your cursor. Selecting does not initiate an action. Afterselecting an item, you click the action you want to affect the item. Forexample,
Select the file original.dat from the list box, then click Delete toremove it from the directory.
In addition, you would select items to define parameters, such asselecting toggle buttons. This also applies to selecting graphicelements from the design file. For example,
Select the line string to define the graphic template.
Tentative-select To place a tentative point on an existing graphic element in a designfile. If you are using the CLIX operating system, you tentative-selectby double-clicking with a mouse or pressing on a hand-heldcursor. If you are using the Windows NT operating system, youtentative-select by pressing a left-button, right-button chord.
Double-click To select and execute a command by clicking the mouse or hand-heldcursor button twice in rapid succession. This term implies that you areclicking the data button () as part of a menu or dialog box action.For example,
Double-click on the file original.dat to load it into the new surface.
Drag To press and hold the data button () while moving the mouse orhand-held cursor.
Type To key a character string into a text box.
Key in To type in data and press ENTER to enter the data and execute thedefault action.
In a dialog box, pressing TAB after keying in data willenter the data and move the cursor to the next field.
13
-
PDS Eden for Equipment - April 2002________________
14
-
1.Basics
The Eden Basics________________
1. The Eden Basics
Eden is a high-level symbol definition language modeled on the FORTRAN programming language. It allowsyou to design your own symbols for equipment, piping, instrumentation, and specialty items.
The Eden language syntax is not case sensitive. You can write code with whatever case conventions make iteasiest for you to read. While you do not need a programming background to write Eden programs, anyprogramming experience is highly recommended.
Most of the symbol definition functions are built into Edens command structure. This high-level commandstructure makes it easier to share code among several different symbol definitions.
Eden is flexible enough to allow you to design codes specific to your companys needs, yet offers predefinedsubroutines, called primitives, which carry out functions often repeated within symbol definitions.
For example, the following primitive draws a cone with a length of X units, a diameter at the active point (firstend) of Y units and a diameter at the opposite end of Z units:
Call Draw_Cone (X, Y, Z)
The output produced will look similar to the following graphic:
You can call up to five nested subroutines within a program.
15
-
PDS Eden for Equipment - April 2002________________
Equipment Symbol Processor
The symbol processor is the Eden code that defines an equipment component. It calls all the subroutines ormodules that activate forms, check input data, assign placement points, and place graphics.
The first line of an Eden module defines the module name. The following statement is used in the Edenmodules to indicate a symbol processor module:
Symbol_Processor MODULE NAME
The module name should be entered using UPPER CASE characters. For example:
Symbol_Processor APUMP
The following example symbol processor defines a horizontal pump:
SYMBOL_PROCESSOR E405!#TYPE =Pumps,All equip#DESC =Hor Rot Equip & Driver!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! E405 : Horizontal Rotating Equipment and Driver!! APPLICATION COMMAND! 4075 - HELP (SPECIFIC)! 4074 - HELP (GENERAL)! 4073 - DEFINE! 4072 - DEFINE CG! 4051 - RETURN (from help menu)! 4052 - UPDATE DATE!! SYSTEM DEFINED COMMAND USED! 4001 - EXIT! 4002 - ACCEPT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
INT2 acceptedLOCATION pointzero [3]
!pointzero = POINT_0
Dimension [100] = 0.0accepted = 0tutname = E405
Cstring [29] = E405Call Get_Date( Cstring [38] )
!Do While ( accepted .EQ. 0 )
Call Display_Tutorial ( tutname )
Call Put_Field( Cstring [29], 19 )
16
-
1.Basics
Equipment Symbol Processor________________
If( LAST_INP_TYPE .EQ. USER_KEYIN ) thenIf( LAST_INP_NUM .GE. 2 .AND. LAST_INP_NUM .LE. 18 ) then
Call User_Function ( E405_CHECK )accepted = Dimension [100]
Elseaccepted = 0
EndifElse
If( LAST_INP_TYPE .EQ. APPLICATION_CMD ) thenif( LAST_INP_NUM .eq. 4075)then
Call Display_Tutorial ( H405 )accepted = 0
elseif( LAST_INP_NUM .eq. 4074)then
Call Display_Tutorial ( H200A )accepted = 0
elseIf( LAST_INP_NUM .eq. 4073)then
Call User_Function (E200)accepted = 0
ElseIf( LAST_INP_NUM .eq. 4072)then
Call User_Function (E201)accepted = 0
ElseIf( LAST_INP_NUM .eq. 4052 )then
Call Get_Date( Cstring [1] )accepted = 0
Elseaccepted =1
EndifEndif
EndifEndif
endifelse
accepted = 1Endif
EndifEnddo
!! define PLACE POINTS and DATUM POINTS
Call Define_Active_Orientation ( NORTH, UP )Call Define_Placepoint ( PP1, POINT_0 )Call Define_Datum_Point ( DP [1], POINT_0)offset = Dimension [4] + Dimension [11]
Call Move_Along_Axis ( - offset, SECONDARY )Call Define_Placepoint ( PP2, POINT_0 )Call Define_Datum_Point ( DP [2], POINT_0)
! Draw base plate
base_length = Dimension [1]base_width = Dimension [2] + Dimension [3]base_thickness = Dimension [4]offset_base = 0.5 * Dimension [1] + Dimension [5]offset_norm_base = 0.5 * base_width - Dimension [3]
17
-
PDS Eden for Equipment - April 2002________________
Call Move_To_Placepoint (PP2)Call Move_Along_Axis ( offset_base, PRIMARY )Call Move_Along_Axis ( offset_norm_base, NORMAL )Call Rotate_Orientation ( 90.0, NORMAL )If( base_length .gt. 0.0 .and. base_width .gt. 0.0 .and. base_thickness .gt. 0.0 ) then
Call Draw_Proj_Rectangle ( base_length, base_width, base_thickness )Else
Call Abort (0)Endif
! Draw driver
driver_length = Dimension [6] + Dimension [7]driver_width = Dimension [8] + Dimension [9]driver_thickness = Dimension [10] + Dimension [11]vert_offset_driver = - Dimension [11]horiz_offset_driver = 0.5 * driver_length - Dimension [6]norm_offset_driver = 0.5 * driver_width - Dimension [9]
Call Move_To_Placepoint (PP1)Call Move_Along_Axis ( vert_offset_driver, SECONDARY )Call Move_Along_Axis ( horiz_offset_driver, PRIMARY )Call Move_Along_Axis ( norm_offset_driver, NORMAL )Call Rotate_Orientation ( 90.0, NORMAL )If( driver_length .gt. 0.0 .and. driver_width .gt. 0.0 .and. driver_thickness .gt. 0.0 ) then
Call Draw_Proj_Rectangle ( driver_length, driver_width, driver_thickness )Endif
! Draw shaft
Call Move_To_Placepoint (PP1)Call Move_Along_Axis ( Dimension [7], PRIMARY )If( Dimension [12] .gt. 0.0 .and. Dimension [13] .gt. 0.0 ) then
Call Draw_Cylinder ( Dimension [12], Dimension [13] )Endif
! Draw housing
house_length = Dimension [14]house_width = Dimension [15] + Dimension [16]house_thickness = Dimension [17]vert_offset_house = - Dimension [11]horiz_offset_house = 0.5 * house_length + Dimension [12] + Dimension [7]norm_offset_house = 0.5 * house_width - Dimension [16]
Call Move_To_Placepoint (PP1)Call Move_Along_Axis ( vert_offset_house, SECONDARY )Call Move_Along_Axis ( horiz_offset_house, PRIMARY )Call Move_Along_Axis ( norm_offset_house, NORMAL )Call Rotate_Orientation ( 90.0, NORMAL )If( house_length .gt. 0.0 .and. house_width .gt. 0.0 .and. house_thickness .gt. 0.0 ) then
Call Draw_Proj_Rectangle ( house_length, house_width, house_thickness )Endif
! define CGs
Call Move_To_Placepoint ( PP1 )
Call Place_Cog (DRY, Dimension [71], Dimension [72], Dimension [73])Call Place_Cog (OPERATING_1, Dimension [74], Dimension [75], Dimension [76])Call Place_Cog (OPERATING_2, Dimension [77], Dimension [78], Dimension [79])
18
-
1.Basics
Equipment Symbol Processor________________
Call Move_To_Placepoint ( PP2 )
STOPEND
19
-
PDS Eden for Equipment - April 2002________________
Tutorial Definition Table
You can create or modify tutorial definition tables using an ASCII editor. The first line in a tutorial definitiontable defines the tutorial name. This entry must begin in column 1.
Each input field in a tutorial must have a corresponding row in a tutorial definition table. Each row includesseven entries: field number, data type, global variable, nozzle number, input attribute, default string, and fieldname.
1. field number the tutorial field number defining the form (gadget number).
2. datatype the data type of the field. This entry is a number whose valuesinclude:
1 = linear dimension2 = angular dimension3 = integer (no units)4 = length for NOZ_LENGTH15 = length for NOZ_LENGTH26 = length for NOZ_RADIUS7 = equipment entity database attribute8 = nozzle entity database attribute9 = field to receive values for CSTRING_x variables
3. number a table data entry which the system interprets differently for each datatype:
For data types 1, 2, and 3, number is a value that can range from 1 to100 defining the global variable DIMENSION_n, which holds thefields input. For example, if number is set to 10 in the table, thenany input into the field is placed by the software intoDIMENSION_10. The symbol can then refer to DIMENSION_10and use it in any of its calculations. For data types 4, 5, and 6, thisfield is ignored.
For more information on the Equipment Modeling DDL, refer toAppendix C, Equipment Data Definition.
For data types 7 and 8, number defines the attribute number in theappropriate database entity to which the field inserts input. Thesenumbers provide the link to the database.
Use the following numbers for the respective attribute:
equip_group ( datatype = 7 )
1 , equip_no , character(30)2 , equip_descr_1 , character(40)3 , equip_descr_2 , character(40)4 , tutorial_no , character(6)5 , equip_class , character(2)6 , dry_weight , double
20
-
1.Basics
Tutorial Definition Table________________
7 , oper_weight_1 , double8 , oper_weight_2 , double9 , insulation_thk , double10 , construction_stat , short , standard note 13011 , equipment_division , short , standard note 6912 , approval_status , short , standard note 35
equip_nozzle ( datatype = 8 )
1 , nozzle_no , character(10)2 , equip_index , integer3 , nominal_piping_dia , short4 , rating , character(8)5 , preparation , short , standard note 3306 , piping_mater_class , character(16)7 , unit_no , character(12)8 , fluid_code , short , standard note 1259 , unit_code , character(2)10 , line_sequence_no , character(6)11 , heat_tracing_reqmt , short , standard note 20012 , heat_tracing_media , short , standard note 21013 , insulation_purpose , short , standard note 22014 , insulation_thk , double15 , table_suffix , short , standard note 57616 , service , character(20)17 , schedule_thickness , character(8)18 , nor_therm_growth_X , double19 , nor_therm_growth_Y , double20 , nor_therm_growth_Z , double21 , alt_therm_growth_X , double22 , alt_therm_growth_Y , double23 , alt_therm_growth_Z , double24 , construction_stat , short , standard note 130
For example, if the data type is 7 and number is 1, then any input to this field is put in the equipment entity,attribute number 1 (or equipment name) field of the record that is written to the database when the component isplaced. Refer to the model database DDL for a complete description of each attribute in both the equipment andnozzle entities.
For data type 9, number specifies the CSTRING variable to receivethe value.
4. nozzle a number that identifies the nozzle with which a field will beassociated. This field is only needed for data types 4, 5, 6, and 8.Each nozzle in a parametric symbol must be assigned a uniquenumber. (Refer to the DEFINE_NOZZLE and theRETRIEVE_NOZZLE_PARAMETERS primitives.) This number isthe same as the RETRIEVE_NOZZLE_PARAMETERS primitive.Each nozzle in a parametric requires a set of fields for defining thenozzle size, rating, facing, tag, possibly length, and possibly otherdatabase attributes. The nozzle number allows the software todistinguish one nozzle tag input field or one nozzle size input fieldfrom another.
21
-
PDS Eden for Equipment - April 2002________________
5. attributes an entry that describes the input field itself. The available values forthis item include:
1 - user input is optional.
2 - user input is required.
3 - user input is optional but causes return to the symbol. Thistype of field has also been called a terminated key-in field.Refer to the DISPLAY_TUTORIAL primitive for moreinformation on how to handle these fields from the symbol.
4 - user input is required but causes return to the symbol. Thisis also a terminated key-in field.
Example:
A tutorial has a field for which the attribute entry in the tutorialdefinition table contains the number two. You are not allowed to selectthe ACCEPT field to exit from the tutorial until you have provided avalid input for the field.
6. default an entry allowing you to define a default for a particular tutorial inputfield. The entry can take on several forms. All of the expressionsoutlined below must be surrounded by single quotes in the tutorialdefinition table.
The default types include:
"XXX-" A literal string used for defaulting character string input fields.The double quote must be included as a delimiter. Example:"101-C"
Fxxx- Use the current value of tutorial field number xxx as the defaultfor this field. Note that user-defined field numbers can rangefrom 1 to 200. (System-defined fields range from 201 to 256and may not appear in default expressions.) Example: F23
Dxxx- Use the contents of DIMENSION_xxx as the default for thisfield. There is no practical limit on the number of tutorials thata symbol can activate. Therefore, any calculations that weremade before the symbol definition activated the current tutorialcan provide defaults for that tutorial. Example: D23
Cxx- Use the contents of CSTRING_xx as the default for this field.
xx.x- Decimal constant with or without a decimal point. All distancesare assumed to be in English subunits (inches). If the default isa metric constant, then the constant should be given a suffix ofM. Example: 125M
22
-
1.Basics
Tutorial Definition Table________________
expr- Combine any of the above three default types to form a validarithmetic expression. Valid operators are +, -, *, /, and .Use parentheses to alter order of evaluation. An expressionis not evaluated until all fields are defined. Example:(F1+F2)/2+30. This expression is not computed until bothfields 1 and 2 are defined.
Default expressions are currently limited to 20 characters in length.
Example:
101-C - default for an equipment item name field
Example:
F1/2+10 - use the first input to field 1 divided by 2 plus 10 inches asthe default.
7. name defines an alphanumeric name for the field which will be used in future softwarereleases for reporting and alphanumeric placement of parametrics. The fieldname can be a maximum of 10 characters in length.
The gadget numbers 1-10 (Column 1 - Field) in the tutorial definition table correspond to gadget numbers951-960 on the form.
1 = 9512 = 9523 = 9534 = 9545 = 9556 = 9567 = 9578 = 9589 = 95910 = 960
Gadget numbers 11, 12, 13 ... remain 11, 12, 13 ...
Example
The following example tutorial definition table displays a piece of equipment with 7 dimensional inputs (rows1-7), 4 nozzles (rows 11-26), and 3 fields for equipment entity database attributes (rows 8-10).
EXCHNG
1, 1, 1, , 1, 30, DIA2, 1, 2, , 1, , NOZ13, 1, 3, , 1, F2, NOZ24, 1, 4, , 1, , NOZ35, 1, 5, , 1, , SUPP16, 1, 6, , 1, , SUPP27, 1, 7, , 1, , PROJ
23
-
PDS Eden for Equipment - April 2002________________
8, 7, 1, , 1, , EQPNAM9, 7, 2, , 1, , DESCR
10, 7, 5, , 1, "C", CLASS11, 8, 1, 20, 1, , TAG112, 8, 3, 20, 1, , SIZE113, 8, 4, 20, 1, , RATING114, 8, 5, 20, 1, 21, FACING115, 8, 1, 19, 1, , TAG216, 8, 3, 19, 1, F12, SIZE217, 8, 4, 19, 1, F13, RATING218, 8, 5, 19, 1, 21, FACING219, 8, 1, 18, 1, , TAG320, 8, 3, 18, 1, , SIZE321, 8, 4, 18, 1, , RATING322, 8, 5, 18, 1, 21, FACING323, 8, 1, 17, 1, , TAG424, 8, 3, 17, 1, F20, SIZE425, 8, 4, 17, 1, F21, RATING426, 8, 5, 17, 1, 21, FACING4
In the tutorial above, the default value for field 1 on the tutorial is 30 inches.
Since the default value for field 3 is F2, your first input to field 2 is displayed in field 3 by the system.
Since the second column is equal to 1 for fields 1 through 7, they are all linear dimension inputs. Yourinput into these fields is placed in variables DIMENSION_1 through DIMENSION_7.
Field 8 collects your equipment ID (equipment entity, attribute number 1). In general, it is easier to placethe symbol if the equipment ID field is put directly on each tutorial.
There is a set of four fields on the tutorial for each nozzle defined in the parametric (tag, size, rating, endprep). This is the minimum number of fields that can be present to allow complete definition of a nozzle.If you do not define the nozzle tag for a particular nozzle, then that nozzle will not be placed.
Nozzle tag numbers cannot be defaulted.
Since there is no field on the tutorial that explicitly collects individual nozzle lengths, the symbol logicmust calculate them.
Each nozzle has a default end prep of 21 (nozzle entity, attribute number 5). This is a code-listed attributein the database. The value 21 is the codelist value for a raised face. The default expression can also beentered as "RFFE", which is the codelist text for raised face end prep.
24
-
1.Basics
Forms Interface________________
Forms Interface
Forms in equipment modeling serve to collect input via key-in fields or command buttons. They also providefeedback information to the user through message fields.
Input fields and application commands have unique identification numbers. These numbers are used with thetutorial definition table (TDF) to communicate to the software the use for each field or command. The dataentered through the forms serves as the input that defines the values of the global variables used by the symbolprocessor. When a new equipment item is defined through Eden, a form has to be created to define thecomponents parameters. DBAccess is used to build forms.
25
-
PDS Eden for Equipment - April 2002________________
26
-
2.StructureEden Language Structure
________________
2. Eden Language Structure
Eden is similar to the FORTRAN programming language. Therefore, the general rules for evaluatingexpressions in Eden are identical to those in FORTRAN.
You do not need to know FORTRAN to use the Eden language.
Eden definitions are usually simpler than FORTRAN programs. To use Eden, you must be able to visualize thesymbol (in 3D) that you want to develop.
The Eden language structure incorporates:
Statements
Beginning
Ending
Variables
Local
Global
Keywords
Operators
Arithmetic
Relational
Logical
Expressions
Functions
Primitives (or Subroutines)
27
-
PDS Eden for Equipment - April 2002________________
Beginning Statements
Beginning statements define the types of modules being entered. Names within the single quotes must be allupper case.
SP - Symbol_Processor 6CHARUF - User_Function_Definition 28CHAR
Examples
Symbol_Processor A001User_Function_Definition A001_CHECK
Ending Statements
Ending statements mark the end of the module in which the system has been processing. Ending statements inthe symbol and subsymbol processor include:
StopEnd
Ending statements in the user functions include:
ReturnEnd
28
-
2.StructureBegin
________________
Begin
The Begin primitive allows you to generate graphics for 2D shadow, envelopes, various light steel categories,and holes.
Syntax
Call Begin
Options
category keyword specifying the graphics category you want to place. Allowablecategory keywords for each class of graphics include:
Regular equipment graphics
EQUIPMENT This is executed at the beginning of symbol execution. It isneeded if you have placed some other category and want toresume equipment graphics.
Interference envelope graphics
ENVELOPE_MAINTENANCE_HARDENVELOPE_MAINTENANCE_SOFT
ENVELOPE_ACCESS_HARDENVELOPE_ACCESS_SOFT
ENVELOPE_SAFETY_HARDENVELOPE_SAFETY_SOFT
ENVELOPE_CONSTRUCTION_HARDENVELOPE_CONSTRUCTION_SOFT
2D footprint graphics
SHADOW
Light steel graphics
LADDERPLATFORMHANDRAILMISCELLANEOUS
29
-
PDS Eden for Equipment - April 2002________________
Holes
HOLENOHOLE
The keywords HOLE and NOHOLE are different from other keywordsin that they do not represent a separate category of graphics. You caninclude Begin(HOLE) within another Begin category. A Begin(HOLE)remains in effect across other Begin calls until a Begin(NOHOLE) isreached. Hole graphics are given the level and symbology of holes.
Surface Type
SOLIDSURFACE
The keywords SOLID and SURFACE set the active surface type ofsubsequent graphics. The default is SOLID. This results in cappedsurfaces. With the SURFACE keyword, you can place uncappedshapes such as open-ended cylinders.
Except for nozzles and placepoints, all graphics assume the level and symbology of the last executed Beginstatement. Placepoints always belong to the equipment/parametric cell. If your symbol executes noEQUIPMENT category graphics, an otherwise empty parametric equipment cell is created for housing theplacepoints.
A Begin statement can repeat itself any number of times. After execution, it becomes the active category forsubsequent element placement calls. A (non-EQUIPMENT) Begin statement must be followed by at least onecall to generate graphic elements; otherwise that Begin statement will have no effect on symbol graphics.
30
-
2.StructureBegin EQP Category
________________
Begin EQP Category
The Begin EQP Category primitive allows you to create graphics for various EQUIPMENT subcategories eachhaving its own level and symbol.
Syntax
Begin_EQP_Category (subcategory)
Options
subcategory is a character string indicating the subcategory. There are presently 20subcategories available. A valid subcategory must be one that has beendefined via the Project Administrator Module. Alternatively, you can useone of the following:
EQP_CATEGORY_1,EQP_CATEGORY_2,..
..
..
EQP_CATEGORY_20
The argument is checked only when you place the symbol and not duringcompilation.
Restrictions
You can use this call only within the Begin (EQUIPMENT) call. Also, you cannot make this call when DrawComplex Surface or Start Complex Shape is in progress. By default, the Begin (EQUIPMENT) and BeginEQP Category (EQP_CATEGORY_1) calls are active when a symbol executes.
Example
The following example is a valid code fragment:
Call Begin (ENVELOPE_MAINTENANCE_HARD).. ! place envelope graphics..
Call Begin (EQUIPMENT) ! to set category nextCall Begin_EQP_Category (PUMPS) ! PUMPS must be a valid
! category for projectCall Draw_Complex_Surface (4, 0)
.. ! pump graphics
..
Call Begin (HOLE) ! HOLE is allowed anywhere..
31
-
PDS Eden for Equipment - April 2002________________
..
Call Draw_Complex_Surface (-99, 0) ! end pump
The following example is not a valid code fragment:
Call Begin (LADDER)Call Begin_EQP_Category (PUMPS) ! Begin (EQUIPMENT) not active
..
..
This example is not a valid code fragment.
Call Draw_Complex_Surface (4, 0)Call Begin_EQP_Category (PUMPS) ! cannot change within surface
32
-
2.StructureVariables
________________
Variables
Variables in Eden can be either local or global. They can contain either numeric or alphanumeric data.Internally, numeric data is stored as REAL*8 (double precision). If a different data type is required in thecontext of an expression, then the conversion is performed at the time the expression is evaluated.
Variable names can be either upper or lower case. Symbols tend to be easier to read when youuse all lower case for local symbols and all upper case for global symbols or vice versa.
Examples:
When converting a floating point number to an integer, the fractional part of the floating point number istruncated.
A variable used in a logical expression evaluates to TRUE when the value of the variable is 1 and 0 whenthe logical value is FALSE.
Variables that hold values representing distances are assumed to be in subunits. A variable containing thevalue 25 represents 25 inches in an English unit design file and 25 millimeters in a metric unit design file.
Be careful when using hard coded numbers or when using the system_of_units variable.
Local Variables
Local variables are user defined and declared in the symbol definition. You can refer to a local variable onlywhen you are in the same module as the local variable.
Local variable names are formed using alphanumeric (a-z), numeric (1-9), and special (_ and $) characters.They must begin with an alphanumeric character and must be less than or equal to 31 characters in length.
The Eden compiler does not verify the spelling of local variables within call statements. It assumes anull value for the misspelled variable at component placement time.
The Eden language refers to constants as local variables. Both character strings and numeric constants arevalid; however, character string constants must be surrounded by single quotes. In most cases, characterstrings and constants are case sensitive. Thus, a and A are interpreted differently.
Examples:
diameter 13.25shell_thickness A TEXT STRINGprojection_1 radius [2]25
33
-
PDS Eden for Equipment - April 2002________________
Only in Pipe Support and Equipment Modeling can you declare local variable types. The variable types defaultto either CHARACTER or REAL depending on the context. To override this default, you can use a localvariable type declaration statement anywhere before the variable(s) is (are) actually referenced. Variable typesINT2, R8, and LOCATION are recognized by the compiler.
Example:
In the following example, variables a, B, and C are declared as type short integers. They hold values rangingfrom -32767 to 32767.
Int2 aInt2 B, C
Example:
In the example below, variable d is declared as a type REAL, capable of holding decimal fractional values. Thisis the usual default type for numeric variables. However, explicit typing to this category may be necessary todeclare local arrays.
R8 d
As a recommendation, all declaration statements should be placed at the very beginning of the symbol code andnot interspersed among statements to be executed during symbol placement. This improves programreadability.
Also in Pipe Support and Equipment Modeling, referencing a variable using subscripts is extremely useful whencoding repetitive statements such as the body of a loop. Prior to use, variables must appear in a type declarationin which its subscript or index range is also specified.
Example:
In the example below, D is an array of 5 short integer variables stored contiguously. The individual elementsare referenced as D[1], D[2], D[3], D[4], and D[5]. You can also use a variable or an arithmetic expression forindexing, such as D[i] where i is a value between 1 and 5, or D [i+1] where i is a value between 1 and 4. INT2-typed variables are particularly useful in DO loops and array indexing where integral numbers are necessary androundoffs must be avoided. They are also stored much more efficiently than REAL variables.
Int2 D[5], EF[6]
Example:
Below, LENGTHS is an array of 10 REAL variables. They are referenced as LENGTHS [1] ... LENGTHS [10]
R8 LENGTHS [10]
34
-
2.StructureVariables
________________
Example:
In the following example, PT is declared as a buffer with four locations.
Location PT [12]
where
PT [1], PT [4], PT [7] PT [10] are x-coordinatesPT [2], PT [5], PT [8] PT [11] are y-coordinatesPT [3], PT [6], PT [9] PT [12] are z-coordinates
These variables provide alternate locations for the point values that you do not want to store in POINT_1 ...POINT_24... POINT [125]. You will also find them useful in accessing individual components of a location.(Refer to the REPLACEMENT STATEMENT section.)
Location PT [12]
An array-formatted variable may also be referenced without the index. In this case, the first element of the arrayis accessed. For example, PT and PT [1] are functionally the same in the above example.
Currently, only single expression subscripts (that is; single dimensioned arrays) are possible.
Global Variables Common to Piping, Equipment, and PipeSupport Modeling
Global variables are system-defined names allowing you to refer to them at any subroutine level. Morespecifically, you can use them for passing values between subroutine levels or for communicating input valuesto the symbol. The following list shows the global variables common to all Eden applications. Refer to theapplication-specific section for detailed information concerning specific global variables.
Global variables are system-defined. You cannot declare global or subscripted global variables.
Input_n (Input_1 through Input_20) An array with up to 20 variables used to define the inputparameters for table lookups. (Input_11 through Input_20 are specifically designed foruser function arguments in equipment and pipe support modeling.)
Output_n (Output_1 through Output_20) An array with up to 20 variables where the results of thetable lookup are stored. (Output_11 through Output_20 are specifically designed for userfunction return arguments in equipment and pipe support modeling.)
Dimension_n (Dimension_1 through Dimension_100 for equipment and pipe supports, Dimension_1through Dimension_20 for piping) General purpose variables used for communicatinginput to the symbol logic. You can also use these variables for passing values betweensubroutines or simply for local storage. (Dimension_20 is for angle; Dimension_1 throughDimension_19 is for linear piping.)
Pr_Rating_n Variable containing the current item pressure rating value.
35
-
PDS Eden for Equipment - April 2002________________
Nom_Pipe_D_n Variable containing the current item nominal pipe diameter. This variable contains thenominal diameter in coded units. A special primitive is provided to help you convert fromcoded units to subunits.
Gen_Type_n Variable containing the current item end preparation generic type (BLT, MAL, FEM). Thisis a read-only variable.
Term_Type_n Variable containing the current item end preparation termination type (21, 22, and 23 willfall into Term_Type_1=20). This is a read-only variable.
Standard_Type Variable containing the current item standard type value. This is a read-only variable andis a function of TABLE_SUFFIX.
Global Variables Common to Equipment and Pipe SupportModeling
The following list contains global variables common to Equipment and Pipe Support Modeling. For moreinformation on global variables, refer to the System-defined Subroutines section and the Eden User Interfacesection.
Point_nPoint [n]
(Point_1 - Point_24) Names representing points that have beendefined or saved for later use in a symbol definition. The n in [n]can be between 0 and 125.
Act_Lib Variable that contains an identifier for the active library ofdimension tables. This is a read-only variable.
Cstring_n (Cstring_1 through Cstring_40) Names representing globalcharacter variables. Each name can contain a maximum of 50characters.
Last_Inp_TypeLast_Inp_Num
Refer to the Dsplay_Tutorial primitive in the Eden Primitivessection.
NPD_Unit_Type Contains the nominal piping diameter system of units defined forthe model file. You can test this variable against the keywordsENGLISH and METRIC. This is a read-only variable.
Global Variables (EQP Specific)
The following list contains global variables specific to Equipment Modeling. For more information on globalvariables, refer to the System-defined Subroutines section and the Eden User Interface section.
PP_Location_n (PP_Location_1 - PP_Location_10) Names representing the pointlocations that have been defined as place points in the course of asymbol definition.
36
-
2.StructureVariables
________________
End_Prep Variable containing the current nozzle end preparation value.
Noz_Length1 Variable containing the current nozzle length value. This variableapplies to type 2 and 3 nozzle only. For type 3, the length is fromthe end of the nozzle connected to the vessel to the centerline of thebend.
Noz_Length2 Variable containing the current second nozzle length value. Thisvariable applies to type 3 nozzles only and measures the lengthfrom the face of the nozzle to the centerline of the bend.
Noz_Radius Variable containing the current nozzle bend radius. Applies to type3 nozzles only.
Table_Suffix Variable containing the current nozzle table suffix value.
PP_Primary_n (PP_Primary_1 through PP_Primary_10) Names representingorientation of primary axes for place points defined during symbolplacement.
PP_Secondary_n (PP_Secondary_1 through PP_Secondary_10) Names representingorientation of secondary axes for place points defined duringsymbol placement.
PP_Normal_n (PP_Normal_1 through PP_Normal_10) Names representingorientation of normal axes for place points defined during symbolplacement.
Subscripted Global Variables
In Equipment and Pipe Support Modeling, a global variable can contain an index value as part of the variablename even though the index value is not a variable. This is known as subscripted global variables. Forexample, Dimension_10 and Point_3 are global variables whose index values are 10 and 3, respectively.
You can reference the same location using subscripted global variables, which contain an index either as avariable or as an expression. For example, Dimension [10] and Point [3] are subscripted global variables whoseindex values are 10 and 3, respectively. They are equivalent to Dimension_10 and Point_3. Subscripted globalvariables are useful when using loops. Below is a list comparing the two methods of accessing global variableswith indexes:
Subscripted Global Variable (variable index) Global Variable with non-variable index
cstring [1] ... cstring [40] cstring_1 ... cstring_40
dimension [1] ... dimension [100] dimension_1 ...dimension_100
dp [1] ... dp [30] dp1 ... dp30
37
-
PDS Eden for Equipment - April 2002________________
inputs [1] ... inputs [20] input_1 ... input_20
outputs [1] ... outputs [20] output_1 ... output_20
pp [1] ... pp [10] pp1 ... pp10
point [0] ... point [125](point [0] ... point [24] point_0 ... point_24)
pp_primary [1] ... pp_primary [10] pp_primary_1 ...pp_primary_10
pp_secondary [1] ... pp_secondary [10] pp_secondary_1 ...pp_secondary_10
pp_normal [1] ... pp_normal [10] pp_normal_1 ... pp_normal_10
pp_location [1] ... pp_location [10] pp_location_1 ...pp_location_10
A global variable referenced without a subscript causes the first element to be accessed. Thus, Point and Point[0], Dimension and Dimension_1 are functionally equivalent.
38
-
2.StructureCommon Keywords
________________
Common Keywords
Eden uses keywords for labeling specific values or groups of values. All keywords except TRUE and FALSEcan appear as arguments in system-defined primitives (or subroutines). Keywords can be upper or lower case.For consistency, this reference guide displays keywords in upper case.
TRUE Logical true. Used in logical expressions.
FALSE Logical false. Used in logical expressions.
MALE Keywords for generic end preparation.FEMALEBOLTED
PRIMARYSECONDARYNORMAL
Keywords used to identify or refer to individual refresh tee axes.
ENGLISHMETRIC
Names used to define the units of a constant used in the symbol definition.
ACTIVE_POINTPOINT_0
Name representing the location of the active point in the localcoordinate system defined by the symbol. These names can be usedinterchangeably.
EAST Keywords used to define directions in the local coordinate systemdefined by the symbol definition.
WESTNORTHSOUTHUPDOWN
PP1 - PP10 Names representing symbol place point locations and orientations. Amaximum of 10 place points can be defined for 1 symbol.
DP1 - DP30 Names representing equipment datum point locations and orientations.
SYMBOL_PROCESSOR Module type of all equipment modeling Eden definitions. It is used inthe first statement of a symbol definition.
ENG_COMM_LIBEQP_TABLES
Names representing the different libraries that can be made active in asymbol definition.
RETURNSTOP
Terminates module execution normally. If it encounters either aRETURN or STOP in a user function, the system returns control to thecalling module.
39
-
PDS Eden for Equipment - April 2002________________
END Must be the last line in the symbol source code. If execution reachesthe END statement, an implicit STOP is executed.
There are other keywords primarily used in specific subroutine calls. These keywords can be found in thesubsections that describe their associated primitives. Keywords APPLICATION_CMD and USER_KEYIN aredescribed under the DISPLAY_TUTORIAL primitive. Keywords such as PT_BORE and COG_TYPE areexplained under the GET_POINT and PLACE_COG primitives respectively.
TYPE Statement
TYPE statements allow you to assign up to 150 labels or types to a symbol. The syntax for the TYPE statementis:
#TYPE = Type 1, Type 2, Type 3, ... , Type n
where
Type 1 ... Type n Labels representing types under which the symbol will be classified.
Using each type, you can later inquire on the symbol. (Refer to the PDS Equipment Modeling (PD_EQP)Reference Guide for information on Parametric Help.)
A type label can be up to 28 characters long. The compiler automatically left justifies each type and converts itto upper case. You can enter any number of complete type labels that fit in a line. Multiple TYPE statementsare allowed. A TYPE statement can appear anywhere in the source code; however, the # character must appearin column 1.
Example:
The following TYPE statement appears in the code for a multi-diameter vertical vessel supported on skirt.
#TYPE = tower, vertical vessel, drum, reactor
DESCRIPTION Statement
The DESCRIPTION statement assigns a descriptive phrase of up to 40 characters to the symbol. Thisdescription appears next to the symbol name when you inquire on the symbol library from the PDS EquipmentTask. (See the PDS Equipment Modeling (PD_EQP) Reference Guide for information on Parametric Help.)
The syntax for the DESCRIPTION statement is:
#DESC = This is a description
A DESCRIPTION statement can appear anywhere in the symbol code. The description string is placed leftjustified by the compiler. When more than one DESCRIPTION statement appears, only the last statement isused. The # character must appear in column one.
40
-
2.StructureComments
________________
Comments
When you place an exclamation point (!) anywhere in an Equipment Modeling source line, the remainder of thatline is treated as a comment.
Example:
Call define_placepoint (PP1, POINT_1) ! POINT_1 is used to! define place point 1
41
-
PDS Eden for Equipment - April 2002________________
Operators
Operators are used in conjunction with variables to form expressions. As in FORTRAN, operators can beanyone of three types:
1. Arithmetic
2. Relational
3. Logical
Arithmetic Operators
Arithmetic operators are used to form arithmetic expressions. These operators follow the mathematicalconventions. Valid arithmetic operators include:
+ addition- subtraction* multiplication/ division** exponentiation// concatenation using _|| concatenation without using _
The first five operators (+, -, *, /, **) can only be used with numeric local and global variables. Theconcatenation operators (// , || ) can be used with both numeric and string variables.The concatenation operator // is used primarily to form table names. It joins two variables together with anunderbar (_) character. The result is a text string.
Example:
ABC // DEF
produces
ABC_DEF
When using the concatenation operation, real numbers are converted to integers (that is, truncated), thenconverted to character strings and finally joined together with the underbar character. The concatenationoperation is generally used to form messages and character field outputs.
42
-
2.StructureOperators
________________
Relational Operators
Relational operators are used to form relational expressions that test the value of an Eden expression or establishconditions under which a group of Eden statements can be executed. Valid relational operators include:
.EQ. equal to
.NE. not equal to
.GE. greater than or equal to
.GT. greater than
.LE. less than or equal to
.LT. less than
Periods must appear before and after the expression.
Relational operators can be used on both numeric and character string variables. However, mixing the twotypes of operands for a given operation produces computing errors.
In character relational expressions, less than means precedes in the ASCII collating sequence, and greater thanmeans follows in the ASCII collating sequence.
ABCD .LT. ACCD
If two strings in a relational expression are not the same length, the shorter one is padded on the right withspaces until the lengths are equal.
PQRSTU .EQ. PQR
Logical Operators
Logical operators are used to combine relational expressions into more complex logical expressions. Validlogical operators include:
.OR. logical or
.AND. logical and
Periods must appear before and after the expression.
43
-
PDS Eden for Equipment - April 2002________________
Expressions
Expressions are variables, constants, and operators combined to make statements. The format of most Edenexpressions is the same as in FORTRAN. Valid expressions include:
Replacement simple arithmetic replacementCall executes primitives or subroutinesDo while execute loopIndexed Do execute loopIf - then - else conditional execution
For every IF statement, there must be an ENDIF statement to end the expression. You can nestup to five If-then-else expressions within an Eden module.
For the Replacement, Do while, and If-then-else expressions, you can use parentheses to alter the precedence ofcalculation.
Replacement Statements
Replacement statements are used to set variables or perform calculations. The following list illustrates thevarious Replacement statements:
thickness = 25.vessel_od = DIMENSION_1test = test + 1tutor_name = EXCH1table_name = BLT // GEN_TYPE // PR_RATING // 5dim_a = (dim_b + dim_c) * 2. + dim_d
In Equipment and Pipe Support Modeling, all three components of a point (or location variable) can be replacedby another point value with one assignment statement.
Example:
In the following example, PT is declared as a buffer of three points. The second statement saves pt [4], pt [5], pt[6] into global location Point_5. In the third statement, the location value stored in point [2] is saved in a PTbuffer, the x-coordinate being assigned to pt [7], y to pt [8], and so forth. Likewise, in the last statement, thePOINT_3 components are replaced by those of Point_4 in one aggregate operation.
Location pt [9].
.
point [5] = pt [4].
.
pt [7] = point_2.
.
point_3 = point [4]
44
-
2.StructureExpressions
________________
Call Statement
Call statements are used to execute system primitives. The syntax for the Call statement is:
call "primitive" or "subroutine" (argument 1, argument 2, ...)
Example:
Call Place_Cylinder_With_Capped_Ends (diameter, length)
Call Define_Placepoint (PP1)
Do While Statement
The Do While statement is used to form indefinite loops. The condition of a Do While statement must equal alogical value (either true or false). The body of the Do While statement will be repeatedly executed as long asthe logical expression remains true.
Example:
The following Do While loop places four cylinders end to end. The pretested loop condition fails on the fifthtry (if i equals 4), and control transfers to the message display routine.
i = 0do while (i .LT. 4)
i = i + 1Call Draw_Cylinder_With_Capped_Ends (diam, leng)
enddo
Call Display_Message (Out of loop now)
Indexed Do Statement
The Indexed Do statement allows you to form loops that execute a specified number of times. This number isdetermined by an initial, a terminal, and an incremental parameter of a control variable. The syntax for theIndexed Do statement is:
do V = v1, v2, v3.
.
.
enddo
where
45
-
PDS Eden for Equipment - April 2002________________
V is a control variable (non-string type)
v1v2v3
are constants or variables that evaluate to the initial, terminal, and incremental parameters respectively.v3 is optional. If v3 is omitted, the system assumes that the incremental parameter is one.
V3 cannot be negative.
Example:
In this example, I is set to 1. The body of the loop is then executed. I increments by 2 each time the cycle iscomplete, and the value 3 is checked against the terminator 20. The iteration continues as long as I is less thanor equal to 20. When the iteration is greater than 20, the loop ends.
do I = 1, 20, 2.
.
.
enddo
If - then - else Statement
If - then - else statements are used when a group of statements is to be conditionally executed. The Eden syntaxis the same as FORTRAN syntax.
if (condition) then.
.
.
else.
.
.
endif
Example:
if (DIMENSION_1 .gt. 24.) thenthk = thk + .125
elsethk = thk + .250
endif
An If statement of the form if (condition) is not valid. In Eden, all If statements must be of theform If (condition) then. The else statement is optional.
46
-
2.StructureFunctions
________________
Functions
Eden provides several functions for performing common mathematical operations. These functions can be usedwithin replacement statements.
The following functions must contain the parentheses.
DSQRT () square rootDABS () absolute valueDSINR () sine of an angle in radiansDCOSR () cosine of an angle in radiansDTANR () tangent of angle in radiansDSIND () sine of an angle in degreesDCOSD () cosine of an angle in degreesDTAND () tangent of an angle in degrees
DASINR () arcsine returned in radiansDACOSR () arccosine returned in radiansDATANR () arctangent returned in radiansDASIND () arcsine returned in degreesDACOSD () arccosine returned in degreesDATAND () arctangent returned in degrees
Example:
The following list illustrates a few possible Eden functions:
length = hypot * DSIND (30.)side = DTANR (pi/2) + 32.hypot = DSQRT (a**2 + b**2)angle = DATAND (side1/side2)
47
-
PDS Eden for Equipment - April 2002________________
Primitives
Primitives are system-defined routines that perform specific functions for symbol definition.
Convert NPD to Subunits
The Convert NPD to Subunits primitive converts the coded input value and returns its Real*8 equivalent.This primitive is often used for converting the nominal piping diameter that is stored in the database.
Metric files base the diameter in millimeters. Imperial files store the nominal piping diameter asNPD 1/32 + 5000. Thus,
1 inch NPD is 5000 + 32 * 1 = 503220 inch NPD is 5000 + 32 * 20 = 5640
For Eden symbols in Piping that use imperial and metric files, hard coding the dimensions is notrecommended. A dimension entered as 5 inches and placed in an Imperial file is interpreted as 5inches. However, the same value placed in a Metric file is interpreted as 5 millimeters. Insteadof hard coding, load the dimensions in a table to allow the piping software to convert thedimensions to the correct values.
This primitive does not perform unit conversions. If American standard pipe sizes are being used in a Metricfile, this primitive will return the NPD in inches.
Syntax
Call Convert_NPD_To_Subunits (coded_input, npd)
Options
coded_input The nominal pipe diameter in internal or coded units. This variable must bethe keyword Nom_Pipe_D_n.
npd The nominal piping diameter in subunits.
Examples
In this example, the Real*8 equivalence of the coded NPD in Nom_Pipe_D_1 is returned in Pipe_Dia_1.
Call Convert_NPD_To_Subunits (Nom_Pipe_D_1, pipe_dia_1)
All NPDs used internally in the software are in encoded form. Most table lookups based onNPDs require the input to be in encoded form. However, if a nozzle size is needed in acalculation, it must be converted from internal units to subunits.
48
-
2.StructureDefine Active Orientation
________________
Define Active Orientation
The Define Active Orientation primitive allows you to define the active orientation by specifying thedirections of the primary and secondary axes. The orientation is defined in the local coordinate system by thesymbol. This definition has no bearing on the design file coordinate system.
In Piping, this primitive defines the current flow centerline and a direction that is normal to the flow centerlinein terms of the connect point orientation (defined by the symbols connect point geometry) in order to placegraphic shapes.
Specific keywords are available for specifying either the primary axis or the secondary axis of the connectpoints orientation.
Syntax
Call Define_Active_Orientation (primary, secondary)
Options
primary Variable that defines the flow centerline or primary direction.
secondary Variable that defines the line perpendicular to the flow centerline or secondarydirection.
Valid keywords for the primary and secondary variables include:
EAST PP_PRIMARY_nWEST PP_SECONDARY_nNORTH PP_NORMAL_nSOUTH PRIMARYUP SECONDARYDOWN NORMAL
For the Equipment Modeling keywords, you must define n using the Define Placepoint primitive before usingany of the PP keywords.
If the initial active orientation for a symbol definition has the primary pointing east and thesecondary pointing north, the normal axis of the active orientation would be up. (Normal axiscan be found using the right-hand rule.)
49
-
PDS Eden for Equipment - April 2002________________
Example:
In the following example, the primary orientation is set to point west, and the secondary orientation is set topoint down:
Call Define_Active_Orientation (WEST,DOWN)
50
-
2.StructureDraw Cone
________________
Draw Cone
The Draw Cone primitive places a cone where the first end is at the current active point and the second end is ata location computed by the system given the input length along the primary axis. You must define thediameters of each end of the cone with separate variables.
Syntax
Call Draw_Cone (length, diameter_1, diameter_2)
Options
length The length of the cone (A) which can be positive or negative.
diameter_1 The diameter of the cone (B) at the active point.
diameter_2 The diameter of the cone (C) at the end opposite the active point.
Examples
SYMBOL_PROCESSOR CCONEtutnam = CCONECall Display_Tutorial (tutnam)A = DIMENSION_1 ! length of coneB = DIMENSION_2 ! diameter at active ptC = DIMENSION_3 ! diameter at opposite endCall Define_Placepoint (PP1, Point_0)Call Draw_Cone (A, B, C)Call Define_Active_Orientation (WEST, NORTH)Call Define_Placepoint (PP2, POINT_0)stopend
51
-
PDS Eden for Equipment - April 2002________________
Draw Cylinder
The Draw Cylinder primitive places a cylinder where the first end is at the current active point and the secondend is at a location computed by the system along the primary axis. You must specify the diameter and thelength of the cylinder. The active point will be moved to the opposite end.
Syntax
Call Draw_Cylinder (length, diameter)
Options
length The length (A) of the cylinder.
diameter The diameter (B) of the cylinder.
Examples
SYMBOL_PROCESSOR CYLINDtutnam = CYLINDCall Display_Tutorial (tutnam)A = DIMENSION_1 ! lengthB = DIMENSION_2 ! diameterCall Define_Placepoint (PP1, Point_0)Call Draw_Cylinder (A, B)Call Define_Active_Orientation (WEST, NORTH)Call Define_Placepoint (PP2, POINT_0)stopend
If cyl_len is positive, a cylinder of the specified length is drawn. If cyl_len is zero, nothinghappens. If cyl_len is negative, the active point is moved the specified negative distance, but thecylinder is not drawn.
52
-
2.StructureDraw Eccentric Cone
________________
Draw Eccentric Cone
The Draw Eccentric Cone primitive allows you to place an eccentric truncated cone. The first end is at thecurrent active point. The second end is at a location the system computes by moving from the current activepoint along the current flow centerline by the length of the cone and along the secondary axis by the negative ofthe eccentric offset. You must specify the eccentric offset and the diameters of both ends of the eccentric cone.
Syntax
Call Draw_Eccentric_Cone (length, eccentric_offset, diameter_1, diameter_2)
Options
length Cone length (A).
eccentric_offset Eccentric cone offset. This is the center-to-center distance between coneendpoints as measured positive going against the secondary.
diameter_1 Diameter (B) at active point.
diameter_2 Diameter (C) at the opposite end.
Examples
SYMBOL_PROCESSOR ECONEtutnam = ECONECall Display_Tutorial (tutnam)A = DIMENSION_1 ! lengthB = DIMENSION_2 ! diameter at active ptC = DIMENSION_3 ! diameter at opposite endoffset = (C - B) * 0.5 ! offsetCall Define_Placepoint (PP1, Point_0)Call Draw_Eccentric_Cone (A, offset, B, C)Call Define_Active_Orientation (WEST, NORTH)Call Define_Placepoint (PP2, POINT_0)stopend