Running an HP 50g program on the DM42

Post here to share useful tips and tricks, to ask questions about using your DM42 or to report software-related problems
Post Reply
kintekobo
Posts: 7
Joined: Thu Jun 28, 2018 12:35 pm

Running an HP 50g program on the DM42

Post by kintekobo » Sat Mar 02, 2019 9:02 pm

Hi

I have found a program for the HP 50g calculator that I would like to use on the DM42 but it is a .HP file ( GAGEBLOCK.HP ). Does anyone know if there is a way to get this to run on the 42? Is there a method of converting, or is it just impossible?

Thanks

Chris

rprosperi
Posts: 455
Joined: Mon Apr 24, 2017 5:48 pm
Location: New York

Re: Running an HP 50g program on the DM42

Post by rprosperi » Sat Mar 02, 2019 10:52 pm

Pretty much impossible. The languages used are totally different and there is no way to directly convert it.

Of course if you happen to know both languages you could port the underlying algorithm, but that's unlikely.

If the 50g program is not too long, if you posted it here, or on the MoHPC forums (under the "Not quite HP Calculators - but related" section), you may find a bilingual helper willing to help you out, though it obviously should not be a regular thing. Also, it's more likely to happen if the program does something really interesting, or is of use to a lot of people.
--bob p

DM42: β00071 & 00282

User avatar
Mark Hardman
Posts: 65
Joined: Wed May 03, 2017 1:26 am
Location: Houston, TX

Re: Running an HP 50g program on the DM42

Post by Mark Hardman » Sun Mar 03, 2019 2:45 am

Many, many years ago while at university, I made extra money as a machinist creating custom parts for hydraulic presses that made synthetic diamonds. Precision was everything, so all calibrations were made using Gauge Blocks. The key to a precise measurement was to use the fewest number of gauge standards to get the specified length.

He might be looking to convert something like this Gauge Block Solver.

Am I in the ballpark Chris?
DM42 S/N: 00043 (Beta)
DM42 S/N: 00065 (Beta)
DM42 S/N: 00357

kintekobo
Posts: 7
Joined: Thu Jun 28, 2018 12:35 pm

Re: Running an HP 50g program on the DM42

Post by kintekobo » Sun Mar 03, 2019 12:29 pm

Yep, that's the program that I was looking to use. I have several HP calculators I keep in my workshop and lab and had need of a simple method of calculating gage block stacks for some precision work I was doing. I have a Mitutoyo metric gage block set which is a bit odd in that all of the high precision blocks are in the 2.0000 to 3.0000 mm range rather than the usual 1.0000 to 2.0000 range. This makes it more difficult to calculate the combination as there are gaps in the range where no combination is possible.

I guess that I will just have to write the program myself, although I will probably have to write it for the PC as I lack the programming chops to do it with the HP. That is unless someone here has already done it? Probably unlikely I suppose.

Oh, and as for posting the code that isn't possible as it looks as if the program is compiled and there isn't any source code provided as far as I can tell.

Chris

rprosperi
Posts: 455
Joined: Mon Apr 24, 2017 5:48 pm
Location: New York

Re: Running an HP 50g program on the DM42

Post by rprosperi » Sun Mar 03, 2019 3:13 pm

kintekobo wrote:
Sun Mar 03, 2019 12:29 pm
Oh, and as for posting the code that isn't possible as it looks as if the program is compiled and there isn't any source code provided as far as I can tell.
I looked at the 50g program and it will not be easily ported to the 42S; it is sophisticated and not straightforward, and was written in very low level code (I believe at least some of the code is in ARM assembler, possibly written in C - hard to tell quickly examining the binary). But the good news is the program was written by Dave Hayden, a frequent visitor to the MoHPC Forums (id there is "David Hayden"). You should contact Dave and ask him for some guidance on possible ways to get it working on your 42S, or maybe another model.

Another option would be to get a 50g, or maybe even a 48gII, which is compatible but typically much cheaper than a 50g on eBay, etc. The 48gII is somewhat slower, with less memory and a smaller LCD, but I'd guess it is still useful, and this solution is a heck of a lot easier than either porting the code to 42S or writing from scratch on a PC.

HTH
--bob p

DM42: β00071 & 00282

kintekobo
Posts: 7
Joined: Thu Jun 28, 2018 12:35 pm

Re: Running an HP 50g program on the DM42

Post by kintekobo » Sun Mar 03, 2019 8:22 pm

Thanks for the info there. You more or less confirmed what I had been thinking. I have started to write the program using Xojo, a pretty hideous form of Basic but it has multi-mode options to compile for PC/Mac/iPad/iPhone etc so I think that would give me a better chance of getting it up and running. Plus my gage blocks are so non-standard that I 'm not sure how the 50G software would handle it.
I just wish I had the ability to program the 42 for anything non-trivial but I'm an old C/C++/C# programmer and too old to change my ways I suspect. :D

Thanks,
Chris

Post Reply