plot formatting on an HP 82162A printer - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: plot formatting on an HP 82162A printer (/thread-6645.html) plot formatting on an HP 82162A printer - 4ster - 08-02-2016 04:03 AM I've put together a little test rig that tests function of oxygen sensors in a rebreather. The output is recorded on an HP 82162A thermal printer. It is printing results from an HP 41 program. I'm having a small problem with plotter formatting of small numbers using REGPLOT. (I know, who plots on these anymore when there are such better options?) Here is a sample output for two sensors: Essentially, the deviation percentage from the expected value at different pressures of oxygen is what is being plotted. Zero is a perfect reading for each pressure. In the picture above: On the first plot the third sample deviation is small, less than 0.1%, so the calculator switches into engineering notation. That throws the plot formatting off. I would rather the calculator round this number to 0.0 and preserve formatting. During the plotting routine the calculator is set to FIX 1 instead of the default FIX 4 for the PRAXIS subroutine I am using to plot the Y axis. I'm not a great 41 programer, I've looked in my manuals and haven't yet discovered a flag setting or something that keeps the calculator display out of engineering mode for small numbers. The sensors being plotted here are older ones that don't perform as well as new ones. A new sensor is more likely to plot near the zero center axis, so there will be a higher likelihood of outputs near zero. Which will make the plot pretty hard to comprehend One solution is to write a little routine that replaces plotting small numbers with text "0.0". I'm guessing there is a better way I can't think of. I thought it would be worth asking you folks for the face palm solution lurking in the manual. Thanks, Steve RE: plot formatting on an HP 82162A printer - hth - 08-02-2016 05:11 AM (08-02-2016 04:03 AM)4ster Wrote:  I'm not a great 41 programer, I've looked in my manuals and haven't yet discovered a flag setting or something that keeps the calculator display out of engineering mode for small numbers. I have never used the printer, so I am not able to tell you how to solve it. However, when it comes to displaying small numbers in FIX, the calculator will attempt to round the number and keep the FIX mode, failing that it switches to SCI mode. That is probably what you are seeing. Meaning, 0.0001 will not be able to show in FIX 1, so you will see 1.0 -04 instead. The workaround is to use RND (round), to force the number to be rounded to the display setting. In this case that will change your small number to 0.0. I looked at the source of PRAXIS and it seemed to have a lot of RND going on before ACX (which I guess means accumulate value in X to printer output), so it would seem it is already doing that? Someone else probably know better. RE: plot formatting on an HP 82162A printer - 4ster - 08-02-2016 07:39 AM Thanks! I wanted the widest plot area I could get and FIX 1 precision is sufficient for what I am measuring. I just tried narrowing the Y axis a little and changed the display to FIX 2 and that fixes the problem for 99% of the expected data. That saves writing a kluge of a work around loop. It's not an ideal solution since I prefer an output using FIX 1 and maximum graphing space. Edit: It was late when I wrote the reply above and I didn't use your suggestion of inserting RND in the appropriate places until this morning. I'm embarrassed I didn't think of it, it works perfectly! I suspect all the RNDs in the PRAXIS source code are for setting up the axis parameters for printing the axis. Thanks again!