100% found this document useful (3 votes)
796 views34 pages

11 AppendixA AspenCalc

Uploaded by

ursimmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
796 views34 pages

11 AppendixA AspenCalc

Uploaded by

ursimmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 34

Aspen Calc™ and

Plant Application Records


InfoPlus.21 Foundation Course

©2004 AspenTech. All Rights Reserved.


What is Aspen Calc?
• InfoPlus.21 layered application

• Allows you to specify calculations via GUI

• Allows libraries of functions and standard calculations to be built up

• Allows calculations to be defined many different ways (for example,


CalcScript, Visual Basic Scripts, Excel spreadsheets)
• Calculations can be executed on:
– Demand
– A locally defined schedule
– An event within the InfoPlus.21 database

©2004 AspenTech. All Rights Reserved.


Starting Aspen Calc
• From Windows Start Menu

©2004 AspenTech. All Rights Reserved.


Defining a New Calculation

Right-Click

SumRawFlow

Sums of Flows from 3 Raw Material Silos

©2004 AspenTech. All Rights Reserved.


Selecting a Formula
An easy-to-use scripting language
proprietary to Aspen Calc

Could have
list of custom
libraries here

©2004 AspenTech. All Rights Reserved.


Defining a New Formula

TotalRawFlow=RawFlow101+RawFlow102+RawFlow103

©2004 AspenTech. All Rights Reserved.


Defining Calculation Inputs and Outputs

To Bind Variable Name to a Specific Record,


Drag and Drop Record Name from Tag
Browser Onto Variable Name In Aspen Calc

©2004 AspenTech. All Rights Reserved.


Values Bound to InfoPlus.21 Tags

©2004 AspenTech. All Rights Reserved.


Defining Calculation Parameters: Alternative
Method

Double-Click

©2004 AspenTech. All Rights Reserved.


Engineering Unit Conversion
Engineering Units can be
specified/converted using the
Engineering Unit Conversion utility

©2004 AspenTech. All Rights Reserved.


Completing New Calculation/Security

©2004 AspenTech. All Rights Reserved.


Viewing/Testing/Editing Calculation

Right-click

©2004 AspenTech. All Rights Reserved.


On Demand Calculations
• Aspen Calc has two types of On Demand Calculations

On
OnDemand
DemandCalculations
Calculations

Ad
AdHoc
HocCalculations
Calculations Stored
StoredCalculations
Calculations
Allows client-side, “on-the-fly” Allows you to use calculations
calculations to be created in applications created in Aspen Calc, saved as a
such as file and then used in other applications
Process Explorer such as
Excel Add-In SQLplus
SQLplus Web.21
Process Explorer
Tag Browser
©2004 AspenTech. All Rights Reserved. Excel Add-In
Creating an On Demand (Stored) Calculation

©2004 AspenTech. All Rights Reserved.


On Demand Calculation Details

DemandTest

On Demand Test Calculation

Litres
Data Source used for
these inputs

ATCL101 + ATCL102 + ATCL103

©2004 AspenTech. All Rights Reserved.


Creating A Data Source
• Before the On Demand Calculation can be used in an
application, a new Data Source must be configured that
contains an Aspen Process Data (Calc) Service
Component

©2004 AspenTech. All Rights Reserved.


On Demand Calculation Example

©2004 AspenTech. All Rights Reserved.


Ad Hoc On Demand Calculation Example

©2004 AspenTech. All Rights Reserved.


Help is at Hand
• At every stage, context sensitive online help can be summoned by
clicking the Help button or pressing F1 key

©2004 AspenTech. All Rights Reserved.


Calculation Properties/Test Mode

Right-Click

©2004 AspenTech. All Rights Reserved.


Scheduling Calculation Locally

Drag and
Drop

©2004 AspenTech. All Rights Reserved.


Editing a Schedule

Right-Click

©2004 AspenTech. All Rights Reserved.


Adding a New Schedule
Right-Click

EveryMonday

©2004 AspenTech. All Rights Reserved.


Triggering Calculations from Database Events
• Calculations defined on client can be triggered automatically by
InfoPlus.21 database activity
• Records defined by AspenCalcDef TSK_CLC1
are used

InfoPlus.21 Database Aspen Calc Client

Calculation

AspenCalcDef
record
Tag
Record
COS field pointer

©2004 AspenTech. All Rights Reserved.


Event-Driven Calculation Example

©2004 AspenTech. All Rights Reserved.


Other Possibilities
• Formulas can also be created in Excel, Visual Basic, or as COM
objects
• Different calculations can use the same formula
• Calculations can use data from:
– InfoPlus.21
• Current values
• Historical values
• Aggregates
– Result Sets for SQL statements executed via ODBC
– Other calculations
– Active-X objects

• Aspen Calc clients can access other Aspen Calc client’s calculations

©2004 AspenTech. All Rights Reserved.


Web Links
• Aspen Calc can become central tool for enterprise wide information by utilizing built-in
links to internet or intranet pages
• AspenTech support pages can be easily reached

• Your own Intranet links can be incorporated to give access to enterprise-wide data

©2004 AspenTech. All Rights Reserved.


Aspen Calc CBT
• An Aspen Calc
CBT program is
available from
Aspentech
Customer Training
• The entire CBT
course is designed
to take 9 hours
• Visit the
AspenTech
Training Web site
for details and to
view a demo of
this product

©2004 AspenTech. All Rights Reserved.


Aspen Calc Review
• Allows users of all skill levels define or use calculations
• Provides a safe environment for ad-hoc testing and a secure public environment
where calculations and formulas can be shared throughout the enterprise
• Calculations can be defined via:
– CalcScript formula (described in this module)
– Microsoft Excel spreadsheet
– Visual Basic Script
– COM objects (hence Visual Basic, Visual C++, Java)

• Data for calculations can come from InfoPlus.21, Active-X sources (including
relational databases) or from other calculations
• Calculations can occur:
– At locally specified time intervals
– On demand
– On an event inside InfoPlus.21 database

©2004 AspenTech. All Rights Reserved.


Aspen Calc Lab
• In this lab, you will:
– Create an Aspen Calc calculation to calculate and store the
total flow of Raw Materials to the mixer in the AspenChem
Simulation
– Test the calculation in “safe” mode
– Enable the calculation
– Schedule the calculation locally

©2004 AspenTech. All Rights Reserved.


Lesson Overview
• Plant Application Records

©2004 AspenTech. All Rights Reserved.


Uses, Advantages, Disadvantages
• Uses of Plant Application Records:
– General purpose storage area
– Trivial calculations
– Database logic operations
– Sequencing database events

• Advantages of Plant Application Records:


– Part of core product: requires no layered products
– Fast to execute
– Can execute on schedule or events synchronized with database

• Disadvantage of Plant Application Records:


– Difficult to write and maintain if “PlantAp” language is used

• Alternatives:
– SQLplus queries can perform same functions and more
– Aspen Calc calculations
– Derived Tags (if Scan.21 is used)

©2004 AspenTech. All Rights Reserved.


Plant Application Record Overview
Structure Overview Example

Self Activation Area:


Multiple Schedules
Multiple COS

Data Storage Area:


1 repeat area for
each data type

Logic Area:
Repeat area with
sequence of logic
statements
©2004 AspenTech. All Rights Reserved.
T

PlantAp Logic Example

R1

90.0
9.0 RX when X=2

RX when X=-1
RX when X=-2

Copy contents of RX into R1


Divide contents of R1 by RX
Copy contents of R1 to RX
©2004 AspenTech. All Rights Reserved.

You might also like