FORMULARY Tutorial
for PSION System 5
Author: (C) Peter von Walter; 23.8.2001
email: vwalter@physi.uni-heidelberg.de
www: http://pi.physi.uni-heidelberg.de/~vwalter/my/Homepage.html
Start the Program
The next 'About' dialog shows some information about the author, registration and how long the DEMO will be valid. You could go with ENTER to the registration but for now..
The program works with a standard database file for all unit conversions. You can edit, extend or rewrite this database file to your needs. For your convienience the provided example file
"C:\Documents\Formulary\UNITS"
will be selected automatically.
You are now ready to work with the program as a universal symbol calculator by entering expressions, equations and formulas into the entry field below.
Opening Records
Simply entering a name or symbol without a preceding number searches the database for a record with this name and opens the found record as a table.
With the provided example file 'UNITS' it will find and open a dialog which shows the basic conversions for 'inch'. This record is actually written for unit conversion (see later) but will be presented here as a table and allows you to enter any value in any line for recalculation.
NOTE: This previously opened record is for now the 'current' record and can be reopened with the menu command 'Record/Open' or simply ENTER with an empty entry, or..
The current record will be shown as entered in the database.
Try again with some other records like 'ounce'. Note also the different domains (us, imperial, apothecaris, troy, ..). Experiment with the menu 'Record' and the items 'Group' and 'Select' to get an overview of your database for conversions and which help you to enter the unit names. Experiment with the powerful 'Find' function. Always press ENTER after selecting!
This immediately opens the current data base UNITS with the DATA application and allows you to inspect, to edit or to add and delete records at your will. But use it now only for a short browse through the data base! A good practice might be to look for the data record 'inch' (or 'ounce'), previously opened, and to see how it really looks like!
IMPORTANT: Always exit the DATA application first, before entering another program!
Simple Conversions
This is the entry of an expression and does not open a dialog but tries to solve the expression. As you did not enter the target unit you ask implicitely for the standard units (SU), in this case 'meter' and this gives the equivalence of '0.9144 m'. The completed equation will be recorded in the log window.
This is an entry of an equation. As you ask explicitely for the equivalence in 'inch', the system will calculate '36 inch'. Got the idea!?
Try some more, like '3 yard=inch' or '1 lightyear=foot'!
Complex Conversions
This shows how the program handles derived units like areas and the prefixes 'c'='centi'=1/100. Note, that derived units do not have to be in the database, they always will be calculated by the program itself from the basic units.
Obviously both sides of the equation are NOT compatible, You can not convert a speed to a length. In this case the program always tries to solve the equation by complementing the missing units. Therefore the answer is '0.00568182 mile s-1' and the equation is formally correct.
Try any expressions on both sides of the equation. Note how the program searches through the database for resolving dependent units.
Complex Expressions
You are allowed to add/subtract different units from each other. Of course you only can add/subtract units of the same dimension. It does not make sense to add 'inch' to 'sec', does it?!
Please note, that evaluation is strictly from left to right and 5h is equivalent to 5*h! Therefore this equation is actually equivalent to '(100mile/5)*h! This is a common mistake and you have to put 5h in brackets to get the correct (anticipated) answer.
Target Evaluation
REMEMBER: If not given an equation but simply an expression, the program assumes by default that you want evaluation to Standard Units! This could be changed in the calculator preference "Target Unit=Entry" (Do not change it for now!). In this case the program always tries to resolve to the initial units.
NOTE: You always can temporarily select the alternate mode by pressing 'Cntrl-Enter'! This can be very handy as shown in the following examples:
But:
Time and Date functions
Date format='day.month.year'; Time format='24hour:minute:second'.
Standard Unit for date and time is seconds since '1.1.1970 0:0:0'. If you want convert to a date use '=..', if you want convert to a time use '=::'!
You have added 1000 days (of course Y2K compliant!) to the date 1.Feb.1999.
You subtracted 60 seconds from a date and time!
If you omit any information, the program fills it with the current date and time information.
This is the current date and time.
Functions and Constants
You can use all standard functions and constants which are available in OPL (Menu\Functions). Of course, any specific constants can always be added through the database (e.g. 'electron').
Auxiliary builtin functions are:
NOTE: If you have to enter a pair of brackets either after a function name or elsewhere in the formulary, simply Press Cntrl-B, e.g.
OPL Function Extensions
FORMULARY can be extended by any function or even programs with compiled OPL files.
The provided file 'C:Documents\Formulary\Extension.opo' should be loaded by default!
Plotting a function
This means, you want a plot of the function y=x**2 in the range from
x=-10 to 10. As you did not define the value range for y, the program evaluates the range automatically (autorange) and finally plots the function. Note, that the program added the range for y in the entry field!
In this case you explicitely determined the value range for the ordinate. The function will be plotted accordingly. 'Value' and 'k' are just labels and will be printed on the chart.
As the x and y ranges are the same you can plot the new function into the same chart as an overlay.
A flashing cursor will show you the selected point on the (last) curve. The corresponding function value appears as a number in the entry window.
Always the last function you have plotted is now also available as a calculator function (see also in Menu\Functions the new function!):
A flashing cursor shows you the point on the curve!
See in the calculator window how your tapped and called function points are logged!
Using the Find function
The Menu function 'Find' is very simple to use but powerful. Here are some examples:
This will search for the record with the exact match in name with 'inch'. Actually there is none, because the name of the record 'inch' also contains alias names. The program will then add automatically wildcards to the end (and then to the beginning) of the string to search for substrings. It builds up an according list of all matching records. If there is only one, as here, the name of the record 'inch' will be immediately copied to the entry field.
The search will come up with a list of all records, which contain the substring 'inch' in any field.
After selecting a record, the name of the record will be copied into the current cursor position in the entry field. Use ENTER to evaluate afterwards.
The find function will be automatically invoked if your entry into the entry field will not succeed in the first run.
Evaluating a Table
A table is a record with different corresponding units with according example values or according value ranges.
See the corresponding values for all other lines!
Try some of the other tables (e.g.'Temperatur_Table') in the database and browse with File/Edit to see how these table records are constructed. You can build up a table also with equations, see 'Temperature' as an example for this!
Evaluating an Equation
An equation record represents a formula with solution transformations for all variables. You enter all independent variables and choose the one dependent variable for evaluation.
This record 'Cone' describes the known formula V = 1/3 * r**2 * pi *h for the volume of a cone.
Additionally the formulas for coat surface and total surface areas are given.
You will be presented with a new dialog 'Evaluate', which allows you to select either Volume or Height to be calculated. As the program only remembers the last entry (radius) two choices are left.
Radius and Height are used to calculate Volume. M and O are also recalculated!
Plotting an Equation
Use the 'Cone' record as an example.
A new dialog 'Plot' opens, which allows to choose one of the four (from r) dependent equations.
Note that also M and O can be selected now.
After a short time for evaluating the range of M (autoranging), the function will be plotted.
Note the ranging and labeling of the graph.
Watch the entered range for the calculated variable M! You could change this manually and plot again to produce a graph exactly according to your needs.
You are now about to produce the same plot with another (fixed third) parameter.
With this you select what variable will be on the x-Axis!
See how the new plot keeps the previous scales and the new graph fits in the picture.
Now it is your turn!
This concludes the tutorial.
You should now have a good impression about the basic functions of the program. Try the other functions for yourself and use the online help for more details.
Hope to hear from you!