question stringlengths 19 6.88k | answer stringlengths 38 33.3k |
|---|---|
Problem Statement: When adding a database link in Aspen SQLplus, after successfully setting up ODBC datasource to a remote database the following error is returned
Modify Link. Access Denied. | Solution: If SQLplus has been added as application security component in Aspen Framework(AFW) / Aspen Local Security(ALS), then:-
In order to add a database link, the Aspen SQLplus System Command privilege must be granted to the user who attempts to add the link through the Aspen SQLplus Query Writer.
Check also that... |
Problem Statement: This knowledge base article describes the cause of the error message:
ORA-12154: TNS:could not resolve the connect identifier specified
Cause: A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a conn... | Solution: This is due to a defect in the Oracle database/driver that is encountered when a 32bit Oracle driver is installed on a 64 bit operating system. The root cause is that 32 bit programs are installed in a directory that has (x86) in the path. The Oracle driver does not handle the parentheses in the path. The Ora... |
Problem Statement: What are the additional software requirements for Aspen Custom Modeler (ACM)? | Solution: In Aspen Custom Modeler, you may need to install additional software in the following two categories:
1) Fortran Compiler: Required for customer development of Fortran procedures
2) Visual C/C++: Required for customer development of C/C++ procedures, or to export models for use in Aspen Plus or Aspe... |
Problem Statement: In Aspen SQLplus reporting, when an SQL Procedure section type is added to the report, the following error message can be seen. | Solution: In order to use SQL Procedure section type, the last line in the procedure must be a SELECT statement such that a table is returned.
For example, the below procedure Proc performs some calculations and writes out the result.
PROCEDURE Proc
LOCAL T REAL;
LOCAL B REAL;
LOCAL PCT REAL;
FOR (SELECT DISTINCT(IP_... |
Problem Statement: This knowledge base article provides troubleshooting suggestions for the following error message that is generated when the user attempts to make an Aspen SQLplus connection to a Microsoft Access database.
Failed to connect to link XXXX
[Microsoft][ODBC Microsoft Access Driver]'(unknown)' is not a va... | Solution: If your MS Access database resides on a Remote machine, then a few unique steps are needed...
Create a 'Sharename' for the directory where the .mdb file exists
However, when creating the ODBC Datasource for Microsoft Access Driver do NOT use a Mapped Drive.
From the first screen click on Select
Then on the ne... |
Problem Statement: Applications such as RDS can set a timeout that is hard to override. | Solution: A new TIMEOUT option has been added to the connection property to allow users to override any timeout specified by an application such as RDS. Adding an F to the start of the TIMEOUT value means that it cannot be overridden by the ODBC client program.
For example:
DRIVER={AspenTech SQLplus};HOST=myhost;TI... |
Problem Statement: I want to model a PID controller which limits the rate of change (move) of the manipulated variable. How can I do that? | Solution: The PIDincr controller in Modeler (and Dynamics) library is a simple PID controller, using the continuous form of the velocity based (or incremental) algorithm. The user can access the code of this PIDincr controller, and customize it if needed (you will need to enable the Custom Modeling license in Aspen Dyn... |
Problem Statement: SQLplus Installation Problems: While adding the components Web Server and Web Service for Aspen SQLplus, user is getting an archive extraction error (Error: 1334). | Solution: Remove Aspen SQLplus and re-install it to solve the problem. Run a second install to then add the Web Service (only if needed, for example if you are using the InfoPlus.21 Health Monitor, which has a dependency on the Web Service.)
To prevent this installation problem, install only:
- SQLplus
- SQLplus Clie... |
Problem Statement: Say I have a structure type:
Structure struct
struct_var as realvariable (fixed);
End
and a model:
Model test
x as realvariable;
s as external struct;
x = s.struct_var;
End
I want to create a model script to access the value of the variable struct_var in the structure. How can I do that? | Solution: The trick is to use the Application object to go back up to the flowsheet, and use the Resolve method to get the structure instance referred to by the external structure declaration.
st = Application.Simulation.Flowsheet.Resolve(s.value)
MsgBox st.struct_var.value
Keywords:
References: None |
Problem Statement: I am trying to customize the stage model as used by Radfrac from the Dynamics library.
copy RadFrac model from Dynamics, Columns to Custom Modeling, Models
copy Stage model from Dynamics, Submodels to Custom Modeling, Models
save the file
When I re-open the file I just saved I get a lot of errors
How... | Solution: The problem is that the Stage model code is placed in the acmf file after the Radfrac code.
When the file is saved the custom model Radfrac is still using the Stage model from the library so when it is saved it does not see a dependency and writes models out in the wrong order. There are several ways you can ... |
Problem Statement: Is there an automation method or property to display the current units set name? | Solution: You can use application.simulation.options.CurrentUOMSet. It returns the name of the UOMSet.
Example (flowsheet script)
msgbox application.simulation.options.CurrentUOMSet
Keywords:
References: None |
Problem Statement: Installation error on a Windows 2003 operating system:
Unable to create Mif File. The filename, directory name, or volume label syntax is incorrect.
Error : 123 | Solution: Unfortunately, Aspen Manufacturing Suite v6.0.1 (and previous) products are not supported on Windows 2003 server.
Keywords:
References: None |
Problem Statement: When using a program or command in an Operating System command from within an Aspen SQLplus query and an error occurs or a dialog window requiring input to continue appears, the TSK_IQ task will hang.
This has been observed when using a .vbs script running various commands, such as sending email, for... | Solution: What you may consider doing is preventing the application from creating this dialog requiring input, so that Aspen TSK_IQ task will not hang.
You may be able to use a command line argument in the program or command executed in the Operating System command window to prevent it from creating the dialog requirin... |
Problem Statement: This knowledge base article explains what happens when a real value is converted to an integer value using a CAST statement. | Solution: When a real value is cast as an integer the decimal portion of the number is truncated. This is illustrated by the following query:
Write 'Real Value: ' || (Select IP_Input_Value from atcai);
Write 'Cast as Integer: ' || CAST((Select IP_Input_Value from atcai) as Integer);
When this query is executed severa... |
Problem Statement: Open NLP solvers for optimization always seem to default to open NLP - reduced space, whereas in previous versions they defaulted to open NLP - full space. Is there an automation method to allow control over the open NLP - reduced space or open NLP - full space options? | Solution: You can do this to select the full space open NLP:
application.simulation.options.optimizer = 7 'Full space
The list below shows the other possible values:
1 -- FEASOPT
2 -- FEASOPT
3 -- Nelder-Mead
4 -- SRQP
5 -- not allowed
6 -- reduced open NLP
7 -- full space open NLP
8 -- Hypsqp
9 -- DMO
We will, in a fu... |
Problem Statement: Where can I find Aspen SQLplus query examples to update the IO_TAGNAME for specified tags in multiple Get records? | Solution: QUERY EXECUTION PRE-REQUISITES:
Recommended pre-requisites that AspenTech Support suggests be completed before running any of the example queries provided below are as follows:
1. Save a backup copy of your Aspen InfoPlus.21 database snapshot before running any of the example queries provided below in thi... |
Problem Statement: Is it possible to call a Visual Basic version 6 program from a procedure? | Solution: Yes, it is possible but a bit technical. The key issue is that Visual Basic programs are not directly callable by C++. ThisSolution applies to version 6 of Visual Basic and Visual C++, not to .NET.
Firstly, your Visual Basic program must be an ActiveX executable or ActiveX DLL. We can then use COM to create a... |
Problem Statement: As explained in KB article 124176, increasing the Desktop Heap Size can help when failures are seen running SYSTEM commands (Windows Operating System level commands) within Aspen SQLplus.
This new article illustrates how to monitor the Desktop Heap Size by using a tool from Microsoft to make sure and... | Solution: One of the reasons that the SYSTEM commands fail in Aspen SQLplus occasionally is because the default desktop heap size that was allocated to the machine may be too small. For more information on how to increase the desktop heap size please refer to the KBSolution 124176
KBSolution 124176
It is recommended th... |
Problem Statement: How to select multiple time stamps for a tag and display results in columns by time stamp | Solution: Formating a query using the Group By clause allows the output to display is columns.
In order to use the Group By clause one of the Set functions must be included in the select statement. In the example below the MIN function is used on the value which does not appear to impact the actual value because there ... |
Problem Statement: I just did a run that uses ACM Homotopy for initialization. Each homotopy step solved fine in 2 iterations, but the step size did not increase. Why is this? Note that I had set the Step Size Increment factor to 2. | Solution: The help for Step Size Increment factor in Homotopy solver options is incorrect. Here is what the help should be.
Step Size Increment Factor
In the Step Size Increment Factor box, you can specify the factor by which a homotopy step increases or decreases following a successful step. The range is any positive ... |
Problem Statement: The error
Unknown function : XXX at line X
(where XXX is the name of the function or procedure) will be returned if the user attempts to access a function or procedure which has just been loaded from an .rld file. This article describes how to make Aspen SQLplus recognize the newly loaded function or... | Solution: If the procedure is run from the Aspen SQLplus Query Writer then restart TSK_SQL_SERVER in the Aspen InfoPlus.21 Manager after the .rld file is loaded into the new snapshot.
If the procedure is run from a CompQueryDef record then restart the TSK_IQ# task which processes the query.
Keywords: Unknown function;
... |
Problem Statement: When I run a Shell & Tube Exchanger case, the calculation stops and gives error message Input Error 1124 - The data input for Number of tube passes is unacceptable. Where does this error come from and how can it be resolved? | Solution: This error due to the user specifying an odd numbers of tube pass combined with a U-tube rear head type. These inputs can be found either on the Input | Exchanger Geometry | Geometry Summary | Geometry tab, Input | Exchanger Geometry | Shell/Heads/Flanges/Tubesheets/Shell/Heads tab or the Input | Exchanger Ge... |
Problem Statement: This knowledge base article describes how to connect to an Aspen SQLplus server without using a data source name. In other words, through a DSN-less connection. | Solution: You can connect to Aspen SQLplus without using the typical System Data Source Name (DSN) configured in
Control Panel | Administrative Tools | Data Sources (ODBC)
Instead use a File DSN. This is a .dsn file located at:
<drive> :\Program Files\Common Files\ODBC\Data Sources
This file contains the connection str... |
Problem Statement: How to list the time parameters of a History Repository using Aspen SQLplus. | Solution: While these parameters are easily viewable from within the Aspen InfoPlus.21 Administrator, there may arise the need to list the Repository time parameters by use of an Aspen SQL Plus query.
Past Time specifies the length of time in the past that values with timestamps prior to the current time can be inserte... |
Problem Statement: What is tearing for procedures? How is it used? | Solution: It is an advanced technique that can be used with procedures. It may improve model robustness and calculation speed. It is used in Aspen Dynamics for the implementation of the local properties models.
In general it is best to avoid using tearing, unless you have enough experience in using ACM.
When tearing ... |
Problem Statement: Executing a query that searches for the last x number of values in the sequence, based on the actual sequence number may produce unexpected results. The problem is that when the history sequence number (histseqnum) reaches its maximum number, it then resets to 0.
What is the maximum value for histseq... | Solution: The maximum value for histseqnum (history sequence number) is 2147483647. Here is a brief history of its usage.
Many years ago, the SETCIM product did use HISTSEQNUM to determine the order of occurrences in history. However, the current real-time database product, InfoPlus.21, does not use this number for ord... |
Problem Statement: What can be done with multiports in VB scripts or Visual Basic (VBA)? | Solution: A Multport is very similar to a regular port.
Properties of ports in the modeling language are exposed as properties of the port object. For example, to access the Flow variable of the Feed port of a block M1 in the flowsheet you can write:
FlowVar = Simulation.Flowsheet.M1.Feed.Flow
For a Multiport you... |
Problem Statement: Error : 1114. Failed to Connect to Link IP21: Specified Driver could not be loaded due to system error 114
What is the meaning of error number 1114, while configuring ODBC OAM Connection through Aspen SQplus? | Solution: This error is returned by Aspen SQLplus, while creating new ODBC OAM Connection to Oracle database, if the system environment variable path was not defined properly.
To resolve this issue, open the system environment variable path' on the computer and update the location of BIN folder appropriately.
Thi... |
Problem Statement: This knowledge base article explains how to select values from multiple Aspen InfoPlus.21 databases through a single Aspen SQLplus query. | Solution: TheSolution is to create an ODBC data source and corresponding external link in Aspen SQLplus for each Aspen InfoPlus.21 database to be included in the query. Include references to those links in the query and the user can select data from multiple databases from within one query. External links to other ODBC... |
Problem Statement: Is it possible to delete and insert repeat area occurrences? | Solution: Two commands, DELOCCS and INSOCCS, allow users to delete occurrences from and insert occurrences into Aspen InfoPlus.21 normal repeat areas.
DELOCCS can be used to delete occurrences from a repeat area. This function takes three parameters.
1. A field pointer to a field in the repeat area.
2. The st... |
Problem Statement: How do you get the date and time of the oldest data in history for a given tag? | Solution: The following select statement returns the oldest timestamp recorded in history for the tag atcai:
SELECT MIN(IP_TREND_TIME) as Start Time from atcai.1;
Keywords: beginning
earliest
References: None |
Problem Statement: How to do a SELECT statement in Aspen SQLplus on a column in Oracle declared as NUMBER(*,0).
In this example the column LRSDATAPOINTID is used as index for the data in the table RSDATAPOINT and is declared as NUMBER(*,0) to represent the largest number field available in Oracle.
This shows how the da... | Solution: In order to get the data to be represented in the same format that Oracle uses, in Aspen SQLplus you should use the CAST function
Keywords: None
References: None |
Problem Statement: What is the purpose of the PRECALL and POSTCALL options in a procedure? | Solution: By default, a procedure is called when ACM requires the calculation of the output variables for new input variables, during the reSolution of the equations of the simulation.
Sometimes you may want to initialize the internal variables of your procedure before the simulation is actually solved. Symmetrically, ... |
Problem Statement: How can I have a script invoked automatically when I run the simulation or step the simulation? | Solution: This is possible in version 2004 and 2004.1, even though it is not documented in the on-line help. The mechanism used is similar to the OnLoadSimulation script (which is invoked automatically when you load a simulation in ACM).
When present, the script OnStartRun is invoked when you click on the Run button. T... |
Problem Statement: How to get a list of all selector records? | Solution: select name from all_records where definition like 'select%'
Here is some additional information from the Aspen SQLPus help file.
The word ALL_RECORDS can be used in the FROM clause of a query. It implies that all records in the database are viewed as a single table. You can use a wildcard in a LIKE clause ... |
Problem Statement: How do Aspen SQLplus and IQ tasks work in multi-threaded mode? What is the difference between single and multi-threaded configurations? | Solution: If you have queries containing WAIT statements, you can set the mode of execution of external query tasks (e.g. TSK_IQ1) to allow multi-threaded query execution so that an external query task can process another query during the wait. Otherwise, one query waiting for minutes or hours would prevent other queri... |
Problem Statement: Aspen SQLPlus queries can be structured to insert data sorted by time so that all data points for a time period are inserted into all tags before inserting data for the next time period. Queries can also be structured to insert data sorted by tag name so that all data points for a tag are inserted be... | Solution: Here are a couple reasons why inserting large amounts of data into Aspen InfoPlus.21 using Aspen SQLPlus is faster when data is sorted by tag name.
Inserting data sorted by tag name allows the query to function more efficiently because is only has to translate the tag names into record id's once per statement... |
Problem Statement: How to filter tags that have IP_TREND_VALUEs with a difference between two consecutive IP_TREND_VALUEs is larger than 50.
For instance, you want to find out which tagshave IP_TREND_VALUEs between 1000 and 10000 and have a difference in value between two consecutive IP_TREND_VALUEs that is larger than... | Solution: 1. Run the following Aspen SQLplus script in the Query Writer to get all IP_TREND_VALUE (range of 1000~10000) of all tags.
Select name, value from HISTORY
where value >1000 and value < 10000;
2. Copy results to Microsoft Excel as shown in the following:
3. In column C, set the function to get the ... |
Problem Statement: How can SQLplus query output be written directly to an EXCEL spreadsheet using a COM object? | Solution: Below are two examples showing how to write to Excel using a COM object.
Example 1: Get an array from Excel - change elements in the array - write the array to Excel.
Keywords: None
References: None |
Problem Statement: An Aspen SQLplus Generic Query is a Query record that can service the needs of many data records.
In other words when any of a series of data records are activated they will cause the Generic Query to be activated.
The Online Aspen SQLplus Help files give an excellent example of the setup, as does th... | Solution: When a Query record is activated normally it will be processed by the external task it references.
When a Query record is activated as a Generic Query it will be processed by the external task passed down by the data record. (TSK_IQ5 in the example above).
As stated, a Generic Query can service many data reco... |
Problem Statement: Aggregate values, such as Average, Maximum, Minimum, are assigned a status of either Good, Bad, or Suspect by Process Data. If more than 1% of the data points in the aggregate time period are bad, the status of the aggregate is marked as suspect. If more than 50% of the data points are bad, the statu... | Solution: select ((good/(good + ng))*100) AS percent good from aggregates
where name = 'Machine State'
and request =0
and ts between '14-oct-05 12:00:00' and '14:00:00'
and period = 2:00;
In this case, the query calculates the good points divided by the total points (good + not good) from the aggregates table... |
Problem Statement: When selecting history data from the repeat area of a record, Aspen SQLplus returns the error:
Disk history not running at line <number>
where <number> is the line number of the query executing the select statement.
For example, the following query:
select ip_trend_time, ip_trend_value from tag1 wher... | Solution: The most likely cause of this error is either a corrupt Aspen InfoPlus.21 archive file set or the history repository contains two or more file sets which have overlapping dates. Use the Aspen InfoPlus.21 Administrator to verify there are no overlapping file sets in the repository.
If there are no overlapping ... |
Problem Statement: Assignments not processed after structural change
See the attached example to illustrate the problem in version 2004.1.
The model TestModel uses the following syntax:
Model TestModel
in_f as input multiport of Fport;
feedset as stringset;
FeedConven(feedset) as yesno;
F as flow_mass (fixed);
... | Solution: Something to be aware of when modelling is that the language is not reprocessed when parameters or sets change unless a dependency is set up. In other words, in our example, the condition is not dependent on ConnectionSet, which is the set that is modified, but only on FeedSet, which is not modified. Hence, t... |
Problem Statement: The standard aggregate function MAX will return the max value but the time stamp will represent the start or end of the aggregate period and not the time associated with the actual value. | Solution: Sample query to return MAX value and time stamp for value using SQLplus.
If you save the sample function below as a proceduredef you will be able to call this function from any SQLplus script.
-- Get_Max_ValueAndTime(Tag Name , StartTime , EndTime , Period)
function Get_Max_ValueAndTime(n1, StartTime timest... |
Problem Statement: Sometimes you want to know which bounds have been modified by the user from the default values of the variable types. Is there a way to list the variables for which bounds have been modified? | Solution: The first option is to create a table with all variables and look for the bounds printed in black. Values in black are those differing from the default value.
The second option is to use a script, with the code shown below, to list the variables in the simulation messages window. The script uses the reset m... |
Problem Statement: Customers use different OPC servers to collect plant data. Is it possible to view OPC server tables and tags using Aspen SQLplus? | Solution: Yes, it is. Download and install an ODBC driver for your specific OPC server (follow the installation procedure supplied by the driver's vendor) and then use the Query Writer to create an ODBC link to the OPC server's database. Please consult Aspen SQLplus help for specific steps needed to create an ODBC link... |
Problem Statement: Can you explain step by step how to create a procedure in FORTRAN and use it in a model in ACM? | Solution: A procedure is a way to perform some calculations and integrate those in the equation oriented model of the simulation. Unlike equations which ACM handles in any direction of information (starting from fixed variables, trying to solve the free variables), the procedure code is implemented in a sequential lang... |
Problem Statement: When updating a field which is a record pointer (the field which has beside the field name) through an SQL statement, it could receive the following error message as below.
Error writing to <recordName> <record pointer field>: Field is not changeable | Solution: 1. The record needs to be made to UNUSABLE state (USABLE = 0).
2. Updating the state of a record from UNUSABLE to USABLE cannot be done with updating the record pointer field in one statement.
UPDATE IOGetDef SET IO_MAIN_TASK = 'TSK_MSIM', USABLE = 1
WHERE name = 'GetRec';
The reason is the record... |
Problem Statement: A query which selects values directly from Aspen InfoPlus.21 can take a long time if a lot of history values are returned and if the data is sufficiently old so that it does not reside in memory. This knowledge base article provides some suggestions to make the query results return more quickly. | Solution: 1. Apply the ORDER BY (ascending) statement to the time stamp column in your query. Due to the way Aspen SQLplus requests the history data, this may make your query a little faster when data is requested directly from history.
2. Query the Aspen SQLplus 'History table' instead of querying the history occurr... |
Problem Statement: What is the meaning of the integration tolerance for the Implicit Euler variable step integration method? | Solution: The absolute and relative integration error tolerance controls the step size. The algorithm controls the step size to keep the integration error within this specified tolerance. The actual integration error is not known for general systems. The absolute and relative tolerances control an estimate of the local... |
Problem Statement: This knowledge base article provides an example of how to extract data from Aspen InfoPlus.21 then write the data to a relational database. The relational database used in this example is Oracle. | Solution: 1. Create a database link to your Oracle database.
a) In the Aspen SQLplus Query Writer click on the 'Tables' icon
b) Click the 'Add Link' button
c) Enter the link name, data source name, user & password
2. Expand the database link that you just created so that it points to the relational database table you... |
Problem Statement: When an Aspen SQLplus web report is run, the results window does not appear. The status bar of the original window displays something to the effect that pop-ups have been blocked. | Solution: Ensure that internet browsers, such as Internet Explorer are set to allow pop-up windows.
Keywords: pop up
block
blocked
References: None |
Problem Statement: How can I prevent a user from seeing the code of my models? | Solution: One way is to use the PRIVATE keyword and create a library. The PRIVATE keyword applies only when the models are in a library, not when they are in the custom modeling folder. The effect of the PRIVATE keyword is to make the model or stream type no longer visible, which means the user cannot see its code. The... |
Problem Statement: A model for a tank with internal weir will be used to illustrate some convergence problems.
The code of the model is as follows.
Model TankWithWeir
Fi as flow_vol (fixed, 5);
Fo as flow_vol;
V as volume (initial, 4);
kweir as realvariable (fixed, 1);
Vweir as volume (fixed, 1);
$V = Fi - Fo;
... | Solution: failure
Solution
The problem is caused by the run time condition when the preset value of V is lower than Vweir. In this case, the solver is stuck on the THEN branch, which causes Fo to be equal to zero. This is not right, as for the steady state case, the outlet flowrate must be equal to the inlet flowrate. ... |
Problem Statement: When writing query output to a text file, it doesn't contain any formating, so if the file is opened in a web page the columns do not line up correctly. | Solution: The example below uses HTML formating to create a text file with a table.
Keywords: None
References: None |
Problem Statement: How to run a query that is activated by a change of state record (COS) query on system startup?
COS queries look at tag values for changes in order to execute, BUT you might need to execute them when the system starts up to ensure the data integrity of the tags they write to. | Solution: 1. Create an sql query that activates the Change of State (COS) querie(s): this query will have the following syntax: ACTTSK 'queryname'
2. Save it as an sql file (my_query.sql)
3. Add a record/TSK in IP.21 Manager to run the sql file: To do this:
a. Using IP.21 administrator, create a... |
Problem Statement: SQLplus does not run on schedule or occassionally skips a scheduled execution. | Solution: Check to see how many queries are scheduled to run under the query task (such as TSK_IQ1). If you have too many queries trying to execute or if you have one or more queries that take a long time to execute, this could cause other queries not to be activated on schedule. If the query runs on schedule most of t... |
Problem Statement: How do I assign a value to a variable using a mathematical expression? | Solution: When defining a variable, it is possible to assign a value to it directly in the variable definition statement. In addition, an expression can be used to determine the assignment value.
For example:
Model Tank
Vol as Volume;
K as Constant(Fixed, 2);
H as Length;
XSArea as Area(Fixed,... |
Problem Statement: This | Solution: provides additional details on how AVG, SUM, MAX and MIN statistics in the AGGREGATES table are calculated. It does not replace any information already available in the SQLplus Help files.
Solution
To run this example, insert the following values (using a current date) into a new tag.Solution 100949 describes... |
Problem Statement: How do I accumulate (or sum) a tag over a long period of time, such as one day? How do I accumulate a tag over a period other than the defined accumulation periods. | Solution: This sample query sums the value for Unit1Flow over the period from the beginning of Aug. 1 to the end of Aug 2. The summation is based on thirty minute aggregate values. In fact, any aggregate period could be used. However, it is best to use the largest value that fits evenly within your time range. For exam... |
Problem Statement: How to activate ODBC Tracing to diagnose ODBC problems. | Solution: ODBC Tracing can assist in diagnosing ODBC problems. Tracing enables continuous dynamic tracing, whether or not a connection has been made, as long as the ODBC Data Source Administrator dialog box is displayed or until you click Stop Tracing Now.
To generate the ODBC trace:
Open Data Sources (ODBC). Go to the... |
Problem Statement: This article describes how to use 3rd party COM objects to access a computer's com ports (ie. com1, com2, etc.) through SQLplus. | Solution: There are a variety of tools available on the internet which allow a programmer to access a computer's com ports through Visual Basic. One of the requirements of a COM object for use with SQLplus is that the COM object called through SQLplus must also be available through VBScript. One such product which inst... |
Problem Statement: How does Aspen Exchanger Design & Rating (EDR) program evaluate the recirculation rate for Kettle (K) type heat exchangers? | Solution: For Recirculation rate; the basis of circulation model is that the internal circulation of the fluid in the tube bundle is driven by the density difference between the liquid in the pool around the tube bundle and the two phase fluid in the tube bundle.
Recirculation ratio will depend upon the pressure drop i... |
Problem Statement: After successfully running an Aspen Shell&Tube Exchanger or Air Cooled Exchanger case, plots of various thermal parameters can be viewed in the results. For example, in the Shell&Tube Exchanger, the plots can be found on Results | Calculation Details | Analysis along shell/Tubes | Plots tab. This | Solution: describes how to customize the format of these plots.Solution
On the plot diagram, if the user applies right-mouse click, then a menu list will appear, where ''Plotting options'' can be selected to customize the format of the plotting output.
A new window - ''Preferences'' will show up, where users can custom... |
Problem Statement: This knowledge base article provides an example which shows how to insert old data into existing records using a record name returned from a SELECT inside a FOR loop. The repeat area already contains existing history data. | Solution: Use the INSERT INTO history method as outlined in the following example.
A text file name data.txt is created in the C:\ drive. This file contains whitespace-separated data in the format shown below:
IPAnalog_t 14-DEC-06 09:00:00 20.0
IPAnalog_t1 14-DEC-06 09:01:00 4.0
Below is the Aspen SQLplus query that wi... |
Problem Statement: This knowledge base article outlines the general steps you can take if you need to write an Oracle query which reads data from an Aspen InfoPlus.21 database. | Solution: Oracle queries are run in the Oracle database server environment. You must use an Oracle gateway in order to run a query within an Oracle environment which accesses a remote, non-Oracle database. Information regarding the available Oracle gateways for non-Oracle databases can be found here:
http://www.oracl... |
Problem Statement: This knowledge base article describes how to work around the error
Microsoft.Data.Odbc.OdbcException: ERROR [HY000] [AspenTech][SQLplus] Error reading definition record (ID=1) fixed fields: Access Denied
which is generated when reading data from an Aspen InfoPlus.21 database through an application... | Solution: This error message is due to a security restriction either through Aspen InfoPlus.21 database security or through Aspen SQLplus security. To resolve this error please follow these suggestions.
1. If Aspen InfoPlus.21 database security is used, ensure that the account under which the application or web servi... |
Problem Statement: This knowledge base article describes how to select an extrapolated value using Aspen SQLplus. | Solution: Select from the History table with Stepped =1 and Request = 6 to request extrapolated data values.
Sample data set:
10-Oct-07 16:00:00.0 999
10-Oct-07 15:00:00.0 888
10-Oct-07 14:00:00.0 777
Local t Timestamp;
t='11-oct-07 09:59';
Select TS, Value From History Where name = 'TestRec' and TS between t and... |
Problem Statement: New in version 2004, it is possible to copy the specifications (free/fixed/initial/rateinitial) and the value of parameters stored in a snapshot or a result. How can I do this with the automation, i.e. the CopyValues method? | Solution: The documentation of the automation method CopyValues didn't get updated for version 2004.
Application.Simulation.Results.CopyValues has two forms:
CopyValues aResult
This copies the values of all the variables in the same way as the CopyValues button on the Snapshot Management dialog, and does not copy the p... |
Problem Statement: The REPLACE command does not replace the string as expected if using variables for A,B,C..
REPLACE(A [WITH B] IN C) | Solution: The replace command is CASE SENSITIVE so make sure the values used are the correct case.
Keywords:
References: None |
Problem Statement: How to monitor different clients connections that are connected to SQLplus Server (TSK_SQL_SERVER in Aspen InfoPlus.21)? | Solution: The SQLplus Query Writer provides a mechanism to monitor the client connections to the SQLplus Server. This tool can only be used with multi-threaded SQLplus server which means that TSK_SQL_SERVER should run the sqlplus_server.exe executable.
Following is the notes from Aspen SQLplus help file that gives a de... |
Problem Statement: Is there an implementation in Aspen Custom Modeler (ACM) of flux limiters, such as used for strongly hyperbolic partial differential equation systems? | Solution: The example shows how one can use flux limiters such as van Leer, Superbee, Smart, minmod for a single dimension domain. Note however that the formulation in this example is rigorous only for linear systems (constant coefficient).
The files attached contains a model of fluid flow (1D) through a heated pipe.
T... |
Problem Statement: How to avoid indeterminate variables? | Solution: You may check if you really need to do it, for example if you observe convergence problems which you can trace back to indeterminate variables. A symptom of this is solver messages referring to indeterminate variables. This is because the modified model will be less obvious for the casual user.
TheSolution ... |
Problem Statement: How can one use the SYSTEM command in SQLplus to start and stop Windows OS services? | Solution: Utilize the following syntax:
SYSTEM 'net start servicename';
SYSTEM 'net stop servicename';
where servicename is the name of the service.
--- Examples ---
To stop the AspenTech Calculator Engine service:
SYSTEM 'net stop AspenTech Calculator Engine';
To start the Print Spooler service:
SYSTEM 'net start sp... |
Problem Statement: Usually I can write the following to inititalise the derivative of a variable to a certain value in a model:
V.spec: rateinitial;
V.derivative: 0.0;
What is the appropriate syntax to set the rateinitial condition for a distrubtion? | Solution: The syntax is the distribution name followed by value, followed by derivative, e.g. T.value.derivative. The syntax T.derivative is not correct.
The example below shows the heat conduction in a rod. The boundary conditions are on the left side is of Neumann type (boundary condition that specifies the values of... |
Problem Statement: How to set the reschedule interval with the D option using Aspen SQLplus? | Solution: Use a minus - sign before the interval time. The minus - sign has a special meaning when used for this field and sets the D flag. Here is an example.
UPDATE ScheduledActdef
SET reschedule_interval = -10:00
WHERE name = 'testsch';
Keywords: None
References: None |
Problem Statement: How much memory is required to run a simulation in ACM? | Solution: The memory usage for ACM is a complex function of the number of variables, the number of equations, the density of the problem (the number of non-zero elements) and on whether physical property procedures are being used, amongst other factors.
As a rough approximation, the total memory required to run a simul... |
Problem Statement: What is controlling the value of the report date in Aspen SQLplus Reporting? | Solution: When creating a new report using Aspen SQLplus Reporting, normally a title section would be created. Below is an example of a simple definition of this title section.
Using the Layout drop down window you are presented with several options: Text, Title with End Time, Title with Start Time, Title with Time Ran... |
Problem Statement: This | Solution: explains the way to compute Median for a set of values and for a specific tags with sample script using Aspen SQL+ .Solution
median is described as the number separating the higher half of a sample from the lower half.
The median of a finite list of numbers can be found by arranging all the observations from ... |
Problem Statement: This knowledge base article explains how the SQLplus ODBC driver fetches data from the SQLplus server. | Solution: The SQLplus ODBC driver fetches data from the SQLplus server in 4k byte messages. So, if a row of data was 40 bytes, the fetch of the first row actually reads 100 rows from the server. The fetch of the next 99 rows doesn't cause a read from the server. Moreover, the SQLplus ODBC driver reads data from the SQL... |
Problem Statement: Can I model the horizontal thermosyphon reboiler with a K shell? | Solution: No, you cannot model the horizontal thermosyphon reboiler with a K shell. The reason why a K Shell is not supported in Thermosyphon mode is because the Aspen Shell & Tube Exchanger thermosyphon option assumes that the vapor and liquid leave from the same nozzle and flow via pipe work to the column. In K-shell... |
Problem Statement: How can I test the syntax of a query before I execute it against an Aspen InfoPlus.21 database? | Solution: Enclose the whole query within a dummy function. When you are satisfied that there are no errors, remove the Function definition.
Example:
Function Test
UPDATE IP_AnalogDef
SETA IP_Value_Format = 'F7.2'
WHERE Name LIKE 'Test%';
END;
Execute the query. No updates will be made to the database.When you have ... |
Problem Statement: How can you tell the exact number of tags in a repository? | Solution: Use a query for each definition type: select count(*) from ip_analogdef where ip_repository like 'tsk_dhis';
========================================================
local myTotal int;
myTotal = (select count(*) from ip_analogdef where ip_repository like 'tsk_dhis') +
(select count(*) from ip_discretedef whe... |
Problem Statement: Is there a list of the variable types defined in Modeler library? | Solution: Yes, please see the file attached.
Keywords:
References: None |
Problem Statement: This knowledge base article explains how to resolve the following error message which is encountered when attempting to use a SELECT statement on a temporary table.
SELECT...INTO table is not a local table at line X | Solution: The INTO clause on the SELECT statement will write the results of the query to a record which means that the record must be available in the Aspen InfoPlus.21 database. However, a temporary table only exists in memory and is local to the process executing the query. The temporary table will only exist as long... |
Problem Statement: Using ACM 12.1 to try to export a model as Model installation package (.msi file), the following error message is issued in ACM:
Compiling REACTOR.cpp
REACTOR.cpp
C:\Program Files\AspenTech\AMSystem 12.1\bin\..\Procedures\ambasicexports.h(35) : fatal error C1083: Cannot open include file: 'fstream.h'... | Solution: This happens if you have .NET 2003 compiler installed on your machine. You have to install the most recent ACM cumulative hot fix., as this problem has been addressed (see Item 12.1.1.15 in list of problem fixed in CH)
Keywords: CQ135742
Visual C++
msi
References: None |
Problem Statement: I would like to create a very simple Excel interface to ACM. The spreadsheet will consist in one sheet with two columns where the user can set the value of selected fixed variables, and another two columns where selected variables will be displayed after the run. Can you give me a simple example of h... | Solution: There are three things we need to do:
open the simulation file
run the simulation
access variables
To open the simulation, we can use the GetObject method. It returns an object which gives access to the ACM application automation methods. Once we get this object we can invoke ACM automation methods and proper... |
Problem Statement: REFPROP is an acronym for REFerence fluid PROPerties. This model, developed by the National Institute of Standards and Technology (NIST), provides thermodynamic and transport properties of industrially important fluids and their mixtures with an emphasis on refrigerants and hydrocarbons, especially n... | Solution: describes when the property method may be used.Solution
REFPROP in the Aspen Physical Property System includes 84 pure fluids:
? The typical natural gas constituents methane, ethane, propane, butane, isobutane, pentane, isopentane, hexane, isohexane, heptane, octane,nonane, decane, dodecane, carbon ... |
Problem Statement: Why did my kettle dry up?
What do I do about the 'Results Warning 1382'?
Results Warning 1382: The heat load for the kettle reboiler or flooded evaporator is too high for specified flow, and evaporation to dryness.... | Solution: The warning pretty much explains what is happening. You can take the following action(s) to solve the problem.
1. Force the outlet vapor fraction of cold stream to be less than 1 (0.999, for example).
2. Reduce hot side flow rate and/or increase outlet temperature / vapor fraction.
3. Increase cold stream flo... |
Problem Statement: Why does my U-bundle exchanger have a bigger area then expected? | Solution: Aspen Shell & Tube Exchanger includes by default the U-bend in the heat transfer area. To not consider this area, the user can change the default setting from Program Options | Thermal Analysis | Heat Transfer datasheet by setting the value for field U-bend area will be considered effective for heat transfer ... |
Problem Statement: For both the Hot and Cold streams, the Application flag can be set to either; Liquid, no phases change, Gas no phase change or Vaporization/Condensation. The online help for the input item (reached by pressing F1 when the item is selected) explains that the item is used to specify some of the default... | Solution: describes the consequences of using the flag with properties generated from one of the internal physical property databases.Solution
When a Physical property package is used to select component(s) then property data can be calculated as given in the Input | Property Data | Hot/Cold Stream Properties | Propert... |
Problem Statement: Why does the Actual Baffle Cut reported differs (does not corresponds to its Nominal cut value) with specified Baffle Cut in Input | Exchanger Geometry | Baffles? | Solution: Selected option (YES or NO) for Input parameter Align Baffle Cut with tubes in Input | Exchanger Geometry | Baffles affects actual Baffle Cut reported by the program and as a result it can also affect the tube layout.
Selecting Yes will result in the program adjusting the baffle cut % so that the baffle cut... |
Problem Statement: How do I select tube materials for Aspen Shell & Tube Exchanger? | Solution: The tube and shell materials can be specified from Input > Construction Specifications > Materials of Construction. See the screenshot below.
The material specifications can also be found from Databank Search.
If the materials of construction is not available in the databank then the users can select User Def... |
Problem Statement: Sometimes, Aspen Shell & Tube Exchanger (Aspen TASC) can not match the results with your manufacturer data. If you have condensing curve data from manufacturer, you could use it to calibrate your results. | Solution: In order to use your own data, you have to make sure that User Specified option is chosen.
First, you need convert your heat duty into specific enthalpy. As we know, the heat duty is the difference of two points' enthalpy. We can always calculate the enthalpy from the same reference point. You can choose any ... |
Problem Statement: How to populate a variable based on the result of an oracle function. | Solution: The EXECUTE command executes a general statement against a linked relational database. The statement does not need to be supported by Aspen SQLplus and can be specific to the particular relational database type being linked to. For example:
EXECUTE statement ON link_name;
The EXEC command executes a general s... |
Problem Statement: Some customer have expressed an interest in displaying an ISO date/timestamp string into an IP.21 date/timestamp format | Solution: Here's an example script:
--cast an ISO format timestamp to an infoplus.21 timestamp.
Local myiptime timestamp;
myiptime = cast('2005-03-18T07:30:31' as timestamp format 'YYYY-MM-DD HH:MI:SS');
write myiptime;
Keywords: ISO
References: None |
Problem Statement: How do I create user-defined Excel templates? | Solution: EDR provides the user with a flexibility to create Excel templates from blank files.
Open Excel to create a new .xltm file. Drag and drop the results from the EDR file.
Drag and Drop function can be customized from Tools-> Program Settings.
Keywords: Drag and drop, Excel template, EDR
References: None |
Problem Statement: When trying to use bookmarks on a SQLplus connection, the following message can be returned:
800AOCB3 - Current Recordset does not support bookmarks | Solution: The way around this is to specify the the cursor type as adOpenStatic and the CursorLocation property of the recordset as adUseClient.
Here is an example program which works with bookmarks:
Option Explicit
Private Sub Command1_Click()
Dim rs, rowcount
Set rs = CreateObject(adodb.recordset)
rs.cursortype = ado... |
Problem Statement: This sample program shows how to create a simple ASP.NET Web application that uses the .NET OdbcDataAdapter object to read data from InfoPlus.21 using SQLplus. | Solution: Follow the steps below to create the application. The code is also attached to the knowledge base article.
Launch Microsoft Visual Studio .NET
Select File | New | Project
Select a Project type of Visual C# Projects
Select the ASP.NET Web Application Template
Type a Project Name and click OK
An empty WebForm w... |
Problem Statement: This query:
local a timestamp;
a = (select ip_trend_time using 'ts25' from atcai.1);
write a;
Returns:
09-MAR-04 07:33:35.3
The 'TS25' part of the query is ignored as local variables do not remember a format.
This query works in version 6.0.1 but not in 5.0.1:
local a timestamp;
a = (select ip_tre... | Solution: --------
local a timestamp;
a = (select ip_trend_time using 'ts25' from atcai.1);
write cast(a as char using 'ts25');
Returns:
09-MAR-04 07:33:05.300000
This works in 5.0.1 as well as 6.0.x.
Keywords:
References: None |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.