//************电网电压显示计算************************
Display_CON3S2S( UA_Display, UB_Display, UC_Display );
alpha = DisplayLS1 * DisplayLS1;
belta = DisplayLS2 * DisplayLS2;
LineVolSquare = ( alpha+belta ) * 0.3333;
for ( BiCount = 10; BiCount > 0; BiCount-- )
{
BiVari = ( BiMinInitial + BiMaxInitial ) * 0.5;
if ( ( BiVari * BiVari - LineVolSquare ) < 0 )
{
BiMinInitial = BiVari;
}
if ( ( BiVari * BiVari - LineVolSquare ) > 0 )
{
BiMaxInitial = BiVari;
}
}
COM_UAB = (int) ( BiVari );
COM_UBC = (int) ( BiVari );
BiMinInitial = 0;
BiMaxInitial = 1000;
在这段程序中,上下限比较起什么作用啊?是基于什么原理啊?往大侠指教 |