From jimd@hpcvra.cv.hp.com (Jim Donnelly) Date: Thu, 16 Sep 1993 21:29:06 GMT Subject: Re: HP 48 G Periodic Table Library Newsgroups: comp.sys.hp48 This is a uuencoded library object containing the HP 48 G Series Periodic Table. Jim Donnelly jimd@cv.hp.com ------------------------cut here----------------------------- From jimd@hpcvra.cv.hp.com (Jim Donnelly) Date: Thu, 16 Sep 1993 21:30:17 GMT Subject: Re: HP 48 G Periodic Table Library Newsgroups: comp.sys.hp48 This document describes the use of the Periodic Table Library. Jim Donnelly jimd@cv.hp.com -------------------------------cut here----------------------------------- CONTENTS 1. Introduction........................................ 1 2. Keystroke Identification............................ 1 3. Installing the Periodic Table....................... 1 4. Removing the Periodic Table Library................. 2 5. The Reserved Variable PTpar......................... 2 6. Periodic Table Version.............................. 2 7. Using the Periodic Table............................ 3 7.1 Using Catalogs................................. 5 7.2 Finding Element Names and Symbols.............. 6 7.3 Finding Element Properties..................... 6 7.4 Plotting Properties............................ 9 7.5 Putting Information on the Stack............... 10 7.6 Choosing Unit Options.......................... 10 7.7 Calculating Molecular Weights.................. 10 8. Using Periodic Table Commands....................... 12 8.1 Getting Properties with a Command.............. 12 8.2 Calculating Molecular Weights with a Command........................................ 13 - i - HP 48 G Series Periodic Table Library Copyright (c) Hewlett-Packard 1989-1993 1. Introduction The HP 48 Periodic Table Library is a RAM-based version of the Periodic Table application that was originally distributed in the HP 82211A HP Solve Equation Library Card. This application is freeware, and may be distributed freely as long as this copyright notice is retained. 2. Keystroke Identification Text items that you enter, such as a name, number, or molecular formula are written as you would type them. Primary keys are enclosed in brackets ([]), such as [ALPHA] or [ENTER]. Menu keys are enclosed in braces ({}), such as {PERTB}. The shift keys are written as [leftshift] and [rightshift]. The arrow keys are written as [v] (downarrow), [^] (leftarrow), [<] (leftarrow), and [>] (rightarrow). 3. Installing the Periodic Table The Periodic Table is implemented as a library object, with library ID number 703. To install the library, perform the following steps: + Download the library ptlib to the HP 48 in binary mode. + Recall the library to the stack. + Purge the variable that the library was stored in. + Store the library in a port, such as port 0. For instance, when the library object is in level one of the stack, execute 0 [STO]. + Turn the calculator off, then on again. The calculator will perform a system halt, which updates the system configuration to recognize the new library. The Periodic Table library will automatically attach itself to the HOME directory. Page 1 4. Removing the Periodic Table Library To remove the Periodic Table library, perform the following steps: + Ensure that the library does not appear on the stack as "Library 703:...". Either store the library in a variable or execute NEWOB to create a unique copy. + Switch to the HOME directory. + Enter the port-tagged library number. For instance, if the Periodic Table Library is stored in port 0 enter :0:703, or if the library is store in port 2 enter :2:703. + Duplicate the library number, execute DETACH ([leftshift] [LIBRARY] {DETAC}), then execute PURGE. + You may also wish to purge any instances of the reserved variable PTpar (described below). 5. The Reserved Variable PTpar The Periodic Table application saves information in a variable named PTpar. This information includes the last element viewed, the last property viewed, and the order of properties in the property catalog. When the Periodic Table is started, the current directory is searched for the existence of PTpar. If this variable does not exist, a new copy will be created. 6. Periodic Table Version Press [rightshift] [LIBRARY] {PRTBL} {PTVER} to display the version number of the Periodic Table Library. Page 2 7. Using the Periodic Table To start the Periodic Table, execute PERTBL (press [rightshift] [LIBRARY] {PRTBL} {PERTB}). The main Periodic Table display shows a picture of the periodic table. Each square represents one element. The black pointer (1) marks the location of the current element. For the current element, the display also shows the element name (2), mass number (3), symbol (4), atomic number (5), atomic weight (6), density (7), and physical state (9) - solid, liquid, gas, or synthetic - at standard temperature for gases and at room temperature for others. +-----------------------------------------------------+ | SODIUM | | +-+ (2) +-+ | | | | | | | | +-+-+ +-+-+-+-+-+-+ (3) N N | | | | | | | | | | | | 23 NN N (4) | | +-+-+ +-+-+-+-+-+-+ N N N | (1)| |*| | | | | | | | | 11 N NN aa | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ (5) N N aaa | | | | | | | | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | | | | | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ AT WT: (6) | | | | | | | | | | | | | | | | | | | | | 22.98977 | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | | | | | | | | +-+-+-+-+-+-+ | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ DENSITY (7) | | | | | | | | | | | | | | | | | 0.97 | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |(8)SOL | | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | +-----------------------------------------------------+ | TABLE | NAME | SYMB | ATWT | DENS | QUIT | +-----------------------------------------------------+ Each of these properties is listed fully with units in the catalog of properties - see "Finding Element Properties". Page 3 The Periodic Table is a special environment in which you can find information about elements and molecules. The following diagram shows how to switch among the displays and catalogs. {TABLE} {NAME} {SYMB} | | | v v v +--------------+ +--------------+ +----------------+ | | | | | | | Grid Display | | Name Catalog | | Symbol Catalog | | | | | | | +--------------+ +--------------+ +----------------+ ^ ^ | | [ENTER] [ENTER] [ENTER] | | | | | | | | | | | | | | | [ENTER] | | v | | | | +---------------+ | | | +----->| |<----------+ | | | Property List | | | | | | {EXIT} +---------------+ | | | | ^ | +------------+ | | | {PLOT} [ATTN] | | | | v | | +---------------+ | | | +----------------| Property Plot | | | +---------------+ Page 4 In the main Periodic Table display, you can perform the operations listed in the following table. [v][^][<][>] Moves the pointer in the table, wrapping around rows or columns. With [rightshift], moves the pointer to the extreme of the current row or column. [<] or [>] wraps to the adjacent row. [^] or [v] moves to or from the rare-earth area. [alpha] Enter the characters for a symbol or molecular formula, then press [ENTER]. This moves the pointer to the element having the symbol entered, or calculates molecular weights. Multiple character entry is allowed. {ATWT} Puts the atomic weight of the current element on the stack. {DENS} Puts the density of the current element on the stack. {QUIT} Exits from the application. [ATTN] Exits from the application. 7.1 Using Catalogs The Periodic Table uses catalogs to display lists of names, symbols, or properties. These catalogs share a common set of procedures for moving around, and are similar to those built into the Equation Library and the Constants Library. The following table lists the operations you can perform. [^] Moves the highlight up through the catalog. (The highlight can wrap around to the bottom.) [leftshift][^] moves the highlight to the top of the display or up one display. [rightshift][^] moves the highlight to the top of the catalog. [v] Moves the highlight down through the catalog. (The highlight can wrap around to the top.) [leftshift][v] moves the highlight to the bottom of the display or down one display. [rightshift][v] moves the highlight to the bottom of the catalog. [alpha] Moves the highlight to the next line starting with the alpha character you type. (The highlight can wrap around to the top.) Page 5 7.2 Finding Element Names and Symbols The Periodic Table provides two catalogs containing names and symbols of elements in alphabetical order. You can use these catalogs to find names or symbols or to make a certain element the current element: + To find the symbol for a certain element name, press {NAME}. Use [^] and [v] to move to the element, or use [alpha] to enter the first letter of the name. + To find the name for a certain element symbol, press {SYMB}. Use [^] and [v] to move to the element, or use [alpha] to enter the first letter of the symbol. + To make a certain element the current element, do either of the previous steps, then press {TABLE}. You can also find element properties from the name and symbol catalogs - see the next topic. 7.3 Finding Element Properties The Periodic Table contains a collection of physical properties of elements, such as melting-point temperature and heat of vaporization. Values are based on the "Periodic Table of the Elements" published by the Sargent-Welch Scientific Company - they may differ from values from other sources. To display the catalog of properties for a certain element, follow these steps: 1. Select the element in one of these ways: + Move the pointer to the element in the Periodic Table display. + Press [alpha], type the symbol for the element, then press [ENTER]. + Get the name or symbol catalog, then move the highlight to the element. 2. Press [ENTER]. The catalog shows each property name and value, including units (if units are used). Page 6 The property catalog provides the operations listed in the following table (including the operations common to all catalogs). The property you point to last is the one that's highlighted in the next property catalog. [^][v] Moves the highlight up or down the catalog. [alpha] Moves the highlight to specified alpha line. [ENTER] Shows a wide (...) item completely - press [ENTER] or [ATTN] to return to the catalog. {PLOT} Plots the highlighted property as a function of atomic number. (See "Plotting Properties".) {UNIT*} Indicates units used. {UNIT} Indicates units not used. {MOVE} Moves the highlighted property to the top of the catalog for this and future catalogs. {->STK} Puts the highlighted property in level 1 of the stack. {EXIT} Returns to the Periodic Table display at this element. [ATTN] Exits the Periodic Table application. The following table lists the properties in the order they're included in the Periodic Table, plus the type of object associated with each property. Certain properties are not numeric - they're represented as string objects. Page 7 Properties of Elements +--------------------------------------+--------+----------+ | Property | Object | Property | | | Type | Number | +--------------------------------------+--------+----------+ | Atomic Number | Real | 1 | | Mass Number* | Real | 2 | | Atomic Weight | Unit | 3 | | Density* | Unit | 4 | | Oxidation States* | String | 5 | | Electronic Configuration | String | 6 | | State | String | 7 | | Melting Point | Unit | 8 | | Boiling Point | Unit | 9 | | Heat of Vaporization | Unit | 10 | | Heat of Fusion | Unit | 11 | | Specific Heat | Unit | 12 | | Group (U.S. customary) | String | 13 | | Family | String | 14 | | Crystal Structure | String | 15 | | Atomic Volume* | Unit | 16 | | Atomic Radius | Unit | 17 | | Covalent Radius | Unit | 18 | | Thermal Conductivity* | Unit | 19 | | Electrical Conductivity* | Unit | 20 | | First Ionization Potential | Unit | 21 | | Electronegativity (Pauling's number) | Unit | 22 | | Oxide Behavior | String | 23 | | Element Name** | String | 24 | | Element Symbol** | Name | 25 | +--------------------------------------+--------+----------+ * See the notes that follow this table. ** Not included in the property catalog, but listed in the title of the catalog. Notes about properties: Mass number for a stable element is based on the isotope with the highest percent abundance; for a radioactive element, it's based on the longest half-life. Density for a gas is at 273 K with units of g/l; for others, it's at 300 K with units g/cm^3. Oxidation states are in order of most stable to least stable. Atomic volume for a gas is for its liquid state at the boiling point; for others, it's derived from the density at 300 K. Thermal conductivity is measured at 300 K. Electrical conductivity is measured at 293 K. Some properties for certain elements are annotated with special information, such as indicating estimated values or special conditions. For example, the note for the atomic weight of francium indicates that the value is for francium's most stable form. Such properties appear in the catalog with * as the first character - you can search for this annotation by pressing [alpha] [X] (multiply). To see the property and annotation, highlight it and press [ENTER]. Page 8 If you have one or more properties that you use frequently, you can change the catalog to make these properties always appear at the top of the catalog. To move a property to the top of the catalog (for this and future catalogs), highlight the property you want at the top, then press {MOVE}. (Note that this does not affect the property numbers listed in the previous table.) To restore all properties to their original order, purge the variable PTpar. 7.4 Plotting Properties You can plot any numeric-valued property as a function of atomic number for all elements. (You can't plot non-numeric properties.) This is useful for finding elements with certain characteristics and for observing the periodic nature of many properties. To plot a property, follow these steps: 1. Get a property catalog for any element. 2. Highlight the property you want to plot. 3. Press {PLOT}. The plot includes a pointer just below the plot marking the current element. The bottom line gives the name, symbol, and property value for the current element. You can scale the plot to find certain elements or values. You can return to the property catalog for the original element or to the Periodic Table display for another element. [<][>] Moves the pointer to the left or right. With [leftshift], moves the pointer 10 elements left or right. With [rightshift] moves the pointer to the first or last element. [ENTER] Returns to the Periodic Table display at the element marked by the plot pointer. [ATTN] Returns to the previous property catalog. Page 9 7.5 Putting Information on the Stack You can put information on the stack from the Periodic Table display, from a catalog of properties, or from a command: + From the Periodic Table display, press {ATWT} to put the atomic weight of the current element on the stack, or press {DENS} to put its density on the stack. + In a property catalog, press {->STK} to put any highlighted property on the stack. + From outside the Periodic Table, use the PTPROP command to put its density on the stack. (See "Using Periodic Table Commands" later in this document.) 7.6 Choosing Unit Options The Periodic Table properties and commands have two choices for units: SI units or no units (implied SI units). The numeric values don't change for these choices, but the type of objects put on the stack does depend on your choice. The choice of units usage is represented by the state of flag 61. If flag 61 is clear, units are used; units are used if the flag is set. In any catalog of properties, you can choose SI units or no units by pressing the {UNITS} menu key. {UNIT*} means SI units are used, {UNITS} means units are not used. 7.7 Calculating Molecular Weights You can calculate the molecular weight of any compound using the Periodic Table: + From the Periodic Table display, press [alpha], enter the formula for the compound, then press [ENTER]. Use [<-] to correct typing mistakes. The operation is described below. + From outside the Periodic Table, use the MOLWT command. (See "Using Periodic Table Commands" later in this document.) Page 10 When you press [alpha] in the Periodic Table display, the application prompts for the molecular formula and automatically locks the alpha keyboard on. The application accepts any formula containing combinations of items listed below. (If you enter only an element symbol, the pointer moves to that element instead.) + Element symbols (letters). Only the first letter of a two- or three- letter symbol is uppercase (use [leftshift] to enter lowercase letters) - NiN and NIN are different compounds. Letters that don't form valid symbols aren't accepted. + Subscripts (numbers). Indicate multiples of the preceding element or group. Decimal numbers are allowed. + Groups (parentheses). Join elements, subscripts, and groups. Use [leftshift][()] for (. Use [rightshift][()] for ), or unlock alpha and press [>]. These are samples of valid molecular formulas: INPUT: MEANING: ------------- ------------------ NaF NaF H2SO4 H SO 2 4 Mg(OH)2 Mg(OH) 2 Zn3(Fe(CN)6)2 Zn [Fe(CN) ] 3 6 2 Press [ENTER] to calculate the molecular weight. Then + To put the molecular weight and formula on the stack (and return to the Periodic Table display), press [ENTER]. + To just return to the Periodic Table display, press [ATTN]. The molecular weight contains SI units if you're using units - otherwise, no units are included. You can change this option in the property catalog for any element - see "Choosing Unit Options" earlier in this document. Page 11 8. Using Periodic Table Commands The Periodic Table Library includes four commands that you can execute from the menu, in the command line, and in programs. You can view the command names by pressing [rightshift] [LIBRARY] {PRTBL} [rightshift] [VIEW]. +---------+--------------+--------------------------------+ | Key | Programmable | Description | | | Command | | +---------+--------------+--------------------------------+ | {PERTB} | PERTBL | Starts the Periodic Table. It | | | | doesn't affect the stack. | | | | | | {PTPRO} | PTPROP | Returns the specified property | | | | for the specified element. | | | | | | {MOLW} | MOLWT | Returns the molecular weight | | | | for the specified molecular | | | | formula. | | | | | | {PTVER} | PTVER | Displays the version number of | | | | the Periodic Table Library. | +---------+--------------+--------------------------------+ 8.1 Getting Properties with a Command You can get element properties using the PTPROP command instead of using the Periodic Table display. PTPROP takes the element's symbol or atomic number from level 2, and the property number from level 1. Define the element using either its symbol (a name, such as 'Si') or its atomic number (such as 14). Define the property using the property number (such as 9 for the boiling point temperature). Property numbers are listed in the "Properties of Elements" table under "Finding Element Properties" earlier in this document. For example, both of these program segments return the boiling-point temperature for silicon: << ... 'Si' 9 PTPROP ... >> << ... 14 9 PTPROP ... >> If you use PTPROP as an algebraic function, you must use the symbol to define the element - you can't use its atomic number. For example, this program segment is valid: << ... 'PTPROP(Si,9)' EVAL ... >> Note that if units are not used (flag 61 set) a real number is returned instead of a unit object. Page 12 8.2 Calculating Molecular Weights with a Command You can calculate molecular weights using the MOLWT command instead of using the Periodc Table display. With certain restrictions, you can define the molecular formula in either of two forms: + A string, such as "H2O". Valid for any formula. + A name, such as 'H2O'. Valid only for formulas without parentheses. You can store a molecular formula in a variable, then use the variable name with MOLWT. You should do this when you want to use MOLWT in an expression and the formula contains parentheses or matches an HP 48 command name. You must use care when naming a variable that contains a formula string or name. Make sure the variable name itself isn't a valid formula - for example, start the variable name with a lowercase letter. (If the variable name is a valid formula, using MOLWT with the variable name returns the molecular weight for the variable name, not for the formula it contains.) For example, if you store the formula for ethyl alcohol ("C2H6O") in variables SUDS and HOPS, 'MOLWT(SUDS)' [EVAL] gives the molecular weight for ethyl alcohol, but 'MOLWT(HOPS)' gives the weight for hydrogen-oxygen- phosphorus-sulfur. ("SUDS isn't a valid molecular formula, but "HOPS" is.) If your formula is the same as an HP 48 reserved word, such as SIN, you must supply it as a string. From dougc@bert.cs.byu.edu (Douglas R. Cannon) Newsgroups: comp.sys.hp48 Subject: Re: PROBLEM: Loading the Periodic Table (on a 48GX) Date: 20 Sep 1993 21:02:03 GMT On Mon, 20 Sep 1993 11:22:39 CDT, Gene J said: >A friend and I are having problems loading the Periodic Table, PTLIB, >library onto our HP48GXs. >We do the following... > 1) Download to HP48GX in binary form > 2) Recall the PTLIB to the stack > 3) Delete the PTLIB from the menu, retaining PTLIB (Library:703) > on the stack. > 4) Perform a [0] [STO] operation > 5) Turn the calculator off... >...but when turning the calculator on, an "Invalid Card Data" message >is displayed, the library doesn't get attached. The only indication of the >PTLIB's presence is by performing a MEM operation which shows that PTLIB is >using about 30k of memory; no PTLIB presence in the menus. You have done exactly what I did, only you've skipped a few steps here. You may have done them, but I'll show you what I've done, just in case what you've done is different. (It's probably different, since I was able to get the PTLIB to work with no problems). 1) Save Jim Donnelly's post to my local host (bert). 2) ftp this to my IBM pc (using ASCII mode, since it's an ASCII file. Everything in uuencoded format is ascii until it's uudecoded.) 3) uudecode the file, get PTLIB out 4) download PTLIB to my HP48GX using binary format. 5) recall PTLIB to the stack, it shows: Library 703: PRTB... this is important. You should not see a string, it should be a library object. If you want, you can type 'TYPE' and it should return a 16. 6) Type 0 STO 7) type 'PTLIB' PURGE to purge the lib from the var menu. 8) turn calc off, then on, PTLIB is attached to HOME automatically. I have actually stored the PTLIB into port 0, although I do have a 128Kb card in port 1. The card is always freed, and *always* write-protected. Good luck, DougC Page 13 From jimd@hpcvra.cv.hp.com (Jim Donnelly) Date: Thu, 16 Sep 1993 21:27:28 GMT Subject: HP 48 G Periodic Table Library Newsgroups: comp.sys.hp48 Hewlett Packard is releasing the Periodic Table library into the public domain for the HP 48 G Series. In two responses to this note I'll post a uuencoded library object and a document that describes its use. Have Fun! Jim Donnelly jimd@cv.hp.com From jimd@hpcvra.cv.hp.com (Jim Donnelly) Date: Thu, 16 Sep 1993 21:32:53 GMT Subject: Re: HP 48 G Periodic Table Library Newsgroups: comp.sys.hp48 I forgot to mention - this library will *not* run on the HP 48 S series. I'll be on vacation until October 4. You can email questions to me. Jim Donnelly jimd@cv.hp.com