Program works in free42 (mostly) but not on DM42

Post here to share useful tips and tricks, to ask questions about using your DM42 or to report software-related problems
Post Reply
nephilim
Posts: 60
Joined: Sat Sep 12, 2020 10:09 pm

Program works in free42 (mostly) but not on DM42

Post by nephilim »

Hello,

this is my first posting in this forum. If you want you can safely skip the first paragraph which is only an introduction. For the past years I have been using HP-33S and 35S, mainly because of the RPN feature. Programming the 35S was never really attractive because (as far as I understand) labels can only be single letter. Recently I was looking for an improvement... and found the HP-42s and the excellent free42 software. This brought me to the (also exceptional) DM42 and while I waited for the latter to arrive I started writing a couple of programs (gas dynamics: gas properties as functions of temperature, static quantities as function of Mach number and constant gamma, isentropic expansion of gas with variable cp, etc). I then wanted to go further and checked the sample programs on Thomas Okken's website.

The problem I am facing is that a program works fine in free42 on MacOS and Windows10, but not in free42 on Windows 7 and not on the DM42. An example is "convert" from Thomas' website (https://thomasokken.com/free42/42progs/Convert.txt). It runs as expected on Mac and Windows 10 but on Windows 7 and the DM42 after entering the value and choosing the unit the value does not change when selecting other units. The unit itself is updated, but not the value.

An example: XEQ CONV -> Leng -> type "5" -> choose "mm" and then "m" or "mil" . The top line in the display always shows 5 followed by the selected unit, e.g. 5m or 5 mil. The same happens for other units. As said before, it works beautifully in free42 at least on two platforms (5e-3 m, 197 mil). What am I missing here?

Cheers,
Torsten
DM42 (free42, C47), DM15L, HP15C CE, HP35s, HP33s
Thomas Okken
Posts: 1107
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: Program works in free42 (mostly) but not on DM42

Post by Thomas Okken »

It sounds like there is something different between the states of your various Free42 instances. Programs should work the same regardless of which platform you're on, and in the case of Windows 7 vs. Windows 10 you're even running the same executable, so platform-specific bugs in Free42 can't be at play there.

If you could you send me the Free42 state files from your two Windows environments, I'll take a look to see what's different and causing the Convert program to misbehave.

(You can export the state file using the States window, which you can open by selecting States from the File menu. Highlight the currently active state and select Export from the drop-down menu.)

Please send the state files to my email address, which you can find on the Free42 web page. Thanks!
nephilim
Posts: 60
Joined: Sat Sep 12, 2020 10:09 pm

Re: Program works in free42 (mostly) but not on DM42

Post by nephilim »

I had saved the Win10 state file and then I logged onto the Win7 machine via remote desktop. To my amazement this time the program worked w/o issues. I will check again tomorrow when I have physical access to the machine. I then checked the DM42 again. The program still failed (the up/down keys also would not cycle through the different banks of units). I then reset the DM42 via the hole on the back and now the program works! I have no clue what happened here. I will check if I can reproduce this behavior and then send the state files.
DM42 (free42, C47), DM15L, HP15C CE, HP35s, HP33s
pmansvelder
Posts: 1
Joined: Thu Dec 03, 2020 9:15 am

Re: Program works in free42 (mostly) but not on DM42

Post by pmansvelder »

Hello,

I was reading this and i recognized it as the same problem I had (the convert program not working on my DM42): I spent some time debugging, and then found out that the problem was the state of the 2 printer flags (21 and 55): there are some combinations that have an effect on the command 'AVIEW', which causes the program to respond in the manner described. There is some explanation in the original HP42S manual, pages 274 and 132. A quote:

Page 274:
Flag 21 allows your program to control how the functions VIEW and AVIEW are executed.
, and on page 132:
To record results, set flag 21. If a program uses VIEW or AVIEW to display important results, set flag 21. Then if printing is enabled (flag 55 set), the information is printed.

If printing is disabled (flag 55 clear), the program stops so you can write down the displayed information. Press R/S to continue.
So in the situation when flag 55 is clear and flag 21 is set, you get this behaviour. Clearing them both got the program working as intended.

Hope this helps,

Peter Mansvelder
nephilim
Posts: 60
Joined: Sat Sep 12, 2020 10:09 pm

Re: Program works in free42 (mostly) but not on DM42

Post by nephilim »

Thanks Peter for sharing this information! I can reproduce the behavior and am glad that now I know how to fix things if I run into this trouble again.
DM42 (free42, C47), DM15L, HP15C CE, HP35s, HP33s
Todddrum
Posts: 1
Joined: Fri Oct 28, 2022 2:50 am

Re: Program works in free42 (mostly) but not on DM42

Post by Todddrum »

I know this is an older post but I have been trying to solve the Okken Convert program running on my DM42 for a while. Thanks for sharing the solution I failed to solve on my own.
Post Reply