View Single Post
Old June 28th, 2021   #4
Junior Member
Join Date: Oct 2018
Location: London
Posts: 11

Originally Posted by FishAI View Post
Recently my colleague and I discussed one interesting bit of the E1-20 standard. Beneath Table A-14 is the following annotation:
"When a prefix is used with MEMORY, the multiplier refers to binary multiple. i.e. KILO means multiply by 1024."
I suspect you'll find most controllers are probably just concatenating the PREFIX and UNIT fields together, so the multiplier is more for the device end to ensure it sends the correct value, i.e. you need to divide your bytes measurement by 1024 to get the value you send to the controller.

The real edge case here is if they show mkg or g for grammes!

Originally Posted by FishAI View Post
Also, there is the special case of exponents being less than 1. What would you expect, if any device reports the following values:
SENSOR_VALUE: PresentValue: 0x00000120
Obviously the device reports some sort of undefined partially byte. But would you expect a value of 0.288 millibyte or something different?
We do not know any defined prefix for base 2 with the exponent being less than 1 (like kibi for the exponent being 3). Are there any?
Originally Posted by sblair View Post
I went back to Wayne Howell who wrote that portion of the original document. Here's his comments on the original thinking:Using milli etc was never considered and should be thought of as undefined.

Couldn't you use 128 millibytes (miB) to represent a bit?!
peternewman is offline   Reply With Quote