how to encode electrical measurements in two bytes?

V

Thread Starter

Valentina

I want to know if there is a common way to encode electrical measurements (current, voltage, energy, power...) in two bytes.

The precision is stopped to decimal part, and it is necessary using an exponent to identify the unit (exp(-3);....; exp(3);.....; exp(6)).
 
M

Michael Griffin

You need to look at how much range you actually need. Typically, two bytes will represent enough range, provided you scale the numbers accordingly. For example, if you are measuring voltage in the range of 0 to 20 volts, then you
could represent the numbers as milli-volts in the range of 0 to 20,000 milli-volts. The numbers can still be displayed in volts on a screen by simply placing the decimal point in the appropriate position (most MMI panels
allow this to be configured. This method is commonly called having an "implied decimal".
 
What PLC are you using? Most PLCs support floating point numbers/math. Even with older PLCs that do not support floating point values there is usually a way to split the values out across 2 words. You need to include more info with this question.
 
Top