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 2:35 pm

Running an HP 50g program on the DM42

Post by kintekobo »

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: 1703
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: Running an HP 50g program on the DM42

Post by rprosperi »

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, DM41X: β00071 & 00656, DM10L: 071/100
User avatar
Mark Hardman
Posts: 118
Joined: Wed May 03, 2017 3:26 am
Location: Houston, TX

Re: Running an HP 50g program on the DM42

Post by Mark Hardman »

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: β00043, β00065, 00357 / DM41X: β00054, 00445 / DM32: β00278
DM10L: 017/100, DM11L: 00121, DM12L: 02005, DM15L: 00523, DM16L: 00008, DM41L: 00111
kintekobo
Posts: 7
Joined: Thu Jun 28, 2018 2:35 pm

Re: Running an HP 50g program on the DM42

Post by kintekobo »

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: 1703
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: Running an HP 50g program on the DM42

Post by rprosperi »

kintekobo wrote:
Sun Mar 03, 2019 1: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, DM41X: β00071 & 00656, DM10L: 071/100
kintekobo
Posts: 7
Joined: Thu Jun 28, 2018 2:35 pm

Re: Running an HP 50g program on the DM42

Post by kintekobo »

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