I have 42s programs on paper and they pertain to oilfield drilling programs. I have a new 49g+ and want to get these programs on it... how do I get them converted. They are not that large, but I have no experiance in programming.
Converting hp42s programs
|
|
« Next Oldest | Next Newest »
|
▼
01-16-2006, 04:02 AM
▼
01-16-2006, 12:18 PM
Unfortunately, the only way I'm aware of to do that is to translate the programs from HP-42S RPN to RPL, which means you have to know how to program in both languages. For earlier calculators, 48G and 49G, there is Hrastprogrammer's HP42X emulator of the HP-42S. But he doesn't have a version for the 49G+, according to the referenced site.
Regards, ▼
01-16-2006, 06:59 PM
Is there anyone out there that can program in RPN & RPL that would be interested in helping me create these new programs forthe 49G+ I do not have that many programs and they are not that large.
Any help would be great!
Edited: 16 Jan 2006, 7:14 p.m. ▼
01-16-2006, 09:01 PM
Are these programs freely redistributable?
03 INPUT INPUT "STK LNT" I assume that should be:
03 INPUT "STK LNT"
Regards,
01-16-2006, 09:40 PM
You also have some useless "VIEW" statements there. Those won't cause the program to stop, so they'll just get overwritten by subsequent "VIEW" statements. Only the last one will show. Did you want to do a 42S-style "variable menu" where each parameter is entered, and/or viewed via a softkey? ▼
01-16-2006, 10:27 PM
Hi, Howard; just a reminder: if the printer is active (IR output), these values will be printed. Otherwise, as it happens with the HP41, by manipulating flag 21 you can have the program halted in each VIEW/AVIEW. d8^) Also, it seems to me it was taken from an original HP41 FOCAL listing, by subtituting numeric STO/RCL and related PROMPT/VIEW for newer ALPHA variables. The program style is a hint, don't you agree? Cheers.
Luiz (Brazil) Edited: 16 Jan 2006, 10:33 p.m.
01-16-2006, 10:25 PM
Hi, B Douglas; please allow me some comments/questions. First: would that be possible to add an example on how to use the program? I'm asking this because of the following: (consider this an anlysis of the program lines)
lines #2 to #5 ask for LINEAR, STK LNT (STacK LeNghT?), EFF (efficiency?) and SPM (?); BBL/STK = (LINEAR)2×2.34-4×(STK LNT)×(EFF)×.01If so, considering EFF×.01 only converts percent efficiency to absolute per unit value, we may save some bytes and writte: BBL/STK = (LINEAR)2×2.34-6×(STK LNT)×(EFF)At this point, BBL/STK is stored and shown (line #17). Then lines #18 to #21 compute and show: GAL/STK = BBL/STK × 42and lines #22 to #25 compute and show: GAL/MIN = (SPM) × (GAL/STK)Line #27 halts program execution, shows current GAL/MIN and prompts for new value, if current value is not 'good enough'. Whether a new value is keyed in or the current one is kept, pressing [R/S] at this point leads to compute: (? value) = current (GAL/MIN) ÷ (GAL/STK)Although this new value is left in the X-register and in the lower line of the LCD, the upper line shows current (SPM) value. I'd like to know if this is actually what the program does and if you have a single example to test both the one that's keyed in and a possible RPL equivalent. Cheers. Luiz (Brazil)
Edited: 16 Jan 2006, 10:39 p.m. ▼
01-16-2006, 11:26 PM
Here is an example:
LINER = 5.5 This is for computing gallons per min(GPM): Your inputs are as Follows: you state what your "liner" size is of the hole(5.5). then your "STK LNT" stroke length of your pumps (10). then your "EFF", stands for pump efficiency. ...one can enter (.95) and you would not have to multple by .01 to change 95 into .95) then the calc asks for what "SPM" your thinking of running (strokes per min).
then multiplies it by (.000243)=.00735075 then takes that and multplies it by your "STK LNT" & "EFF" = .69832125 It stores that number and gives it to you as "BBL/STK" (BBL/STK is .6982125) Then it takes your "BBL/STK" and multiplies that by 42 = 2.93294925 or 2.93 It stores that number and gives it to you as "GAL/STK" (GAL/STK is 2.93) then it takes your "SPM" your would like to run and multiplyes that by your "GAL/STK" = 263.96 or 263 GPM It give you the answer as (Total GPM is 263) If you need more examples they can be provided ▼
01-17-2006, 01:07 AM
Your listing does more than that. At line 26, it prompts for a new Gal/Minute and calculates a new Strokes/Minute, displaying it along with the old Strokes/Minute. Ignoring that, the following program comes up with similar answers on a 49G+:
I've probably missed a trick or two. If so, you can be sure Luiz will catch it. 8)
Edited: 17 Jan 2006, 1:15 a.m. ▼
01-17-2006, 03:41 AM
HOW DO I ENTER THIS INTO THE CALC....I KEEP GETTING SYNTAX ERRORS. AND HOW DO I STORE AND RUN IT ALSO
01-17-2006, 03:45 AM
ON THE GAL PER MIN ENTRY IT ASK WHAT GPM DO YOU WANT THEN TAKES THAT # DIV. BY GAL/STK AND IT WILL TELL YOU THE DESIRED STROKES PER MINUTE TO RUN SPM TO RUN TO ACHEIVE THAT GPM LEVEL. THERE ARE WIDE VARIATIONS OF THIS PROGRAM AROUND...I AM TRYING TO EXPLAIN IT THE BEST I CAN.
▼
01-17-2006, 06:48 AM
PLEASE TURN OFF YOUR CAPS LOOK. Thanks.
01-17-2006, 09:15 AM
Hi, Brian; if you are in trouble keying the program in your calculator, given that you already have the listing, maybe one of the best ways is actually to download the existing listing from the computer to the calculator through the connection cable. In some cases, when you are in the need to load the calculator with edited listings, editing in a PC and downloading it to the calculator may also be better and, occasionaly, faster. I'm sending you an e-mail with some extra info, O.K.? Best regards.
Luiz (Brazil) Edited: 17 Jan 2006, 9:17 a.m. ▼
01-17-2006, 11:31 AM
I do not have a program to write a calc. program on the computer in order to be able to download to the calc. I have the connectivity software, but I have not seen a way to actually edit or write programs on it to send to the calc. Brian ▼
01-17-2006, 01:04 PM
There is an error in that listing that may have prevented you from sending it to the calc. It was also missing the text header. Here's a corrected version:
%%HP: T(3)A(D)F(.) Cut and paste the above into notepad, and save as "pump.txt" Start the connectivity kit, cable up the calculator, start the xmodem server and connect with the connectivity kit. Check File->Transfer mode. If it is "binary", select it so you are in "text" mode. Drag pump.txt and drop it into the connectivity kit's view of the calculator file system. Select "Disconnect" from the Connectivity Kit menu. You should have a softkey labeled "pump" in the calculator directory you dropped the file on. That should do it.
You might want to have a look at Finally, the Usenet news group comp.sys.hp48 is a good place to ask programming questions. This site is for older HP calculators, not current ones like the 49G+ The newsgroup is a better place to go with your questions. Good luck!
Edited: 17 Jan 2006, 1:14 p.m. ▼
01-17-2006, 01:55 PM
THanks for the help,,I got it on my calc.now but for some reason it does not run...or I just do not know how to run it. Need a little more help. Brian
01-17-2006, 01:26 PM
You should also look at Hrast's message below. For $130.00, you could have a 42S emulator on your 49G+. You would have to key the programs by hand, but no translation would be needed. ▼
01-17-2006, 02:29 PM
It brings up the program just like it was entered and sent to the calculator. It does not actually run it.
it has a:
Butit does noe execute the program.
▼
01-17-2006, 03:15 PM
It sounds like the program transferred as a string, not as a program. That could happen if your cut-and-paste added characters, or if you were in binary mode when you transferred the program.
Delete the program off the calculator. (Press r-shift-files, OK, scroll down to the PUMP..." entry, press NEXT, then the PURGE softkey.) Download The text/binary mode probably wasn't the problem. I just transferred the text file to my 49G+ with the connectivity kit in binary mode, and the calc recognized it as a program without a problem. It's more likely some garbage was added when you did your cut-and-paste. (You needed to select just the program text before pressing ctl-c, for instance.) The binary version linked to above should get around that difficulty. ▼
01-17-2006, 04:29 PM
Howard your incredible, The program works great!!!!! I copied and pasted it just like you mentioned and it still transfered as a string. Is there a way to set the connectivity program to binary and I assume that I was to set the calculater to ascii transfer. I might have been doing it all wrong. Still learning! I have several other programs that I am needing to write in this code. By looking at the way the program was on the 42s I could follow it, but in the new RPL way it is very confusing for me. Any sugestions....most of the other (formula's) just get more complex. Would you be interested in helping. If so let me know. Feel free to contact me by email bdouglas1011@earthlink.net Then I could get you my Contact #. Thanks for your help!
01-18-2006, 03:27 AM
Quote:As you've already successfully downloaded the binary version, this is acedemic, but at least part of the problem would be the header. It should be: %%HP: T(3)A(D)F(.);instead of %%HP: T(3)A(D)F(.)Note the semicolon at the end of the ASCII transfer header. Without a valid transfer header, the calculator stores whatever it received as a character string. Quote:That I don't have any good explanation for. I do notice that Howard posted the source code with tab characters where a series of spaces would usually be, but that shouldn't matter, as either tabs or spaces are parsed as separators.
I hope that you saved it as a "plain text" file rather than some
I recommend uploading (in "ASCII" or "text" mode) some programs
Quote:Well, what would be "executed" is the character string, which for a "data class" object, means that it would simply be placed on the stack.
As Howard wrote, the newsgroup comp.sys.hp48 seems to be a better
Regards, Edited: 18 Jan 2006, 4:40 a.m. ▼
01-23-2006, 10:54 PM
does any one have any idea why this will not transfer and convert into binary mode.
\<< "Enter Liner" "" INPUT OBJ\-> "Enter Stroke Length" "" INPUT OBJ\-> "Enter Efficiency" "" INPUT OBJ\-> "Enter Strokes/Minute" "" INPUT OBJ\-> \-> lin stl eff spm \<< lin SQ .000243 * stl * eff * .01 * DUP "Bbl/Stroke = " SWAP + SWAP 42 * \-> gps \<< "Gal/Stroke = " gps + "Gal/Minute =" gps spm * + 6 DISP 5 DISP 4 DISP "Press a key to exit" 9 DISP 0 WAIT DROP \>> \>>
\>> Edited: 23 Jan 2006, 10:59 p.m. ▼
01-23-2006, 11:05 PM
Oh, heck. James noticed this before. I left out a semicolon at the end of the header in this program. So
%%HP: T(3)A(D)F(.) Should be
%%HP: T(3)A(D)F(.); That's why it isn't transferring. In this case, the 49G+ will give a string conversion error, which doesn't tell you a darned thing, and Conn4X will report a transmission error. Very confusing.
Regards,
01-23-2006, 11:12 PM
An error in the program will also give you a string conversion error, without telling you where exactly the error occurred. What I do in that case is I edit the file, replacing the outer program delimeters (the first \<<and the final \>>) with double quotes. That makes the 49G+ not do any string conversion, but just copy the contents over as text. Once on the calc, I edit the string and replace the quote marks with program delimeters. Then when I press enter, the calculator parses my program, gives me an intelligble error message and points to where the problem is. Much better! That wouldn't have worked in this case, however, since the problem wasn't in the program but in the text header.
Regards, Edited: 23 Jan 2006, 11:13 p.m.
01-17-2006, 01:22 AM
But he doesn't have a version for the 49G+, according to the referenced site.
There are HP-49G+ versions of all my emulators (http://hrastprogrammer.tripod.com/hp49gp.htm), I just haven't updated single emulator pages with this information. They don't have the same functionality as HP-48GX and HP-49G versions due to some HP-49G+ shortcomings and quirks (no RS-232, 128K Port1, some problems with ROM 2.0x, ...). Edited: 17 Jan 2006, 1:24 a.m. |