16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 20:59:19 +02:00

Poprawione do końca pliku.

This commit is contained in:
firleju
2016-09-30 06:49:11 +02:00
parent e63efabe15
commit 5f7d4cc34b
2 changed files with 366 additions and 331 deletions

View File

@@ -2367,28 +2367,22 @@ bool TFV4aM::EQ(double pos, double i_pos)
//---FV4a/M--- nowonapisany kran bez poprawki IC //---FV4a/M--- nowonapisany kran bez poprawki IC
double TMHZ_EN57::GetPF(double i_bcp, double PP, double HP, double dt, double ep) double TMHZ_EN57::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
{ double result;/*?*//*SUB-FUNCTION TO BE EXTRACTED*/double LPP_RP(double pos) //cisnienie z zaokraglonej pozycji; {
{ double result; static int const LBDelay = 100;
if( pos>8.5 )
LPP_RP =5.0-0.15*pos-0.35;else if( pos>0.5 )
LPP_RP =5.0-0.15*pos-0.1;else
LPP_RP =5.0;return result;
}
/*?*//*SUB-FUNCTION TO BE EXTRACTED*/bool EQ(double pos, double i_pos)
{ bool result;
EQ =( pos<=i_pos+0.5 )&&( pos>i_pos-0.5 );
return result;
}
static double/*?*/ const LBDelay = 100; double LimPP;
double dpPipe;
double LimPP; double dpPipe; double dpMainValve; double ActFlowSpeed; double DP; double dpMainValve;
double ActFlowSpeed;
double DP;
double pom; double pom;
Byte i; Byte i;
{
{ long i_end = 5 ; for( i = 0 ; i < i_end ; ++i ) long i_end = 5;
Sounds[ i ] =0;} for (i = 0; i < i_end; ++i)
Sounds[i] = 0;
}
DP = 0; DP = 0;
i_bcp = Max0R(Min0R(i_bcp, 9.999), -0.999); // na wszelki wypadek, zeby nie wyszlo poza zakres i_bcp = Max0R(Min0R(i_bcp, 9.999), -0.999); // na wszelki wypadek, zeby nie wyszlo poza zakres
@@ -2408,25 +2402,33 @@ return result;
LimPP = Min0R(LPP_RP(i_bcp) + TP * 0.08 + RedAdj, HP); // pozycja + czasowy lub zasilanie LimPP = Min0R(LPP_RP(i_bcp) + TP * 0.08 + RedAdj, HP); // pozycja + czasowy lub zasilanie
ActFlowSpeed = 4; ActFlowSpeed = 4;
if( ( EQ( i_bcp, -1 ) ) ) pom =Min0R( HP, 5.4+RedAdj );else pom =Min0R( CP, HP ); if ((EQ(i_bcp, -1)))
pom = Min0R(HP, 5.4 + RedAdj);
else
pom = Min0R(CP, HP);
if ((LimPP > CP)) // podwyzszanie szybkie if ((LimPP > CP)) // podwyzszanie szybkie
CP =CP+60*Min0R( abs( LimPP-CP ), 0.05 )*PR( CP, LimPP )*dt //zbiornik sterujacy;else CP = CP + 60 * Min0R(abs(LimPP - CP), 0.05) * PR(CP, LimPP) * dt; // zbiornik sterujacy;
else
CP = CP + 13 * Min0R(abs(LimPP - CP), 0.05) * PR(CP, LimPP) * dt; // zbiornik sterujacy CP = CP + 13 * Min0R(abs(LimPP - CP), 0.05) * PR(CP, LimPP) * dt; // zbiornik sterujacy
LimPP = pom; // cp LimPP = pom; // cp
if (EQ(i_bcp, -1)) if (EQ(i_bcp, -1))
dpPipe =HP;else dpPipe = HP;
else
dpPipe = Min0R(HP, LimPP); dpPipe = Min0R(HP, LimPP);
if (dpPipe > PP) if (dpPipe > PP)
dpMainValve =-PFVa( HP, PP, ActFlowSpeed*1.0/( LBDelay ), dpPipe, 0.4 );else dpMainValve = -PFVa(HP, PP, ActFlowSpeed * 1.0 / (LBDelay), dpPipe, 0.4);
else
dpMainValve = PFVd(PP, 0, ActFlowSpeed * 1.0 / (LBDelay), dpPipe, 0.4); dpMainValve = PFVd(PP, 0, ActFlowSpeed * 1.0 / (LBDelay), dpPipe, 0.4);
if (EQ(i_bcp, -1)) if (EQ(i_bcp, -1))
{ {
if( ( TP<5 ) ) TP =TP+dt; //5/10 if ((TP < 5))
if( ( TP<1 ) ) TP =TP-0.5*dt; //5/10 TP = TP + dt; // 5/10
if ((TP < 1))
TP = TP - 0.5 * dt; // 5/10
} }
if ((EQ(i_bcp, 10)) || (EQ(i_bcp, -2))) if ((EQ(i_bcp, 10)) || (EQ(i_bcp, -2)))
@@ -2441,16 +2443,17 @@ return result;
else else
{ {
if (dpMainValve > 0) if (dpMainValve > 0)
Sounds[ s_fv4a_b ] =dpMainValve;else Sounds[s_fv4a_b] = dpMainValve;
else
Sounds[s_fv4a_u] = -dpMainValve; Sounds[s_fv4a_u] = -dpMainValve;
} }
if ((i_bcp < 1.5)) if ((i_bcp < 1.5))
RP =Max0R( 0, 0.125*i_bcp );else RP = Max0R(0, 0.125 * i_bcp);
else
RP = Min0R(1, 0.125 * i_bcp - 0.125); RP = Min0R(1, 0.125 * i_bcp - 0.125);
GetPF =dpMainValve*dt; return dpMainValve * dt;
return result;
} }
void TMHZ_EN57::Init(double Press) void TMHZ_EN57::Init(double Press)
@@ -2468,46 +2471,63 @@ void TMHZ_EN57::SetReductor(double nAdj)
} }
double TMHZ_EN57::GetSound(Byte i) double TMHZ_EN57::GetSound(Byte i)
{ double result; {
if (i > 4) if (i > 4)
GetSound =0;else return 0;
GetSound =Sounds[ i ]; else
return result; return Sounds[i];
} }
double TMHZ_EN57::GetPos(Byte i) double TMHZ_EN57::GetPos(Byte i)
{ double result; {
static double const table[11] = ( -2, 10, -1, 0, 0, 2, 9, 10, 0, 0, 0 ); static double const table[11] = { -2, 10, -1, 0, 0, 2, 9, 10, 0, 0, 0 };
GetPos =table[ i ]; return table[i];
return result;
} }
double TMHZ_EN57::GetCP() double TMHZ_EN57::GetCP()
{ double result; {
GetCP =RP; return RP;
return result;
} }
double TMHZ_EN57::GetEP(double pos) double TMHZ_EN57::GetEP(double pos)
{ double result; {
if (pos < 9.5) if (pos < 9.5)
GetEP =Min0R( Max0R( 0, 0.125*pos ), 1 );else return Min0R(Max0R(0, 0.125 * pos), 1);
GetEP =0; else
return result; return 0;
}
double TMHZ_EN57::LPP_RP(double pos) // cisnienie z zaokraglonej pozycji;
{
if (pos > 8.5)
return 5.0 - 0.15 * pos - 0.35;
else if (pos > 0.5)
return 5.0 - 0.15 * pos - 0.1;
else
return 5.0;
}
bool TMHZ_EN57::EQ(double pos, double i_pos)
{
return (pos <= i_pos + 0.5) && (pos > i_pos - 0.5);
} }
//---M394--- Matrosow //---M394--- Matrosow
double TM394::GetPF(double i_bcp, double PP, double HP, double dt, double ep) double TM394::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
{ double result; {
static double/*?*/ const LBDelay = 65; static int const LBDelay = 65;
double LimPP; double dpPipe; double dpMainValve; double ActFlowSpeed; double LimPP;
double dpPipe;
double dpMainValve;
double ActFlowSpeed;
int BCP; int BCP;
BCP =Round( i_bcp ); BCP = lround(i_bcp);
if( BCP<-1 ) BCP =1; if (BCP < -1)
BCP = 1;
LimPP = Min0R(BPT_394[BCP][1], HP); LimPP = Min0R(BPT_394[BCP][1], HP);
ActFlowSpeed = BPT_394[BCP][0]; ActFlowSpeed = BPT_394[BCP][0];
@@ -2517,11 +2537,15 @@ double TM394::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
LimPP = LimPP + RedAdj; LimPP = LimPP + RedAdj;
if ((BCP != 2)) if ((BCP != 2))
if (CP < LimPP) if (CP < LimPP)
CP =CP+4*Min0R( abs( LimPP-CP ), 0.05 )*PR( CP, LimPP )*dt //zbiornik sterujacy CP = CP + 4 * Min0R(abs(LimPP - CP), 0.05) * PR(CP, LimPP) * dt; // zbiornik sterujacy
// cp:=cp+6*(2+Byte(bcp<0))*Min0R(abs(Limpp-cp),0.05)*PR(cp,Limpp)*dt //zbiornik sterujacy;else // cp:=cp+6*(2+Byte(bcp<0))*Min0R(abs(Limpp-cp),0.05)*PR(cp,Limpp)*dt //zbiornik
if( BCP==0 ) // sterujacy;
CP =CP-0.2*dt*1.0/100;else else if (BCP == 0)
CP =CP+4*( 1+Byte( BCP!=3 )+Byte( BCP>4 ) )*Min0R( abs( LimPP-CP ), 0.05 )*PR( CP, LimPP )*dt; //zbiornik sterujacy CP = CP - 0.2 * dt * 1.0 / 100;
else
CP = CP +
4 * (1 + Byte(BCP != 3) + Byte(BCP > 4)) * Min0R(abs(LimPP - CP), 0.05) *
PR(CP, LimPP) * dt; // zbiornik sterujacy
LimPP = CP; LimPP = CP;
dpPipe = Min0R(HP, LimPP); dpPipe = Min0R(HP, LimPP);
@@ -2532,17 +2556,12 @@ double TM394::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
dpMainValve = PF(dpPipe, PP, ActFlowSpeed * 1.0 / (LBDelay)) * dt; dpMainValve = PF(dpPipe, PP, ActFlowSpeed * 1.0 / (LBDelay)) * dt;
if (BCP == -1) if (BCP == -1)
// begin
dpMainValve = PF(HP, PP, (ActFlowSpeed)*1.0 / (LBDelay)) * dt; dpMainValve = PF(HP, PP, (ActFlowSpeed)*1.0 / (LBDelay)) * dt;
// end;
if (BCP == i_bcpno) if (BCP == i_bcpno)
// begin
dpMainValve = PF(0, PP, (ActFlowSpeed)*1.0 / (LBDelay)) * dt; dpMainValve = PF(0, PP, (ActFlowSpeed)*1.0 / (LBDelay)) * dt;
// end;
GetPF =dpMainValve; return dpMainValve;
return result;
} }
void TM394::Init(double Press) void TM394::Init(double Press)
@@ -2559,36 +2578,41 @@ void TM394::SetReductor(double nAdj)
} }
double TM394::GetCP() double TM394::GetCP()
{ double result; {
GetCP = CP; return CP;
return result;
} }
double TM394::GetPos(Byte i) double TM394::GetPos(Byte i)
{ double result; {
static double const table[11] = ( -1, 5, -1, 0, 1, 2, 4, 5, 0, 0, 0 ); static double const table[11] = { -1, 5, -1, 0, 1, 2, 4, 5, 0, 0, 0 };
GetPos =table[ i ]; return table[i];
return result;
} }
//---H14K1-- Knorr //---H14K1-- Knorr
double TH14K1::GetPF(double i_bcp, double PP, double HP, double dt, double ep) double TH14K1::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
{ double result; {
static double/*?*/ const LBDelay = 100; //szybkosc + zasilanie sterujacego static int const LBDelay = 100; // szybkosc + zasilanie sterujacego
static double const BPT_K[ /*?*//*-1..4*/ (4)-(-1)+1 ][2] = ( ( 10 , 0 ) , ( 4 , 1 ) , ( 0 , 1 ) , ( 4 , 0 ) , ( 4 , -1 ) , ( 15 , -1 ) ); static double const BPT_K[/*?*/ /*-1..4*/ (4) - (-1) + 1][2] =
static double/*?*/ const NomPress = 5.0; { (10, 0), (4, 1), (0, 1), (4, 0), (4, -1), (15, -1) };
static double const NomPress = 5.0;
double LimPP; double dpPipe; double dpMainValve; double ActFlowSpeed; double LimPP;
double dpPipe;
double dpMainValve;
double ActFlowSpeed;
int BCP; int BCP;
BCP =Round( i_bcp ); BCP = lround(i_bcp);
if( i_bcp<-1 ) BCP =1; if (i_bcp < -1)
BCP = 1;
LimPP = BPT_K[BCP][1]; LimPP = BPT_K[BCP][1];
if (LimPP < 0) if (LimPP < 0)
LimPP =0.5*PP;else if( LimPP>0 ) LimPP = 0.5 * PP;
LimPP =PP;else else if (LimPP > 0)
LimPP = PP;
else
LimPP = CP; LimPP = CP;
ActFlowSpeed = BPT_K[BCP][0]; ActFlowSpeed = BPT_K[BCP][0];
@@ -2605,8 +2629,7 @@ double TH14K1::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
if (BCP == i_bcpno) if (BCP == i_bcpno)
dpMainValve = PF(0, PP, (ActFlowSpeed)*1.0 / (LBDelay)) * dt; dpMainValve = PF(0, PP, (ActFlowSpeed)*1.0 / (LBDelay)) * dt;
GetPF =dpMainValve; return dpMainValve;
return result;
} }
void TH14K1::Init(double Press) void TH14K1::Init(double Press)
@@ -2623,42 +2646,48 @@ void TH14K1::SetReductor(double nAdj)
} }
double TH14K1::GetCP() double TH14K1::GetCP()
{ double result; {
GetCP = CP; return CP;
return result;
} }
double TH14K1::GetPos(Byte i) double TH14K1::GetPos(Byte i)
{ double result; {
static double const table[11] = ( -1, 4, -1, 0, 1, 2, 3, 4, 0, 0, 0 ); static double const table[11] = { -1, 4, -1, 0, 1, 2, 3, 4, 0, 0, 0 };
GetPos =table[ i ]; return table[i];
return result;
} }
//---St113-- Knorr EP //---St113-- Knorr EP
double TSt113::GetPF(double i_bcp, double PP, double HP, double dt, double ep) double TSt113::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
{ double result; {
static double/*?*/ const LBDelay = 100; //szybkosc + zasilanie sterujacego static int const LBDelay = 100; // szybkosc + zasilanie sterujacego
static double const BPT_K[ /*?*//*-1..4*/ (4)-(-1)+1 ][2] = ( ( 10 , 0 ) , ( 4 , 1 ) , ( 0 , 1 ) , ( 4 , 0 ) , ( 4 , -1 ) , ( 15 , -1 ) ); static double const BPT_K[/*?*/ /*-1..4*/ (4) - (-1) + 1][2] =
static double const BEP_K[ /*?*//*-1..5*/ (5)-(-1)+1 ] = ( 0 , -1 , 1 , 0 , 0 , 0 , 0 ); { (10, 0), (4, 1), (0, 1), (4, 0), (4, -1), (15, -1) };
static double/*?*/ const NomPress = 5.0; static double const BEP_K[/*?*/ /*-1..5*/ (5) - (-1) + 1] = { 0, -1, 1, 0, 0, 0, 0 };
static double const NomPress = 5.0;
double LimPP; double dpPipe; double dpMainValve; double ActFlowSpeed; double LimPP;
double dpPipe;
double dpMainValve;
double ActFlowSpeed;
int BCP; int BCP;
BCP =Round( i_bcp ); BCP = lround(i_bcp);
EPS = BEP_K[BCP]; EPS = BEP_K[BCP];
if( BCP>0 ) BCP =BCP-1; if (BCP > 0)
BCP = BCP - 1;
if( BCP<-1 ) BCP =1; if (BCP < -1)
BCP = 1;
LimPP = BPT_K[BCP][1]; LimPP = BPT_K[BCP][1];
if (LimPP < 0) if (LimPP < 0)
LimPP =0.5*PP;else if( LimPP>0 ) LimPP = 0.5 * PP;
LimPP =PP;else else if (LimPP > 0)
LimPP = PP;
else
LimPP = CP; LimPP = CP;
ActFlowSpeed = BPT_K[BCP][0]; ActFlowSpeed = BPT_K[BCP][0];
@@ -2675,22 +2704,19 @@ double TSt113::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
if (BCP == i_bcpno) if (BCP == i_bcpno)
dpMainValve = PF(0, PP, (ActFlowSpeed)*1.0 / (LBDelay)) * dt; dpMainValve = PF(0, PP, (ActFlowSpeed)*1.0 / (LBDelay)) * dt;
GetPF =dpMainValve; return dpMainValve;
return result;
} }
double TSt113::GetCP() double TSt113::GetCP()
{ double result; {
GetCP =EPS; return EPS;
return result;
} }
double TSt113::GetPos(Byte i) double TSt113::GetPos(Byte i)
{ double result; {
static double const table[11] = ( -1, 5, -1, 0, 2, 3, 4, 5, 0, 0, 1 ); static double const table[11] = { -1, 5, -1, 0, 2, 3, 4, 5, 0, 0, 1 };
GetPos =table[ i ]; return table[i];
return result;
} }
void TSt113::Init(double Press) void TSt113::Init(double Press)
@@ -2702,18 +2728,23 @@ void TSt113::Init(double Press)
//--- test --- //--- test ---
double Ttest::GetPF(double i_bcp, double PP, double HP, double dt, double ep) double Ttest::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
{ double result; {
static double/*?*/ const LBDelay = 100; double result;
static int const LBDelay = 100;
double LimPP; double dpPipe; double dpMainValve; double ActFlowSpeed; double LimPP;
double dpPipe;
double dpMainValve;
double ActFlowSpeed;
LimPP = BPT[lround(i_bcp)][1];
ActFlowSpeed = BPT[lround(i_bcp)][0];
LimPP =BPT[ Round( i_bcp ) ][ 1 ]; if ((i_bcp == i_bcpno))
ActFlowSpeed =BPT[ Round( i_bcp ) ][ 0 ]; LimPP = 0.0;
if( ( i_bcp==i_bcpno ) ) LimPP =0.0; if ((i_bcp == -1))
LimPP = 7;
if( ( i_bcp==-1 ) ) LimPP =7;
CP = CP + 20 * Min0R(abs(LimPP - CP), 0.05) * PR(CP, LimPP) * dt * 1.0 / 1; CP = CP + 20 * Min0R(abs(LimPP - CP), 0.05) * PR(CP, LimPP) * dt * 1.0 / 1;
@@ -2722,13 +2753,12 @@ double Ttest::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
dpMainValve = PF(dpPipe, PP, ActFlowSpeed * 1.0 / (LBDelay)) * dt; dpMainValve = PF(dpPipe, PP, ActFlowSpeed * 1.0 / (LBDelay)) * dt;
if( ( Round( i_bcp )==i_bcpno ) ) if ((lround(i_bcp) == i_bcpno))
{ {
dpMainValve = PF(0, PP, (ActFlowSpeed)*1.0 / (LBDelay)) * dt; dpMainValve = PF(0, PP, (ActFlowSpeed)*1.0 / (LBDelay)) * dt;
} }
GetPF =dpMainValve; return dpMainValve;
return result;
} }
void Ttest::Init(double Press) void Ttest::Init(double Press)
@@ -2736,19 +2766,20 @@ void Ttest::Init(double Press)
CP = Press; CP = Press;
} }
//---FD1--- //---FD1---
double TFD1::GetPF(double i_bcp, double PP, double HP, double dt, double ep) double TFD1::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
{ double result; double DP; double temp; {
double DP;
double temp;
// MaxBP:=4; // MaxBP:=4;
// temp:=Min0R(i_bcp*MaxBP,Min0R(5.0,HP)); // temp:=Min0R(i_bcp*MaxBP,Min0R(5.0,HP));
temp = Min0R(i_bcp * MaxBP, HP); // 0011 temp = Min0R(i_bcp * MaxBP, HP); // 0011
DP =10*Min0R( abs( temp-BP ), 0.1 )*PF( temp, BP, 0.0006*( 2+Byte( temp>BP ) ) )*dt*Speed; DP =
10 * Min0R(abs(temp - BP), 0.1) * PF(temp, BP, 0.0006 * (2 + Byte(temp > BP))) * dt * Speed;
BP = BP - DP; BP = BP - DP;
GetPF =-DP; return -DP;
return result;
} }
void TFD1::Init(double Press) void TFD1::Init(double Press)
@@ -2761,9 +2792,8 @@ void TFD1::Init(double Press)
} }
double TFD1::GetCP() double TFD1::GetCP()
{ double result; {
GetCP =BP; return BP;
return result;
} }
void TFD1::SetSpeed(double nSpeed) void TFD1::SetSpeed(double nSpeed)
@@ -2771,11 +2801,13 @@ void TFD1::SetSpeed(double nSpeed)
Speed = nSpeed; Speed = nSpeed;
} }
//---KNORR--- //---KNORR---
double TH1405::GetPF(double i_bcp, double PP, double HP, double dt, double ep) double TH1405::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
{ double result; double DP; double temp; double A; {
double DP;
double temp;
double A;
PP = Min0R(PP, MaxBP); PP = Min0R(PP, MaxBP);
if (i_bcp > 0.5) if (i_bcp > 0.5)
@@ -2792,8 +2824,7 @@ double TH1405::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
} }
DP = PF(temp, BP, A) * dt; DP = PF(temp, BP, A) * dt;
BP = BP - DP; BP = BP - DP;
GetPF =-DP; return -DP;
return result;
} }
void TH1405::Init(double Press) void TH1405::Init(double Press)
@@ -2805,65 +2836,70 @@ void TH1405::Init(double Press)
} }
double TH1405::GetCP() double TH1405::GetCP()
{ double result; {
GetCP =BP; return BP;
return result;
} }
//---FVel6--- //---FVel6---
double TFVel6::GetPF(double i_bcp, double PP, double HP, double dt, double ep) double TFVel6::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
{ double result; {
static double/*?*/ const LBDelay = 100; static int const LBDelay = 100;
double LimPP; double dpPipe; double dpMainValve; double ActFlowSpeed; double LimPP;
double dpPipe;
double dpMainValve;
double ActFlowSpeed;
LimPP = Min0R(5 * Byte(i_bcp < 3.5), HP); LimPP = Min0R(5 * Byte(i_bcp < 3.5), HP);
if ((i_bcp >= 3.5) && ((i_bcp < 4.3) || (i_bcp > 5.5))) if ((i_bcp >= 3.5) && ((i_bcp < 4.3) || (i_bcp > 5.5)))
ActFlowSpeed =0;else if( ( i_bcp>4.3 ) && ( i_bcp<4.8 ) ) ActFlowSpeed = 0;
ActFlowSpeed =4*( i_bcp-4.3 ) //konsultacje wawa1 - bylo 8;else if( ( i_bcp<4 ) ) else if ((i_bcp > 4.3) && (i_bcp < 4.8))
ActFlowSpeed =2;else ActFlowSpeed = 4 * (i_bcp - 4.3); // konsultacje wawa1 - bylo 8;
else if ((i_bcp < 4))
ActFlowSpeed = 2;
else
ActFlowSpeed = 4; ActFlowSpeed = 4;
dpMainValve = PF(LimPP, PP, ActFlowSpeed * 1.0 / (LBDelay)) * dt; dpMainValve = PF(LimPP, PP, ActFlowSpeed * 1.0 / (LBDelay)) * dt;
Sounds[s_fv4a_e] = 0; Sounds[s_fv4a_e] = 0;
Sounds[s_fv4a_u] = 0; Sounds[s_fv4a_u] = 0;
Sounds[s_fv4a_b] = 0; Sounds[s_fv4a_b] = 0;
if( ( i_bcp<3.5 ) ) Sounds[ s_fv4a_u ] =-dpMainValve;else if ((i_bcp < 3.5))
if( ( i_bcp<4.8 ) ) Sounds[ s_fv4a_b ] =dpMainValve;else Sounds[s_fv4a_u] = -dpMainValve;
if( ( i_bcp<5.5 ) ) Sounds[ s_fv4a_e ] =dpMainValve; else if ((i_bcp < 4.8))
Sounds[s_fv4a_b] = dpMainValve;
else if ((i_bcp < 5.5))
Sounds[s_fv4a_e] = dpMainValve;
GetPF =dpMainValve;
if ((i_bcp < -0.5)) if ((i_bcp < -0.5))
EPS =-1;else if( ( i_bcp>0.5 )&&( i_bcp<4.7 ) ) EPS = -1;
EPS =1;else else if ((i_bcp > 0.5) && (i_bcp < 4.7))
EPS = 1;
else
EPS = 0; EPS = 0;
// EPS:=i_bcp*Byte(i_bcp<2) // EPS:=i_bcp*Byte(i_bcp<2)
return result; return dpMainValve;
} }
double TFVel6::GetCP() double TFVel6::GetCP()
{ double result; {
GetCP =EPS; return EPS;
return result;
} }
double TFVel6::GetPos(Byte i) double TFVel6::GetPos(Byte i)
{ double result; {
static double const table[11] = ( -1, 6, -1, 0, 6, 4, 4.7, 5, -1, 0, 1 ); static double const table[11] = { -1, 6, -1, 0, 6, 4, 4.7, 5, -1, 0, 1 };
GetPos =table[ i ]; return table[i];
return result;
} }
double TFVel6::GetSound(Byte i) double TFVel6::GetSound(Byte i)
{ double result; {
if (i > 2) if (i > 2)
GetSound =0;else return 0;
GetSound =Sounds[ i ]; else
return result; return Sounds[i];
} }
void TFVel6::Init(double Press) void TFVel6::Init(double Press)
@@ -2872,6 +2908,4 @@ void TFVel6::Init(double Press)
TimeEP = true; TimeEP = true;
} }
//END //END

View File

@@ -541,6 +541,7 @@ private:
double CP; double TP; double RP; //zbiornik steruj¹cy, czasowy, redukcyjny double CP; double TP; double RP; //zbiornik steruj¹cy, czasowy, redukcyjny
double RedAdj; //dostosowanie reduktora cisnienia (krecenie kapturkiem) double RedAdj; //dostosowanie reduktora cisnienia (krecenie kapturkiem)
bool Fala; bool Fala;
double LPP_RP(double pos);
bool EQ(double pos, double i_pos); bool EQ(double pos, double i_pos);
public: public:
@@ -608,7 +609,7 @@ public:
class TH14K1: public HANDLE class TH14K1: public HANDLE
{ {
private: protected:
double CP; //zbiornik steruj¹cy, czasowy, redukcyjny double CP; //zbiornik steruj¹cy, czasowy, redukcyjny
double RedAdj; //dostosowanie reduktora cisnienia (krecenie kapturkiem) double RedAdj; //dostosowanie reduktora cisnienia (krecenie kapturkiem)