Post Reply 
Strange behavior of HP-41CV with Math PAC and IR Printer Module
10-09-2020, 04:46 PM
Post: #1
Strange behavior of HP-41CV with Math PAC and IR Printer Module
I have an HP-41CV with the Math, Stress and Structural Analysis PAC modules installed. When I run test problems for the Math PAC POLY (Polynomial Solutions) program without the IR Printer module installed, I get the correct results. However, when I install the IR Printer module, the results are completely incorrect. As soon as I remove the IR Printer module, the results are correct again. The SIZE parameter is set high enough for the requirements of the program. Has anyone encountered this problem, and if so, do you know what is the cause ?
Find all posts by this user
Quote this message in a reply
10-09-2020, 05:29 PM
Post: #2
RE: Strange behavior of HP-41CV with Math PAC and IR Printer Module
I have not checked, but I am guessing that you may have a duplicate label issue.
Try running your POLY program with IR printer module in port 4 to see if the results are now corrects.
Find all posts by this user
Quote this message in a reply
10-09-2020, 05:39 PM
Post: #3
RE: Strange behavior of HP-41CV with Math PAC and IR Printer Module
Additional to Sylvain's suggestion, I would also investigate flag use.

Math Pac polynomial uses flag 21 and this flag is also used by Blinky for printer enabling.

Etienne
Visit this user's website Find all posts by this user
Quote this message in a reply
10-09-2020, 07:24 PM
Post: #4
RE: Strange behavior of HP-41CV with Math PAC and IR Printer Module
(10-09-2020 05:29 PM)Sylvain Cote Wrote:  I have not checked, but I am guessing that you may have a duplicate label issue.
Try running your POLY program with IR printer module in port 4 to see if the results are now corrects.

It's already installed in Port 4.
Find all posts by this user
Quote this message in a reply
10-09-2020, 07:31 PM
Post: #5
RE: Strange behavior of HP-41CV with Math PAC and IR Printer Module
(10-09-2020 05:39 PM)Etienne Victoria Wrote:  Additional to Sylvain's suggestion, I would also investigate flag use.

Math Pac polynomial uses flag 21 and this flag is also used by Blinky for printer enabling.

Etienne

That's it. With the IR Printer Module installed, flag 21 = YES. With it removed, it is NO. I wonder how many other application PAC programs also have this conflict.

Thanks!
Find all posts by this user
Quote this message in a reply
10-09-2020, 10:06 PM
Post: #6
RE: Strange behavior of HP-41CV with Math PAC and IR Printer Module
That sounds like an uber-bizarre conflict. Flag 21 has been the Printer Enable flag since day 1, so it sounds extremely unlikely that any program would use it for any conflicting purpose. Are you sure the problem isn't that the program is halting on a VIEW or AVIEW when flag 21 is set, while you're expecting it to keep running? I've run into that kind of problem with programs on the HP-42S as well.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-10-2020, 02:07 AM
Post: #7
RE: Strange behavior of HP-41CV with Math PAC and IR Printer Module
(10-09-2020 10:06 PM)Thomas Okken Wrote:  That sounds like an uber-bizarre conflict. Flag 21 has been the Printer Enable flag since day 1, so it sounds extremely unlikely that any program would use it for any conflicting purpose. Are you sure the problem isn't that the program is halting on a VIEW or AVIEW when flag 21 is set, while you're expecting it to keep running? I've run into that kind of problem with programs on the HP-42S as well.

