EasyManua.ls Logo

Cinergia B2C10 - Iq Management

Cinergia B2C10
56 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
EL DC Instalation and operation manual v13.docx
47 / 56
6.1. IQ MANAGEMENT
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:



And for the positive numbers:


As an example, 1.4142 in IQ10 representation:



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;
}

Table of Contents