> Defining Formulae

Define generic formulae to establish any calculation that produces a minimum or maximum critical value for an inspection point aspect combination or any calculation with entered monitored data, and then identify where Datastream 7i executes those formulae. First define the actual formula, and then define parameters used within the formula. Datastream 7i calculates formulae with SQL statements defined for the parameter.

Follow these steps to define formulae.

  1. Open the Formula definitions form (IXFORM).

  2. Click the Record view tab. Datastream 7i displays the Record view page.

  3. Formula ID—Enter a unique code identifying the formula, and then enter a description of the formula in the adjacent field.

  4. Class—Click to select the class of the formula. The classes shown belong to the FORM entity.

  5. Formula—Enter the actual formula using codes to identify parameters. For example, to calculate minimum allowable thickness (MAT) for a cylindrical shell using design pressure (DP), actual outside diameter (OD), and nominal design stress (NDS), enter the following equation:

   All parameters must have a dollar sign prefix ($), and parameters must be contained within single quotes (‘).

$MAT = $DP * $OD/ (2 * $NDS + $DP)

To create parameter codes immediately, click Verify parameters. Datastream 7i verifies that the parameter codes exist. If they do not exist, Datastream 7i asks if you want to create a new parameter. Click OK, and then enter information about the parameter on the Parameter page.

You can also create parameter codes immediately by entering the code identifying the parameter in Parameter in the lower section.

Formula also contains a list of these predefined parameters such as :OBJECT, :OBJECTORG, and :ASPECT.

  1. Choose File | Save from the menu bar. Datastream 7i saves the information to the database.

  2. Click the Parameter tab. Datastream 7i displays the Parameter page and the parameters associated with the formula.

  3. Description—Enter a description of the parameter. Then, in the middle section of the form, enter the SQL statement required to calculate or retrieve the parameter value. Click Validate to check the accuracy of the SQL statement.

  4. Choose File | Save from the menu bar. Datastream 7i saves the information to the database.