According to Appendix A of the MATH PAC module, Flag 21 is used by the POLY program. In fact, the second line is the program after the label is SF 21, so regardless of the initial state of Flag 21, it ends up getting set by the program. The only common factor here is that the results are good when the IR Printer module is absent, and they are bad (incorrect) when the IR Printer module is present, regardless of the original state of Flag 21.
Find all posts by this user
Quote this message in a reply
10-10-2020, 02:55 AM (This post was last modified: 10-10-2020 02:55 AM by Thomas Okken.)
Post: #8
RE: Strange behavior of HP-41CV with Math PAC and IR Printer Module
(10-10-2020 02:07 AM)Michael de Estrada Wrote:  According to Appendix A of the MATH PAC module, Flag 21 is used by the POLY program. In fact, the second line is the program after the label is SF 21, so regardless of the initial state of Flag 21, it ends up getting set by the program. The only common factor here is that the results are good when the IR Printer module is absent, and they are bad (incorrect) when the IR Printer module is present, regardless of the original state of Flag 21.

I just checked the POLY program, and it only sets flag 21, it never tests it. The only effect it can possibly have is on the AVIEW instructions on lines 256, 273, 276, 279, and 282.

VIEW and AVIEW halt program execution if flag 21 is set while flag 55 is clear; this is so that programs that want to print will give the user a chance to see their results in the display if no printer is present. I don't have an IR Printer module, but I assume that when it is present, flag 55 is set, so the behavior of the POLY program will change depending on whether the module is present or not. If you point the module at a printer, I am sure you will see the program's output appear there.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-10-2020, 03:10 AM (This post was last modified: 10-10-2020 03:28 AM by Michael de Estrada.)
Post: #9
RE: Strange behavior of HP-41CV with Math PAC and IR Printer Module
(10-10-2020 02:55 AM)Thomas Okken Wrote:  
(10-10-2020 02:07 AM)Michael de Estrada Wrote:  According to Appendix A of the MATH PAC module, Flag 21 is used by the POLY program. In fact, the second line is the program after the label is SF 21, so regardless of the initial state of Flag 21, it ends up getting set by the program. The only common factor here is that the results are good when the IR Printer module is absent, and they are bad (incorrect) when the IR Printer module is present, regardless of the original state of Flag 21.

I just checked the POLY program, and it only sets flag 21, it never tests it. The only effect it can possibly have is on the AVIEW instructions on lines 256, 273, 276, 279, and 282.

VIEW and AVIEW halt program execution if flag 21 is set while flag 55 is clear; this is so that programs that want to print will give the user a chance to see their results in the display if no printer is present. I don't have an IR Printer module, but I assume that when it is present, flag 55 is set, so the behavior of the POLY program will change depending on whether the module is present or not. If you point the module at a printer, I am sure you will see the program's output appear there.

You are correct. Flag 55 is set with the IR Printer module installed and is clear with it removed. I can't check this out ATM since my IR printer is kaput (burned out printer head), but should have a replacement in about a week, and will check this out at that time.

Edit - I just hooked up my printer and indeed it does operate as you said, although it just prints blank lines now, its behavior suggests that it is printing the results without the calculator pausing for user input via the R/S key. The value in the display is in fact the last root that is left in the x register when the program stops. So further pressing of the R/S key simply produces new values that have no relationship to the true output. Since Flag 55 cannot be cleared, the only way to get output sent to the display is to remove the IR Printer module when a printer is not being used.
Find all posts by this user
Quote this message in a reply
10-10-2020, 03:13 AM
Post: #10
RE: Strange behavior of HP-41CV with Math PAC and IR Printer Module
I checked the 82242A manual, and it looks like you should be able to get things to behave as desired by executing PRTOFF. That should disable printing, specifically, clear flag 55 so the calculator will behave as though no printer is present, and flag 21 will cause VIEW and AVIEW to halt program execution.

This should be analogous to PROFF on the HP-42S.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-10-2020, 03:41 AM
Post: #11
RE: Strange behavior of HP-41CV with Math PAC and IR Printer Module
(10-10-2020 03:13 AM)Thomas Okken Wrote:  I checked the 82242A manual, and it looks like you should be able to get things to behave as desired by executing PRTOFF. That should disable printing, specifically, clear flag 55 so the calculator will behave as though no printer is present, and flag 21 will cause VIEW and AVIEW to halt program execution.

This should be analogous to PROFF on the HP-42S.

Confirmed !
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)