05-13-2023, 11:11 AM
05-13-2023, 11:55 AM
I'm not sure of the specifics of how the HP48GX approach to Units has been implemented by Thomas in Plus42, but the 48 has the UBASE command, which converts any Unit object on the stack to its SI base unit. From there you could create a simple program which you could trigger from your Plus42 user keyboard. Once you have your base SI unit, in most cases you simply need a factor of 10 to convert to your desired unit. e.g. 125_mm is 0.125_M in SI units.
05-13-2023, 12:01 PM
(05-13-2023 11:55 AM)jonmoore Wrote: [ -> ]I'm not sure of the specifics of how the HP48GX approach to Units has been implemented by Thomas in Plus42, but the 48 has the UBASE command, which converts any Unit object on the stack to its SI base unit. From there you could create a simple program which you could trigger from your Plus42 user keyboard. Once you have your base SI unit, in most cases you simply need a factor of 10 to convert to your desired unit. e.g. 125_mm is 0.125_M in SI units.
Thank you very much John, I was looking at the code of Plus42 recently and I saw all the SI units mentioned in there, so I wondered if there is an easy way to do this. Right now I have created my own custom units so the conversion is easy, just wondered if I was missing a cool keystroke combo or anything.
05-13-2023, 01:40 PM
As I understand things, Thomas based his implementation of Units in Plus42 on the 48's Units implementation.
To be specific, SI Base units aren't the metric system per se, they're the universals for time, length, mass etc. e.g. Much as mm is a metric unit, the SI unit of length is the meter (confusingly, denoted with a lowercase m by SI but with a capital M in HP calculators). The Ubase command converts any unit to its SI unit equivalent, which may not seem so useful on first look, but when you're chaining unit calculations, converting first to SI units ensures you're always calculating like units.
Symbol - Name - Quantity
s - second - time
m - metre - length
kg - kilogram - mass
A - ampere - electric current
K - kelvin - thermodynamic temperature
mol - mole - amount of substance
cd - candela - luminous intensity
Incidentally, I've just checked the Plus42 docs and Thomas has implemented the Ubase command. I don't know what platform you're using Plus42 on, so this next tip may or may not be so practical. On the 48 line of calculators you don't have to go through the the Unit's catalog to input units. You simply type an underscore and the symbol for the unit directly. e.g. 486_mm for millimeters or .486_M for meters.
Here's a link to the relevant section of the Plus42 docs: https://www.thomasokken.com/plus42/#units
However, those docs don't provide the fully skinny for working with units on the Plus 42. For that you'll need to refer to the HP48 series docs:
https://literature.hpcalc.org/items/375 - This is the User Guide and chapter 10 deals with Unit objects.
https://literature.hpcalc.org/items/370 - And this is the Advanced User Guide which has a very handy appendix (B) which shows native 48 units and their SI equivalent. It has to be remembered that vintage HP calculators where primarily designed for the US market, hence the default units in the table are US unit's (however, it's my understanding that internally the calculator uses the SI equivalent).
To be specific, SI Base units aren't the metric system per se, they're the universals for time, length, mass etc. e.g. Much as mm is a metric unit, the SI unit of length is the meter (confusingly, denoted with a lowercase m by SI but with a capital M in HP calculators). The Ubase command converts any unit to its SI unit equivalent, which may not seem so useful on first look, but when you're chaining unit calculations, converting first to SI units ensures you're always calculating like units.
Symbol - Name - Quantity
s - second - time
m - metre - length
kg - kilogram - mass
A - ampere - electric current
K - kelvin - thermodynamic temperature
mol - mole - amount of substance
cd - candela - luminous intensity
Incidentally, I've just checked the Plus42 docs and Thomas has implemented the Ubase command. I don't know what platform you're using Plus42 on, so this next tip may or may not be so practical. On the 48 line of calculators you don't have to go through the the Unit's catalog to input units. You simply type an underscore and the symbol for the unit directly. e.g. 486_mm for millimeters or .486_M for meters.
Here's a link to the relevant section of the Plus42 docs: https://www.thomasokken.com/plus42/#units
However, those docs don't provide the fully skinny for working with units on the Plus 42. For that you'll need to refer to the HP48 series docs:
https://literature.hpcalc.org/items/375 - This is the User Guide and chapter 10 deals with Unit objects.
https://literature.hpcalc.org/items/370 - And this is the Advanced User Guide which has a very handy appendix (B) which shows native 48 units and their SI equivalent. It has to be remembered that vintage HP calculators where primarily designed for the US market, hence the default units in the table are US unit's (however, it's my understanding that internally the calculator uses the SI equivalent).
05-13-2023, 05:39 PM
(05-13-2023 01:40 PM)jonmoore Wrote: [ -> ]As I understand things, Thomas based his implementation of Units in Plus42 on the 48's Units implementation.
To be specific, SI Base units aren't the metric system per se, they're the universals for time, length, mass etc. e.g. Much as mm is a metric unit, the SI unit of length is the meter (confusingly, denoted with a lowercase m by SI but with a capital M in HP calculators). The Ubase command converts any unit to its SI unit equivalent, which may not seem so useful on first look, but when you're chaining unit calculations, converting first to SI units ensures you're always calculating like units.
Symbol - Name - Quantity
s - second - time
m - metre - length
kg - kilogram - mass
A - ampere - electric current
K - kelvin - thermodynamic temperature
mol - mole - amount of substance
cd - candela - luminous intensity
Incidentally, I've just checked the Plus42 docs and Thomas has implemented the Ubase command. I don't know what platform you're using Plus42 on, so this next tip may or may not be so practical. On the 48 line of calculators you don't have to go through the the Unit's catalog to input units. You simply type an underscore and the symbol for the unit directly. e.g. 486_mm for millimeters or .486_M for meters.
Here's a link to the relevant section of the Plus42 docs: https://www.thomasokken.com/plus42/#units
However, those docs don't provide the fully skinny for working with units on the Plus 42. For that you'll need to refer to the HP48 series docs:
https://literature.hpcalc.org/items/375 - This is the User Guide and chapter 10 deals with Unit objects.
https://literature.hpcalc.org/items/370 - And this is the Advanced User Guide which has a very handy appendix (B) which shows native 48 units and their SI equivalent. It has to be remembered that vintage HP calculators where primarily designed for the US market, hence the default units in the table are US unit's (however, it's my understanding that internally the calculator uses the SI equivalent).
Thank you very much for the details Jon
05-13-2023, 08:24 PM
(05-13-2023 01:40 PM)jonmoore Wrote: [ -> ]Incidentally, I've just checked the Plus42 docs and Thomas has implemented the Ubase command. I don't know what platform you're using Plus42 on, so this next tip may or may not be so practical. On the 48 line of calculators you don't have to go through the the Unit's catalog to input units. You simply type an underscore and the symbol for the unit directly. e.g. 486_mm for millimeters or .486_M for meters.Just a quick correction.
On hp50 (and 48, i suppose), the symbol for meter is "m", not "M".
As a matter of fact any operation using "M" fails with errore "invalid unit"
05-13-2023, 10:57 PM
(05-13-2023 08:24 PM)Marco Polo Wrote: [ -> ]As a matter of fact any operation using "M" fails with errore "invalid unit"
M is the prefix for Mega so it needs a unit to go with it.
e.g. (on the 48) 1_Mg 1_Kg + ENTER
-> 1001Kg
05-14-2023, 03:24 AM
Ok based on this last comment, it seems that the easiest way to convert between SI prefixes, for example between seconds and milliseconds is to type the SI prefix manually and then it seems to be working.
For example
1_s 1_ms + -> 1,001_ms
The SI prefix can be entered manually by hitting shift . For the underscore plus whatever letters needed.
Thanks everyone for helping with this
For example
1_s 1_ms + -> 1,001_ms
The SI prefix can be entered manually by hitting shift . For the underscore plus whatever letters needed.
Thanks everyone for helping with this
05-14-2023, 06:42 AM
(05-13-2023 08:24 PM)Marco Polo Wrote: [ -> ](05-13-2023 01:40 PM)jonmoore Wrote: [ -> ]Incidentally, I've just checked the Plus42 docs and Thomas has implemented the Ubase command. I don't know what platform you're using Plus42 on, so this next tip may or may not be so practical. On the 48 line of calculators you don't have to go through the the Unit's catalog to input units. You simply type an underscore and the symbol for the unit directly. e.g. 486_mm for millimeters or .486_M for meters.Just a quick correction.
On hp50 (and 48, i suppose), the symbol for meter is "m", not "M".
As a matter of fact any operation using "M" fails with errore "invalid unit"
The information I've provided is correct for both 48GX and 50g as can be seen below:
Maybe Thomas altered things slightly for Plus42. But this seems unlikely, as he's always chosen HP UX conventions over modern conveniences in the past.
It must also be remembered that there are inconsistencies in the use of upper and lower case letters in the HP Units catalog due the the USA first aspect of HP Calculators - who new HP got there years before Donald J Trump (sorry couldn't resist being a Euro Socialist type!)
But there are many inconsistencies between SI conventions and the wider metric system from a lexigraphic perspective so "people in glass houses" and all that jazz.
05-14-2023, 11:00 AM
(05-14-2023 06:42 AM)jonmoore Wrote: [ -> ]I see you are using microfont.(05-13-2023 08:24 PM)Marco Polo Wrote: [ -> ]Just a quick correction.
On hp50 (and 48, i suppose), the symbol for meter is "m", not "M".
As a matter of fact any operation using "M" fails with errore "invalid unit"
The information I've provided is correct for both 48GX and 50g as can be seen below:
Maybe Thomas altered things slightly for Plus42. But this seems unlikely, as he's always chosen HP UX conventions over modern conveniences in the past.
It must also be remembered that there are inconsistencies in the use of upper and lower case letters in the HP Units catalog due the the USA first aspect of HP Calculators - who new HP got there years before Donald J Trump (sorry couldn't resist being a Euro Socialist type!)
But there are many inconsistencies between SI conventions and the wider metric system from a lexigraphic perspective so "people in glass houses" and all that jazz.
Microfont "M" and "m" are indentical, except size. So the "M" you are representing in your screenshot is actually a "m".
The above if i correctly read your screeshot
05-16-2023, 03:42 PM
If you just want something like Casio's engineering symbols (i.e. a different form of engineering display mode using alpha prefixes, with no attachment to any specific units), I wrote a program to do that a few years ago:
https://www.hpmuseum.org/forum/thread-13096.html
This allows doing all the same things you would on a Casio: entry and display of figures using engineering symbols (e.g. 2500k), and displaying a result converted to different symbol/mantissa (e.g. 2500k, 2.5M, 2500000, etc.).
https://www.hpmuseum.org/forum/thread-13096.html
This allows doing all the same things you would on a Casio: entry and display of figures using engineering symbols (e.g. 2500k), and displaying a result converted to different symbol/mantissa (e.g. 2500k, 2.5M, 2500000, etc.).
05-17-2023, 01:55 AM
(05-16-2023 03:42 PM)Dave Britten Wrote: [ -> ]If you just want something like Casio's engineering symbols (i.e. a different form of engineering display mode using alpha prefixes, with no attachment to any specific units), I wrote a program to do that a few years ago:
https://www.hpmuseum.org/forum/thread-13096.html
This allows doing all the same things you would on a Casio: entry and display of figures using engineering symbols (e.g. 2500k), and displaying a result converted to different symbol/mantissa (e.g. 2500k, 2.5M, 2500000, etc.).
Very useful Dave. Ta muchly.
05-17-2023, 02:02 AM
(05-14-2023 11:00 AM)Marco Polo Wrote: [ -> ]I see you are using microfont.
Microfont "M" and "m" are indentical, except size. So the "M" you are representing in your screenshot is actually a "m".
The above if i correctly read your screeshot
I spotted this myself after posting (but thought I might get away with it). The coffee obviously hadn't kicked in on Sunday morning, else I really need to respond to my optometrist who's been chasing me for the last six months to update my prescription!