-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to handle odd units #14
Comments
Because of collisions in units and their prefixes, you must specify all combinations you want. Units prefixes are case insensitive. Consider these examples:
It all depends on your application and it is not possible to generate prefixes automaticly. |
I more meant suffixes. I understand the M problem above, and SCPI even just says it's banned to use milli hertz, milli ohms and megavolts. I was more meaning things like 400uVrms, 400mVrms and 400Vrms and 400uVpp, 400mVpp, 400Vpp, without specifying Vrms and Vpp as separate units, so the prefix would still do the x1000, /1000 type multipliers, but the suffix could have some other factor after the prefix was applied. Just idle thoughts really. |
I now understand what you want. There could be one array of units and each unit connected to array with possible prefixes for that unit. V -> U,M,,K But now, it is not possible and it is hard to implement. The best way now is to expand all possible prefixes with all possible suffixes. |
Indeed, I know it's not really possible in the current library, just something to think about .) |
Feel free to implement it ;) |
I know that I can provide my own entire array of units, but do you have ideas on how best to handle things like "Vrms" and Vpp, while still keeping all the existing SI unit prefixes? so I can have mVrms and uVrms without having to to duplicate all the units for all the combinations?
I'm probably just going to ignore supporting this in the direct SOURce#:APPLy:SIN [freq], [ampl], [offset] type functions, and only allow changing it via the explicit SOURce#:VOLTage:UNIT command, but was wondering if you had any ideas on how best to handle this
The text was updated successfully, but these errors were encountered: