I hate doing things I can make my computer do for me. My adventures in customizing and automating computers. Primarily with AutoCAD and Microsoft Office.

Monday, May 08, 2006

More HPFeet - Plate Weight

This is a small routine to calculate the weight of steel plates using my HPFeet input method. Example:
0.25 enter (the plate thickness in inches)
12 enter (the plate width in inches)
12.0108 (the plate length in HPFeet - in this case 12'-1 1/2")
PLWT (the procedure call)
123.7760 (the result - 123.7760 lbs)

The code:
FTD 12. * * * 12 / 12 / 12 / 490 *

Wednesday, May 03, 2006

Feet and inches with HP calculators

In the early 1980's I was introduced to the HP 41C programable calculator and was introduced to a series of small programs that perform basic math functions on imperial measurements without having to convert to decimal. To do this, distances are represented by what I will refer to as HPFeet, thus: FF.IISS where FF = whole feet, II = whole inches, and SS = sixteenths of an inch. In this format, 12'-1 1/2" is represented as 12.0108. The basic math functions, as I now use in an HP 48GII follow.

FTD: Feet to Decimal - Converts FF.IISS to decimal feet. For example, 12.0108 (which represents 12'-1 1/2") becomes 12.125
DUP IP SWAP FP 100 * DUP IP 12 / ROT + SWAP FP 100 * 16 / 12 / +

DTF: Decimal to feet - Converts decimal feet and inches in my HPFeet.
DUP IP SWAP FP 12 * DUP IP SWAP FP 16 * 100 / + 100 / +

FADD: With HPFeet numbers in both the first and second stack positions, the following will add them together leaving the result in the first stack position as HPFeet.
FTD SWAP FTD + DTF

FMIN: With HPFeet numbers in both the first and second stack positions, the following will subtract the first from the second, leaving the result in the first stack position as HPFeet.
FTD NEG SWAP FTD + DTF

FMULT: With an HPFeet number in both the second stack position and a decimal number in the first stack position, the following will multiply them, leaving the result in the first stack position as HPFeet.
SWAP FTD * DTF

FDIV: With an HPFeet number in both the second stack position and a decimal number in the first stack position, the following will divide the second by the first, leaving the result in the first stack position as HPFeet.
INV SWAP FTD * DTF

Later, I will include a couple more functions along with key assignments that simplify the use of the above routines.

Tuesday, May 02, 2006

Coming online!

This being my first post, I will try to give you an idea what to expect.

I have been using computers since about 1988 and programmable calculators (HP 41 and Ti-74) since about 1983. In that time I have worked as a steel detailer (one who creates steel fabrication drawings), a structural designer, an architectural drafter and designer. I have used AutoCAD since release 10 along with Excel and Lotus 123 since 1988. I am fascinated by the ability to make computers work for us. Because of this I have been programming since introduced to the HP 41C calculator in the early 80s. I expect to post my experiences as I continue to program Excel and AutoCAD using VBA, Lisp, and maybe even some dotNet.