![Cinergia GE10 Скачать руководство пользователя страница 54](http://html1.mh-extra.com/html/cinergia/ge10/ge10_installation-and-operation-manual_2607461054.webp)
GE AC Instalation and operation manual V10.docx
54
/ 63
8.
IQ MANAGEMENTS
Many of the parameters of this equipment are defined as IQ (Texas Instruments nomenclature).
An IQ number refers to a 32 bit signed integer and in its name it is specified in which bit the
decimal number begins. As an example, IQ21 means that the decimal part has 21 bits, the integer
part 10 and the first one is for the sign.
For the representation of the negative numbers:
X = X
· 2 + 2
And for the positive numbers:
X = X
· 2
As an example, 1.4142 in IQ10 representation:
1.4142 · 2 = 1448.155
Below there is a C# sample code for the representation:
IQ10 functions:
public double IQ10toFloat(double Var)
{
if (Var > 2147483648) //if the value is bigger than 2^31 (positive)
{
Var = Var - 4294967296;
// Var - 2^32
Var = Var / (1024); // Var/(2^10)
}
else
{
Var = Var / (1024);
}
return Var;
}
public UInt32 FloatToIQ10(double Var)
{
UInt32 Retorn=0;
if (Var <0 )
// if negative
{
Var = (1024*Var) + 4294967296;
// x*2^10 + 2^32
}
else
{
Var = Var * (1024);
}
Retorn = Convert.ToUInt32(Var);
return Retorn;
}