plot formatting on an HP 82162A printer
|
08-02-2016, 04:03 AM
(This post was last modified: 08-02-2016 04:17 PM by 4ster.)
Post: #1
|
|||
|
|||
plot formatting on an HP 82162A printer
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 Steve In order of appearance: HP 41CV, CMT-MCGPS, HP 41CX, DM 41, DM 42 |
|||
08-02-2016, 05:11 AM
Post: #2
|
|||
|
|||
RE: plot formatting on an HP 82162A printer
(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. |
|||
08-02-2016, 07:39 AM
(This post was last modified: 08-02-2016 02:05 PM by 4ster.)
Post: #3
|
|||
|
|||
RE: plot formatting on an HP 82162A printer
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! Steve In order of appearance: HP 41CV, CMT-MCGPS, HP 41CX, DM 41, DM 42 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)