edeneqp

Upload: pepe-garcia-estebez

Post on 13-Oct-2015

14 views

Category:

Documents


0 download

TRANSCRIPT

  • 5/22/2018 edeneqp

    1/312

    PDS Eden InterfaceReference 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

  • 5/22/2018 edeneqp

    2/312

    CopyrightCopyright 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 withoutproper authorization.

    Restricted Rights LegendUse, duplication, or disclosure by the government is subject to restrictions as set forthbelow. 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 DFARS227.7202-3.

    Unpublished rights reserved under the copyright laws of the United States.

    Intergraph Corporation

    Huntsville, Alabama 35894-0001

    Warranties and LiabilitiesAll warranties given by Intergraph Corporation about equipment or software are set forthin 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. IntergraphCorporation 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 onequipment 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.TrademarksIntergraph, 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 respectiveowners.

  • 5/22/2018 edeneqp

    3/312

    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 to

    http://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 at

    http://www.intergraph.com.

    Intergraph Directory

    The following numbers are only valid in the United States unless otherwise indicated. If you

    are 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 & Offshore

    300 Intergraph Way

    Madison, Alabama 35758U.S.A.

    You can also reach us by electronic mail [email protected].

    3

  • 5/22/2018 edeneqp

    4/312

    ________________

    Documentation Contacts

    We are constantly working on updates and improvements to the documents and other

    educational media. If you have any suggestions on where we can improve the documentation

    or where you think more information is needed, let us know. You can reach us by:

    Mail Intergraph Process, Power & OffshoreDocumentation Manager

    300 Intergraph Way

    Madison, AL 35758

    4

  • 5/22/2018 edeneqp

    5/312

    Table of Contents________________

    Table of Contents

    If You Need Assistance ........................................................................................................ 3

    Intergraph Directory ............................................................................................................. 3

    General Conventions .................................................................................................................... 11

    Keyboard Conventions ......................................................................................................... 12

    Terminology ......................................................................................................................... 13

    1. The Eden Basics ........................................................................................................................... 15

    Equipment Symbol Processor ...................................................................................................... 16

    Tutorial Definition Table ............................................................................................................. 20

    Forms Interface ............................................................................................................................ 25

    2. Eden Language Structure ............................................................................................................. 27

    Beginning Statements .................................................................................................................. 28

    Ending Statements ....................................................................................................................... 28

    Begin ..................................................................................................................................... 29

    Begin EQP Category ............................................................................................................. 31

    Variables ...................................................................................................................................... 33

    Common Keywords ..................................................................................................................... 39

    Comments .................................................................................................................................... 41

    Operators ...................................................................................................................................... 42

    Expressions .................................................................................................................................. 44

    Functions ...................................................................................................................................... 47

    Primitives ..................................................................................................................................... 48

    Convert NPD to Subunits ..................................................................................................... 48

    Define Active Orientation ..................................................................................................... 49

    Draw Cone ............................................................................................................................ 51

    Draw Cylinder ...................................................................................................................... 52

    Draw Eccentric Cone ............................................................................................................ 53

    Draw Projected Rectangle .................................................................................................... 54

    Draw Projected Triangle ....................................................................................................... 56

    Draw Semi-Ellipsoid ............................................................................................................ 58

    Draw Sphere ......................................................................................................................... 59

    Draw Torus ........................................................................................................................... 60

    Abort ..................................................................................................................................... 62Convert Unit ......................................................................................................................... 63

    Define Active Point .............................................................................................................. 64

    Define Datum Point .............................................................................................................. 65

    Define Library ....................................................................................................................... 66

    5

  • 5/22/2018 edeneqp

    6/312

    PDS Eden for Equipment - April 2002________________

    Define Nozzle ....................................................................................................................... 68

    Define Orientation By Points ................................................................................................ 70

    Define Placepoint .................................................................................................................. 71

    Define Point .......................................................................................................................... 72

    Display Message ................................................................................................................... 73

    Display Tutorial .................................................................................................................... 74

    Draw Arc ............................................................................................................................... 76

    Draw Complex Surface ......................................................................................................... 77Draw Con Prism ................................................................................................................... 80

    Draw Curve ........................................................................................................................... 81

    Draw Ecc Prism .................................................................................................................... 82

    Draw Ecc Transitional Element ............................................................................................ 84

    Draw Ellipse ......................................................................................................................... 85

    Draw Line ............................................................................................................................. 86

    Draw Line String .................................................................................................................. 87

    Draw Proj Hexagon .............................................................................................................. 88

    Draw Proj Octagon ............................................................................................................... 90

    Draw Proj Shape ................................................................................................................... 92

    Draw Rectangular Torus ....................................................................................................... 93

    Draw Revolved Shape .......................................................................................................... 94Draw Shape ........................................................................................................................... 96

    Draw Transitional Element ................................................................................................... 97

    Get Arc Points ....................................................................................................................... 98

    Get Arc Size .......................................................................................................................... 99

    Get Date ................................................................................................................................ 100

    Get EQP Category ................................................................................................................ 101

    Get Line Size ........................................................................................................................ 102

    Get Point ............................................................................................................................... 103

    Move Along Arc ................................................................................................................... 105

    Move Along Axis ................................................................................................................. 106

    Move Along Line .................................................................................................................. 107

    Move By Distance ................................................................................................................ 108

    Move Data ............................................................................................................................ 109Move To Placepoint .............................................................................................................. 110

    Place COG ............................................................................................................................ 111

    Position Cursor ..................................................................................................................... 113

    Put Field ................................................................................................................................ 114

    Read Table ............................................................................................................................ 115

    Retrieve Nozzle Parameters .................................................................................................. 117

    Rotate Orientation ................................................................................................................. 119

    Start Complex Shape ............................................................................................................ 120

    Stop Complex Shape ............................................................................................................. 121

    Store Orientation ................................................................................................................... 122

    Store Nozzle Parameters ....................................................................................................... 123

    User Function ........................................................................................................................ 124

    User Function FLAT_OVAL_PRISM .......................................................................... 125

    User Function FLAT_OVAL_TOR .............................................................................. 126

    User Function FLAT_OVAL_SEG_TOR1 ................................................................... 127

    User Function FLAT_OVAL_SEG_TOR2 ................................................................... 128

    6

  • 5/22/2018 edeneqp

    7/312

    Table of Contents________________

    User Function ROUND_SEG_TOR1 ............................................................................ 129

    User Function ROUND_SEG_TOR2 ............................................................................ 130

    User Function RECT_SEG_TOR .................................................................................. 131

    User Function RECT_FLAT_OVAL ............................................................................ 132

    User Function ROUND_RECT ..................................................................................... 133

    3. Creating a New Equipment Component ...................................................................................... 135

    Setup for Equipment .................................................................................................................... 135

    Default Project Control Data ....................................................................................................... 137

    Extracting Sample Modules ......................................................................................................... 139

    Editing Modules ........................................................................................................................... 140

    Compiling New Modules ............................................................................................................. 141

    Revising Modules ........................................................................................................................ 142

    Basic Use of Forms ...................................................................................................................... 143

    Input Fields .................................................................................................................................. 144

    System-Defined Field Numbers ................................................................................................... 145

    Application 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 ................................................................................................................ 156

    Exiting the Debugger ................................................................................................................... 157

    Concurrent Display ...................................................................................................................... 158

    Debugger Commands ................................................................................................................... 159

    Switch Modes (ON and OF) ................................................................................................. 160Set Line Break (B) ................................................................................................................ 161

    Call Tutorial (C) ................................................................................................................... 162

    Deposit Global (DG) ............................................................................................................. 163

    Deposit Local (DL) ............................................................................................................... 164

    Examine Local Variables (EL) ............................................................................................. 165

    Examine Global Variables (EG) ........................................................................................... 166

    Appendix A: Codelist (CL330) ........................................................................................................ 171

    Appendix B: Equipment Data Definition ......................................................................................... 175

    B.1 Equipment Group Database Table ............................................................................................. 176

    B.2 Equipment Nozzle Database Table ............................................................................................ 177

    Appendix C: EQP Eden Program Examples .................................................................................... 179

    7

  • 5/22/2018 edeneqp

    8/312

    PDS Eden for Equipment - April 2002________________

    Example 1 (Use of loops): .................................................................................................... 179

    Example 2 (Use of arrays and loops): ................................................................................... 180

    Example 3 (Placing nozzles): ............................................................................................... 180

    Example 4 (Use of character string variables): ..................................................................... 181

    Example 5 (Graphic selection commands): .......................................................................... 181

    Example 6: ............................................................................................................................ 181

    Example 7: ............................................................................................................................ 182

    Example 8: ............................................................................................................................ 183Example 9: ............................................................................................................................ 183

    Appendix D: Delivered Parametrics ................................................................................................ 189

    D.1 Circular Platform (A001) .......................................................................................................... 191

    D.2 Miscellaneous Platform (A003) ................................................................................................ 194

    D.3 Holes for Platforms (A015) ....................................................................................................... 196

    D.4 Holes for Miscellaneous Platforms (A016) ............................................................................... 199

    D.5 Thru Ladder A (A021) .............................................................................................................. 202

    D.6 Thru Ladder Details (A029) ...................................................................................................... 204

    D.7 Side Ladder A (A031) ............................................................................................................... 206

    D.8 Side Ladder Details (A039) ....................................................................................................... 208D.9 Stairs A (A041) ......................................................................................................................... 210

    D.10 Handrail A (A051) .................................................................................................................. 212

    D.11 Davit A (A061) ........................................................................................................................ 214

    D.12 Davit B (A063) ........................................................................................................................ 216

    D.13 Define (E200) .......................................................................................................................... 218

    D.14 Define Weights (E201) ............................................................................................................ 220

    D.15 Complex Vertical Cylindrical Equipment, Skirt (E205) ......................................................... 222

    D.16 Simple Vertical Cylindrical Equipment, Skirt (E210) ............................................................ 225

    D.17 Simple Vertical Cylindrical Equipment, Legs (E215) ............................................................ 227

    D.18 Spherical Equipment (E230) ................................................................................................... 229

    D.19 Complex Horizontal Cylindrical Equipment (E240) .............................................................. 231

    D.20 Simple Horizontal Cylindrical Equipment (E245) .................................................................. 234

    D.21 Horizontal Shell and Tube Exchanger (E305) ........................................................................ 237D.22 Kettle Exchanger (E307) ......................................................................................................... 240

    D.23 Vertical Shell and Tube Exchanger (E310) ............................................................................. 243

    D.24 Exchanger Ends (E319) ........................................................................................................... 246

    D.25 Double Pipe Exchanger (E320) ............................................................................................... 248

    D.26 Plate Exchanger (E325) ........................................................................................................... 251

    D.27 Air Cooler (E330) .................................................................................................................... 253

    D.28 Induced Draft Air Cooler Bay (E332) ..................................................................................... 255

    D.29 Forced Draft Air Cooler Bay (E334) ....................................................................................... 257

    D.30 Horizontal Rotating Equipment and Driver (E405) ................................................................ 259

    D.31 Vertical Rotating Equipment and Driver (E410) .................................................................... 262

    D.32 E1 Ends (E905) ....................................................................................................................... 264

    D.33 E2 Ends (E906) ....................................................................................................................... 266

    D.34 E3 Ends (E907) ....................................................................................................................... 268D.35 Complex Vertical Cylindrical Equipment (N205) .................................................................. 269

    D.36 Simple Vertical Cylindrical Equipment (N210) ...................................................................... 269

    D.37 Simple Vertical Cylindrical Equipment (N215) ...................................................................... 270

    D.38 Spherical Equipment (N230) ................................................................................................... 270

    8

  • 5/22/2018 edeneqp

    9/312

    Table of Contents________________

    D.39 Complex Horizontal Cylindrical Equipment (N240) .............................................................. 271

    D.40 Simple Horizontal Cylindrical Equipment (N245) ................................................................. 271

    D.41 Horizontal Shell and Tube Exchanger (N305) ........................................................................ 272

    D.42 Kettle Exchanger (N307) ......................................................................................................... 272

    D.43 Vertical Shell and Tube Exchanger (N310) ............................................................................ 273

    D.44 Double Pipe Exchanger (N320) .............................................................................................. 273

    D.45 Plate Exchanger (N325) .......................................................................................................... 274

    D.46 Air Cooler (N330) ................................................................................................................... 274D.47 Horizontal Rotating Equipment and Driver (N405) ................................................................ 275

    D.48 Vertical Rotating Equipment and Driver (N410) .................................................................... 275

    D.49 Gear Cover (U850) .................................................................................................................. 276

    D.50 Round Torus Miter (U860) ..................................................................................................... 278

    D.51 Rectangular Torus Miter (U861) ............................................................................................. 280

    D.52 Vertical Oval Torus Miter (U862) ........................................................................................... 282

    D.53 Flat Oval Torus Miter (U863) ................................................................................................. 284

    D.54 Flat Oval Prism (U870) ........................................................................................................... 286

    D.55 Flat Oval Torus (U880) ........................................................................................................... 288

    D.56 Rectangular 90 Cone Torus with Offset (U881) ..................................................................... 290

    D.57 User Projected Shape (USRPRJ) ............................................................................................. 292

    Glossary ............................................................................................................................................... 293

    Index .................................................................................................................................................... 301

    9

  • 5/22/2018 edeneqp

    10/312

    PDS Eden for Equipment - April 2002________________

    10

  • 5/22/2018 edeneqp

    11/312

    Table of Contents________________

    General Conventions

    This document contains many visual cues to help you understand the meaning of certain

    words or phrases. The use of different fonts for different types of information allows you to

    scan the document for key concepts or commands. Symbols help abbreviate and identify

    commonly used words, phrases, or groups of related information.

    Typefaces

    Italic Indicates a system response, which is an explanation of what the software is

    doing. For example,

    The text is placed in the viewing plane.

    Bold Indicates a command name, parameter name, or dialog box title. Command

    paths are shown using an arrow between command names. For example,

    ChooseFile>Opento load a new file.

    Sans serif Indicates a system prompt or message, which requires an action be taken by

    the user. For example,

    Select first segment of alignment

    Bold Typewriter

    Indicates what you should literally type in. For example,

    Key in original.datto load the ASCII file.

    Normal TypewriterIndicates an actual file or directory name. For example,

    The ASCII report is stored in thelayout.rptfile.

    11

  • 5/22/2018 edeneqp

    12/312

    PDS Eden for Equipment - April 2002________________

    Symbols

    This document uses the following symbols to represent mouse buttons and to identify special

    information:

    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 the

    exercises.

    Keyboard Conventions

    The following list outlines the abbreviations this document uses for keyboard keys and

    describes how to use them in combination. You can make some menu selections through the

    use of keyboard accelerators, which map menu selections to key combinations.

    ALT Alternate key

    CTRL Control key

    DEL Delete key

    ENTER 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

  • 5/22/2018 edeneqp

    13/312

    Table of Contents________________

    Terminology

    Click To use a mouse or key combination to pick an item that begins an

    action. For example,

    ClickApplyto save the changes.

    Select To mark an item by highlighting it with key combinations or by picking

    it with your cursor. Selecting does notinitiate an action. After

    selecting an item, youclickthe action you want to affect the item. For

    example,

    Select the fileoriginal.dat from the list box, then clickDeleteto

    remove it from the directory.

    In addition, you wouldselectitems to define parameters, such as

    selecting toggle buttons. This also applies to selecting graphic

    elements 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 design

    file. If you are using the CLIX operating system, you tentative-select

    by double-clicking with a mouse or pressing on a hand-held

    cursor. If you are using the Windows NT operating system, you

    tentative-select by pressing a left-button, right-button chord.

    Double-click To select and execute a command by clicking the mouse or hand-held

    cursor button twice in rapid succession. This term implies that you are

    clicking the data button () as part of a menu or dialog box action.

    For example,

    Double-click on the fileoriginal.dat to load it into the new surface.

    Drag To press and hold the data button () while moving the mouse or

    hand-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 the

    default action.

    In a dialog box, pressing TAB after keying in data will

    enter the data and move the cursor to the next field.

    13

  • 5/22/2018 edeneqp

    14/312

    PDS Eden for Equipment - April 2002________________

    14

  • 5/22/2018 edeneqp

    15/312

    1.Basics

    The Eden Basics________________

    1. The Eden Basics

    Eden is a high-level symbol definition language modeled on the FORTRAN programming language. It allows

    you 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 it

    easiest for you to read. While you do not need a programming background to write Eden programs, any

    programming experience is highly recommended.

    Most of the symbol definition functions are built into Edens command structure. This high-level command

    structure 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 predefined

    subroutines, calledprimitives, 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 (first

    end) 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

  • 5/22/2018 edeneqp

    16/312

    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 or

    modules 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.0

    accepted = 0

    tutname = E405

    Cstring [29] = E405

    Call Get_Date( Cstring [38] )

    !Do While ( accepted .EQ. 0 )

    Call Display_Tutorial ( tutname )

    Call Put_Field( Cstring [29], 19 )

    16

  • 5/22/2018 edeneqp

    17/312

    1.Basics

    Equipment Symbol Processor________________

    If( LAST_INP_TYPE .EQ. USER_KEYIN ) then

    If( LAST_INP_NUM .GE. 2 .AND. LAST_INP_NUM .LE. 18 ) thenCall User_Function ( E405_CHECK )

    accepted = Dimension [100]

    Elseaccepted = 0

    Endif

    Else

    If( LAST_INP_TYPE .EQ. APPLICATION_CMD ) thenif( LAST_INP_NUM .eq. 4075)then

    Call Display_Tutorial ( H405 )

    accepted = 0else

    if( LAST_INP_NUM .eq. 4074)then

    Call Display_Tutorial ( H200A )accepted = 0

    else

    If( LAST_INP_NUM .eq. 4073)thenCall User_Function (E200)

    accepted = 0

    Else

    If( LAST_INP_NUM .eq. 4072)thenCall User_Function (E201)

    accepted = 0ElseIf( LAST_INP_NUM .eq. 4052 )then

    Call Get_Date( Cstring [1] )

    accepted = 0Else

    accepted =1

    EndifEndif

    Endif

    Endif

    endifelse

    accepted = 1

    EndifEndif

    Enddo

    !

    ! 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

  • 5/22/2018 edeneqp

    18/312

    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 ) thenCall 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 ) thenCall 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 ) thenCall 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

  • 5/22/2018 edeneqp

    19/312

    1.Basics

    Equipment Symbol Processor________________

    Call Move_To_Placepoint ( PP2 )

    STOP

    END

    19

  • 5/22/2018 edeneqp

    20/312

    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 definition

    table 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 field

    name.

    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 values

    include:

    1 = linear dimension

    2 = angular dimension

    3 = integer (no units)

    4 = length for NOZ_LENGTH1

    5 = length for NOZ_LENGTH26 = length for NOZ_RADIUS

    7 = equipment entity database attribute

    8 = nozzle entity database attribute

    9 = field to receive values for CSTRING_x variables

    3. number a table data entry which the system interprets differently for each data

    type:

    For data types 1, 2, and 3, numberis a value that can range from 1 to

    100 defining the global variable DIMENSION_n, which holds the

    fields input. For example, ifnumberis set to 10 in the table, then

    any input into the field is placed by the software into

    DIMENSION_10. The symbol can then refer to DIMENSION_10and use it in any of its calculations. For data types 4, 5, and 6, this

    field is ignored.

    For more information on the Equipment Modeling DDL, refer to

    Appendix C,Equipment Data Definition.

    For data types 7 and 8, numberdefines the attribute number in the

    appropriate database entity to which the field inserts input. These

    numbers 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

  • 5/22/2018 edeneqp

    21/312

    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 , double

    15 , 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 is

    placed. Refer to the model database DDL for a complete description of each attribute in both the equipment and

    nozzle entities.

    For data type 9,numberspecifies the CSTRING variable to receive

    the value.

    4. nozzle a number that identifies the nozzle with which a field will be

    associated. This field is only needed for data types 4, 5, 6, and 8.

    Each nozzle in a parametric symbol must be assigned a unique

    number. (Refer to the DEFINE_NOZZLE and the

    RETRIEVE_NOZZLE_PARAMETERS primitives.) This number is

    the 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 other

    database attributes. The nozzle number allows the software to

    distinguish one nozzle tag input field or one nozzle size input field

    from another.

    21

  • 5/22/2018 edeneqp

    22/312

    PDS Eden for Equipment - April 2002________________

    5. attributes an entry that describes the input field itself. The available values for

    this 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 aterminatedkey-in field.

    Refer to the DISPLAY_TUTORIAL primitive for more

    information on how to handle these fields from the symbol.

    4 - user input is required but causes return to the symbol. This

    is also a terminated key-in field.

    Example:

    A tutorial has a field for which the attribute entry in the tutorial

    definition table contains the number two. You are not allowed to select

    the 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 input

    field. The entry can take on several forms. All of the expressions

    outlined below must be surrounded by single quotes in the tutorial

    definition 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 default

    for this field. Note that user-defined field numbers can range

    from 1 to 200. (System-defined fields range from 201 to 256

    and may not appear in default expressions.) Example: F23

    Dxxx- Use the contents of DIMENSION_xxx as the default for this

    field. There is no practical limit on the number of tutorials that

    a symbol can activate. Therefore, any calculations that were

    made before the symbol definition activated the current tutorial

    can 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 distances

    are assumed to be in English subunits (inches). If the default is

    a metric constant, then the constant should be given a suffix of

    M. Example: 125M

    22

  • 5/22/2018 edeneqp

    23/312

    1.Basics

    Tutorial Definition Table________________

    expr- Combine any of the above three default types to form a valid

    arithmetic expression. Valid operators are +, -, *, /, and .

    Use parentheses to alter order of evaluation. An expression

    is not evaluated until all fields are defined. Example:

    (F1+F2)/2+30. This expression is not computed until both

    fields 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 as

    the default.

    7. name defines an alphanumeric name for the field which will be used in future software

    releases 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 numbers

    951-960 on the form.

    1 = 951

    2 = 952

    3 = 953

    4 = 954

    5 = 955

    6 = 956

    7 = 957

    8 = 9589 = 959

    10 = 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 (rows

    1-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

  • 5/22/2018 edeneqp

    24/312

    PDS Eden for Equipment - April 2002________________

    8, 7, 1, , 1, , EQPNAM9, 7, 2, , 1, , DESCR10, 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, , TAG2

    16, 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. Your

    input 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 place

    the 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, end

    prep). 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 logic

    must calculate them.

    Each nozzle has a default end prep of 21 (nozzle entity, attribute number 5). This is a code-listed attribute

    in the database. The value 21 is the codelist value for a raised face. The default expression can also be

    entered as "RFFE", which is the codelist text for raised face end prep.

    24

  • 5/22/2018 edeneqp

    25/312

    1.Basics

    Forms Interface________________

    Forms Interface

    Forms in equipment modeling serve to collect input via key-in fields or command buttons. They also provide

    feedback 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 data

    entered through the forms serves as the input that defines the values of the global variables used by the symbol

    processor. When a new equipment item is defined through Eden, a form has to be created to define the

    components parameters. DBAccess is used to build forms.

    25

  • 5/22/2018 edeneqp

    26/312

    PDS Eden for Equipment - April 2002________________

    26

  • 5/22/2018 edeneqp

    27/312

    2.Structure

    Eden Language Structure________________

    2. Eden Language Structure

    Eden is similar to the FORTRAN programming language. Therefore, the general rules for evaluating

    expressions in Eden are identical to those in FORTRAN.

    Youdo notneed 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 the

    symbol (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

  • 5/22/2018 edeneqp

    28/312

    PDS Eden for Equipment - April 2002________________

    Beginning Statements

    Beginning statements define the types of modules being entered. Names within the single quotes must be all

    upper case.

    SP - Symbol_Processor 6CHARUF - User_Function_Definition 28CHAR

    Examples

    Symbol_Processor A001

    User_Function_Definition A001_CHECK

    Ending Statements

    Ending statements mark the end of the module in which the system has been processing. Ending statements in

    thesymbolandsubsymbolprocessor include:

    Stop

    End

    Ending statements in the user functions include:

    Return

    End

    28

  • 5/22/2018 edeneqp

    29/312

    2.Structure

    Begin________________

    Begin

    TheBeginprimitive 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. Allowable

    category keywords for each class of graphics include:

    Regular equipment graphics

    EQUIPMENT This is executed at the beginning of symbol execution. It is

    needed if you have placed some other category and want to

    resume equipment graphics.

    Interference envelope graphics

    ENVELOPE_MAINTENANCE_HARD

    ENVELOPE_MAINTENANCE_SOFT

    ENVELOPE_ACCESS_HARD

    ENVELOPE_ACCESS_SOFT

    ENVELOPE_SAFETY_HARDENVELOPE_SAFETY_SOFT

    ENVELOPE_CONSTRUCTION_HARD

    ENVELOPE_CONSTRUCTION_SOFT

    2D footprint graphics

    SHADOW

    Light steel graphics

    LADDER

    PLATFORMHANDRAIL

    MISCELLANEOUS

    29

  • 5/22/2018 edeneqp

    30/312

    PDS Eden for Equipment - April 2002________________

    Holes

    HOLE

    NOHOLE

    The keywords HOLE and NOHOLE are different from other keywords

    in that they do not represent a separate category of graphics. You can

    include Begin(HOLE) within another Begin category. A Begin(HOLE)

    remains in effect across other Begin calls until a Begin(NOHOLE) is

    reached. Hole graphics are given the level and symbology of holes.

    Surface Type

    SOLID

    SURFACE

    The keywords SOLID and SURFACE set the active surface type of

    subsequent graphics. The default is SOLID. This results in capped

    surfaces. With the SURFACE keyword, you can place uncapped

    shapes such as open-ended cylinders.

    Except for nozzles and placepoints, all graphics assume the level and symbology of the last executed Begin

    statement. Placepoints always belong to the equipment/parametric cell. If your symbol executes no

    EQUIPMENT category graphics, an otherwise empty parametric equipment cell is created for housing the

    placepoints.

    ABeginstatement can repeat itself any number of times. After execution, it becomes the active category for

    subsequent element placement calls. A (non-EQUIPMENT)Beginstatement must be followed by at least one

    call to generate graphic elements; otherwise that Beginstatement will have no effect on symbol graphics.

    30

  • 5/22/2018 edeneqp

    31/312

    2.Structure

    Begin EQP Category________________

    Begin EQP Category

    TheBegin EQP Categoryprimitive allows you to create graphics for various EQUIPMENT subcategories each

    having its own level and symbol.

    Syntax

    Begin_EQP_Category (subcategory)

    Options

    subcategory is a character string indicating the subcategory. There are presently 20

    subcategories available. A valid subcategory must be one that has been

    defined via the Project Administrator Module. Alternatively, you can use

    one of the following:

    EQP_CATEGORY_1,

    EQP_CATEGORY_2,

    ..

    ..

    ..

    EQP_CATEGORY_20

    The argument is checked only when you place the symbol and not during

    compilation.

    Restrictions

    You can use this callonlywithin theBegin(EQUIPMENT) call. Also, you cannot make this call whenDraw

    Complex SurfaceorStart Complex Shapeis in progress. By default, the Begin(EQUIPMENT) andBegin

    EQP 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

  • 5/22/2018 edeneqp

    32/312

    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

  • 5/22/2018 edeneqp

    33/312

    2.Structure

    Variables________________

    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 the

    context 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 you

    use 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 is

    truncated.

    A variable used in a logical expression evaluates to TRUE when the value of the variable is 1 and 0 when

    the logical value is FALSE.

    Variables that hold values representing distances are assumed to be in subunits. A variable containing the

    value 25 represents25 inchesin an English unit design file and 25 millimetersin a metric unit design file.

    Be careful when using hard coded numbers or when using the system_of_unitsvariable.

    Local Variables

    Local variables are user defined and declared in the symbol definition. You can refer to a local variable only

    when 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 a

    null value for the misspelled variable at component placement time.

    The Eden language refers to constants as local variables. Both character strings and numeric constants are

    valid; however,character string constants must be surrounded by single quotes. In most cases, character

    strings and constants are case sensitive. Thus,aandAare interpreted differently.

    Examples:

    diameter 13.25

    shell_thickness A TEXT STRING

    projection_1 radius [2]

    25

    33

  • 5/22/2018 edeneqp

    34/312

    PDS Eden for Equipment - April 2002________________

    Only in Pipe Support and Equipment Modeling can you declare local variable types. The variable types default

    to either CHARACTER or REAL depending on the context. To override this default, you can use a local

    variable type declaration statement anywhere before the variable(s) is (are) actually referenced. Variable types

    INT2, R8, and LOCATION are recognized by the compiler.

    Example:

    In the following example, variablesa,B, andCare declared as type short integers. They hold values ranging

    from -32767 to 32767.

    Int2 a

    Int2 B, C

    Example:

    In the example below, variable dis declared as a type REAL, capable of holding decimal fractional values. This

    is the usual default type for numeric variables. However, explicit typing to this category may be necessary to

    declare local arrays.

    R8 d

    As a recommendation, all declaration statements should be placed at the very beginning of the symbol code and

    not interspersed among statements to be executed during symbol placement. This improves program

    readability.

    Also in Pipe Support and Equipment Modeling, referencing a variable using subscripts is extremely useful when

    coding repetitive statements such as the body of a loop. Prior to use, variables must appear in a type declaration

    in which its subscript or index range is also specified.

    Example:

    In the example below, Dis an array of 5 short integer variables stored contiguously. The individual elements

    are referenced as D[1], D[2], D[3], D[4], and D[5]. You can also use a variable or an arithmetic expression for

    indexing, such as D[i] whereiis a value between 1 and 5, or D [i+1] whereiis a value between 1 and 4. INT2-

    typed variables are particularly useful in DO loops and array indexing where integral numbers are necessary and

    roundoffs must be avoided. They are also stored much more efficiently than REAL variables.

    Int2 D[5], EF[6]

    Example:

    Below,LENGTHSis an array of 10 REAL variables. They are referenced as LENGTHS [1] ... LENGTHS [10]

    R8 LENGTHS [10]

    34

  • 5/22/2018 edeneqp

    35/312

    2.Structure

    Variables________________

    Example:

    In the following example,PTis declared as a buffer with four locations.

    Location PT [12]

    where

    PT [1], PT [4], PT [7] PT [10] are x-coordinates

    PT [2], PT [5], PT [8] PT [11] are y-coordinates

    PT [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 array

    is 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. More

    specifically, you can use them for passing values between subroutine levels or for communicating input values

    to the symbol. The following list shows the global variables common to all Eden applications. Refer to the

    application-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 input

    parameters for table lookups. (Input_11 through Input_20 are specifically designed for

    user 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 the

    table lookup are stored. (Output_11 through Output_20 are specifically designed for user

    function 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 communicating

    input to the symbol logic. You can also use these variables for passing values between

    subroutines or simply for local storage. (Dimension_20 is for angle; Dimension_1 through

    Dimension_19 is for linear piping.)

    Pr_Rating_n Variable containing the current item pressure rating value.

    35

  • 5/22/2018 edeneqp

    36/312

    PDS Eden for Equipment - April 2002________________

    Nom_Pipe_D_n Variable containing the current item nominal pipe diameter. This variable contains the

    nominal diameter in coded units. A special primitive is provided to help you convert from

    coded units to subunits.

    Gen_Type_n Variable containing the current item end preparation generic type (BLT, MAL, FEM). This

    is 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 and

    is 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 more

    information on global variables, refer to theSystem-defined Subroutinessection and theEden User Interface

    section.

    Point_n

    Point [n]

    (Point_1 - Point_24) Names representing points that have been

    defined or saved for later use in a symbol definition. Thenin [n]

    can be between 0 and 125.

    Act_Lib Variable that contains an identifier for the active library of

    dimension tables. This is a read-only variable.

    Cstring_n (Cstring_1 through Cstring_40) Names representing global

    character variables. Each name can contain a maximum of 50

    characters.

    Last_Inp_Type

    Last_Inp_Num

    Refer to the Dsplay_Tutorial primitive in the Eden Primitives

    section.

    NPD_Unit_Type Contains the nominal piping diameter system of units defined for

    the model file. You can test this variable against the keywords

    ENGLISH 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 global

    variables, refer to theSystem-defined Subroutinessection and theEden User Interfacesection.

    PP_Location_n (PP_Location_1 - PP_Location_10) Names representing the point

    locations that have been defined as place points in the course of a

    symbol definition.

    36

  • 5/22/2018 edeneqp

    37/312

    2.Structure

    Variables________________

    End_Prep Variable containing the current nozzle end preparation value.

    Noz_Length1 Variable containing the current nozzle length value. This variable

    applies to type 2 and 3 nozzle only. For type 3, the length is from

    the end of the nozzle connected to the vessel to the centerline of the

    bend.

    Noz_Length2 Variable containing the current second nozzle length value. Thisvariable applies to type 3 nozzles only and measures the length

    from the face of the nozzle to the centerline of the bend.

    Noz_Radius Variable containing the current nozzle bend radius. Applies to type

    3 nozzles only.

    Table_Suffix Variable containing the current nozzle table suffix value.

    PP_Primary_n (PP_Primary_1 through PP_Primary_10) Names representing

    orientation of primary axes for place points defined during symbol

    placement.

    PP_Secondary_n (PP_Secondary_1 through PP_Secondary_10) Names representing

    orientation of secondary axes for place points defined during

    symbol placement.

    PP_Normal_n (PP_Normal_1 through PP_Normal_10) Names representing

    orientation of normal axes for place points defined during symbol

    placement.

    Subscripted Global Variables

    In Equipment and Pipe Support Modeling, a global variable can contain an index value as part of the variable

    name 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 a

    variable or as an expression. For example, Dimension [10] and Point [3] are subscripted global variables whose

    index values are 10 and 3, respectively. They are equivalent to Dimension_10 and Point_3. Subscripted global

    variables are useful when using loops. Below is a list comparing the two methods of accessing global variables

    with 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

  • 5/22/2018 edeneqp

    38/312

    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

  • 5/22/2018 edeneqp

    39/312

    2.Structure

    Common Keywords________________

    Common Keywords

    Eden uses keywords for labeling specific values or groups of values. All keywords exceptTRUEandFALSE

    can 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.

    FEMALE

    BOLTED

    PRIMARY

    SECONDARY

    NORMAL

    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_POINT

    POINT_0

    Name representing the location of the active point in the local

    coordinate system defined by the symbol. These names can be used

    interchangeably.

    EAST Keywords used to define directions in the local coordinate system

    defined by the symbol definition.

    WEST

    NORTH

    SOUTH

    UP

    DOWN

    PP1 - PP10 Names representing symbol place point locationsandorientations. A

    maximum 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 in

    the first statement of a symbol definition.

    ENG_COMM_LIB

    EQP_TABLES

    Names representing the different libraries that can be made active in a

    symbol definition.

    RETURN

    STOP

    Terminates module execution normally. If it encounters either a

    RETURN or STOP in a user function, the system returns control to the

    calling module.

    39

  • 5/22/2018 edeneqp

    40/312

    PDS Eden for Equipment - April 2002________________

    END Must be the last line in the symbol source code. If execution reaches

    the END statement, an implicit STOP is executed.

    There are other keywords primarily used in specific subroutine calls. These keywords can be found in the

    subsections that describe their associated primitives. Keywords APPLICATION_CMD and USER_KEYIN are

    described under the DISPLAY_TUTORIAL primitive. Keywords such as PT_BORE and COG_TYPE are

    explained 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 statement

    is:

    #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 thePDS Equipment Modeling (PD_EQP)

    Reference Guidefor information on Parametric Help.)

    A type label can be up to 28 characters long. The compiler automatically left justifies each type and converts it

    to upper case. You can enter any number of complete type labels that fit in a line. Multiple TYPE statements

    are allowed. A TYPE statement can appear anywhere in the source code; however, the # character must appear

    in 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. This

    description appears next to the symbol name when you inquire on the symbol library from the PDS Equipment

    Task. (See thePDS Equipment Modeling (PD_EQP) Reference Guidefor 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 left

    justified by the compiler. When more than one DESCRIPTION statement appears, only thelaststatement is

    used. The # character must appear in column one.

    40

  • 5/22/2018 edeneqp

    41/312

    2.Structure

    Comments________________

    Comments

    When you place an exclamation point (!) anywhere in an Equipment Modeling source line, the remainder of that

    line is treated as a comment.

    Example:

    Call define_placepoint (PP1, POINT_1) ! POINT_1 is used to! define place point 1

    41

  • 5/22/2018 edeneqp

    42/312

    PDS Eden for Equipment - April 2002________________

    Operators

    Operators are used in conjunction with variables to form expressions. As in FORTRAN, operators can be

    anyone of three types:

    1. Arithmetic

    2. Relational

    3. Logical

    Arithmetic Operators

    Arithmetic operators are used to form arithmetic expressions. These operators follow the mathematical

    conventions. 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. The

    concatenation 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 an

    underbar (_) 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), then

    converted to character strings and finally joined together with the underbar character. The concatenation

    operation is generally used to form messages and character field outputs.

    42

  • 5/22/2018 edeneqp

    43/312

    2.Structure

    Operators________________

    Relational Operators

    Relational operators are used to form relational expressions that test the value of an Eden expression or establish

    conditions 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 two

    types of operands for a given operation produces computing errors.

    In character relational expressions,less thanmeansprecedesin the ASCII collating sequence, andgreater thanmeansfollowsin 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 with

    spaces 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. logicalor

    .AND. logicaland

    Periods must appear before and after the expression.

    43

  • 5/22/2018 edeneqp

    44/312

    PDS Eden for Equipment - April 2002________________

    Expressions

    Expressions are variables, constants, and operators combined to make statements. The format of most Eden

    expressions is the same as in FORTRAN. Valid expressions include:

    Replacement simple arithmetic replacementCall executes primitives or subroutines

    Do while execute loop

    Indexed Do execute loop

    If - then - else conditional execution

    For every IF statement, there must be an ENDIF statement to end the expression. You can nest

    up to five If-then-else expressions within an Eden module.

    For theReplacement,Do while, andIf-then-elseexpressions, you can use parentheses to alter the precedence of

    calculation.

    Replacement Statements

    Replacement statements are used to set variables or perform calculations. The following list illustrates the

    various Replacement statements:

    thickness = 25.

    vessel_od = DIMENSION_1

    test = test + 1

    tutor_name = EXCH1

    table_name = BLT // GEN_TYPE // PR_RATING // 5

    dim_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 PT

    buffer, the x-coordinate being assigned to pt [7], y to pt [8], and so forth. Likewise, in the last statement, the

    POINT_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

  • 5/22/2018 edeneqp

    45/312

    2.Structure

    Expressions________________

    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 a

    logical value (either true or false). The body of the Do While statement will be repeatedly executed as long as

    the logical expression remains true.

    Example:

    The following Do While loop places four cylinders end to end. The pretested loop condition fails on the fifth

    try (if i equals 4), and control transfers to the message display routine.

    i = 0

    do while (i .LT. 4)

    i = i + 1

    Call 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 is

    determined by an initial, a terminal, and an incremental parameter of a control variable. The syntax for the

    Indexed Do statement is:

    do V = v1, v2, v3..

    .enddo

    where

    45

  • 5/22/2018 edeneqp

    46/312

    PDS Eden for Equipment - April 2002________________

    V is a control variable (non-string type)

    v1

    v2

    v3

    are constants or variables that evaluate to the initial, terminal, and incremental parameters respectively.

    v3is optional. Ifv3is omitted, the system assumes that the incremental parameter is one.

    V3 cannot be negative.

    Example:

    In this example,Iis set to 1. The body of the loop is then executed. Iincrements by 2 each time the cycle is

    complete, and the value 3 is checked against the terminator 20. The iteration continues as long asIis less than

    or 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 syntax

    is 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 the

    formIf (condition) then. The else statement is optional.

    46

  • 5/22/2018 edeneqp

    47/312

    2.Structure

    Functions________________

    Functions

    Eden provides several functions for performing common mathematical operations. These functions can be used

    within replacement statements.

    The following functions must contain the parentheses.

    DSQRT () square root

    DABS () absolute value

    DSINR () sine of an angle in radians

    DCOSR () cosine of an angle in radians

    DTANR () tangent of angle in radians

    DSIND () sine of an angle in degrees

    DCOSD () cosine of an angle in degrees

    DTAND () tangent of an angle in degrees

    DASINR () arcsine returned in radians

    DACOSR () arccosine returned in radiansDATANR () arctangent returned in radians

    DASIND () arcsine returned in degrees

    DACOSD () arccosine returned in degrees

    DATAND () 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

  • 5/22/2018 edeneqp

    48/312

    PDS Eden for Equipment - April 2002________________

    Primitives

    Primitives are system-defined routines that perform specific functions for symbol definition.

    Convert NPD to Subunits

    TheConvert NPD to Subunitsprimitive 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 as

    NPD 1/32 + 5000. Thus,

    1 inch NPD is 5000 + 32 * 1 = 5032

    20 inch NPD is 5000 + 32 * 20 = 5640

    For Eden symbols in Piping that use imperial and metric files, hard coding the dimensions is not

    recommended. 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. Instead

    of hard coding, load the dimensions in a table to allow the piping software to convert the

    dimensions to the correct values.

    This primitive does not perform unit conversions. If American standard pipe sizes are being used in a Metric

    file, 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 be

    the keyword Nom_Pipe_D_n.

    npd The nominal piping diameter in