Documente Academic
Documente Profesional
Documente Cultură
1. Noțiuni introductive
SCADA (Supervisory Control And Data Aquisition)-este un sistem bazat pe calculator avand rolul de
comanda si monitorizare a proceselor tehnologice.
SCADA este cel mai modern instrument utilizat pentru supravegherea controlul si monitorizarea
proceselor tehnologice.
SCADA presupune un soft special instalat in calculator, soft care comanda si monitorizeaza un proces
tehnologic prin intermediul unor echipamente locale (automate programabile PLC etc.) SCADA
permite mimarea procesului tehnologic, oricat de complex, si aducerea lui pe ecranul calculatorului.
Progresele substantiale inregistrate în acest domeniu au facut ca sistemele SCADA sa fie folosite in
cele mai diverse domenii, de la productia bunurilor de larg consum, la metalurgie, chimie
sienergeticaana la domeniul nuclear.
2. Scopul aplicației
3. Aplicabilitate
4. Diagrama obiectelor
1
5.
6.
Cod sursă
2
#ifndef OPERATOR_H #ifndef PROCES_H
#define OPERATOR_H #define PROCES_H
class Persoana
{ protected:
char *nume,*prenume,*CNP; class Proces
int varsta; {
public: public:
Persoana(char*,char*,char*,int); Proces();
friend std::ostream &operator ~Proces();
<<(std::ostream&,Persoana&);
float
~Persoana(); getPresiuneGazStatieGaze();
}; void
setPresiuneGazStatieGaze(float);
class Operator:public Persoana
float getDebitGazStatieGaze();
{
void
public:
setDebitGazStatieGaze(float);
Operator(char*,char*,char*,int,float,char*,int);
float getCurentMotorElectric();
~Operator();
void
void Afisare();
setCurentMotorElectric(float);
float setPresiuneCompresor(float);
float
float setTuratieIntrareGenerator(float); getTensiuneMotorElectric();
private: void
float PresiuneIesireCompresor; setTensiuneMotorElectric(float);
3
void
setTuratieIesireTurbina(float);
class Sistem
float getCurentDeIesire();
{ protected:
void setCurentDeIesire(float);
char *TipSistem;
float getTensiuneDeIesire();
char*userName;
void setTensiuneDeIesire(float);
char*Password;
int an;
Proces(char*,char*,float,float);
public: //constructor Statie de gaze
Sistem(){}
virtual void Afisare()=0; Proces(char*,char*,float,float,float,fl
oat); //constructor Compresor
~Sistem();
}; Proces(char*,char*,float,float,float);//
class SMCAD :public Sistem constructor Generator Electric
{
Proces(char*,char*,float);//construct
SMCAD(char*,char*,char*,int);
or turbina
void Afisare();
void AfisareStatieGaze();
};
void AfisareCompresor();
class SistemSCADA: public SMCAD
void AfisareGenerator();
{ protected:
void AfisareTurbina();
int NrLiniiTabelServer;
static int getNr();
int NrColoaneTabelServer;
float
float TabelServer[20][20]; CalculPuterMotorElectric();
public: float
CalculPresiuneIntrareCompresor();
void Afisare();
float
SistemSCADA(char*,char*,char*,int, int,int);
CalculTuratieIntrareGeneratorElectr
}; ic();
class SCADA_gaze:public SistemSCADA float CalculPutereaActiva();
{ public: private:
SCADA_gaze(char*,char*,char*,int, int,int,char*); char *tipProces;
4
~SCADA_gaze(); char *denumireElement;
void Afisare(); float PresiuneGazStatieGaze;
private: float DebitGazStatieGaze;
char *Nume; float CurentMotorElectric;
}; float TensiuneMotorElectric;
class SMCADPLC:public SMCAD float
PierderiPresiuneIntrareCompresor;
{
float
private:
PresiuneIntrareCompresor;
char* Functie;
float PresiuneIesireCompresor;
float PresiuneIntrareCompresor;
float
float PresiuneIesireCompresor; ProcentDeschidereVentilCompresor;
float PresiuneReferintaCompresor; float
float ProcentDeschidereVentilCompresor; PresiuneIntrareGazTurbina;
Proces::Proces() }
{
strcpy(tipProces," "); std::ostream &operator
<<(std::ostream&ies,Persoana&P)
strcpy(denumireElement, " ");
{
}
cout<<"\nNumele persoanei este: ";
ies<<P.nume;
Proces::~Proces()
cout<<"\nPrenumele persoanei este:
{ delete tipProces;
";
delete denumireElement;
ies<<P.prenume;
nr--;
cout<<"\nCNP-ul persoanei este: ";
}
ies<<P.CNP;
cout<<"\nVarsta persoanei este: ";
void Proces::setPresiuneGazStatieGaze(float x)
ies<<P.varsta<<endl;
{ PresiuneGazStatieGaze=x;}
return ies;
}
float Proces::getPresiuneGazStatieGaze()
{ return PresiuneGazStatieGaze;}
6
Persoana::~Persoana()
float Proces::getDebitGazStatieGaze() {
{ return DebitGazStatieGaze;} delete nume;
delete prenume;
void Proces::setDebitGazStatieGaze(float x) delete CNP;
{ DebitGazStatieGaze=x;} }
float Proces::getCurentMotorElectric()
{ return CurentMotorElectric;} Operator::Operator(char*N,char*P,char
*C,int V,float S,char*TSO,int
VEC):Persoana(N,P,C,V)
void Proces::setCurentMotorElectric(float x)
{
{ CurentMotorElectric=x;}
Salariu=S;
tipSistemOperat=new
float Proces::getTensiuneMotorElectric() char[strlen(TSO)+1];
{ return TensiuneMotorElectric;} strcpy(tipSistemOperat,TSO);
Vechime=VEC;
void Proces::setTensiuneMotorElectric(float x) }
{ TensiuneMotorElectric=x;}
float Proces::getPierderiPresiuneIntrareCompresor() void Operator::Afisare()
{ return PierderiPresiuneIntrareCompresor;} {
void Proces::setPierderiPresiuneIntrareCompresor(float x) cout<<"\nNumele persoanei este: ";
{ PierderiPresiuneIntrareCompresor=x;} cout<<nume;
float Proces::getPierderiTuratie() cout<<"\nPrenumele persoanei este:
{ return PierderiTuratie;} ";
void Proces::AfisareStatieGaze() }
{
cout<<"\nTip Proces: "<<tipProces;
cout<<"\nDenumire Element"<<denumireElement; SistemSCADA::SistemSCADA(char*T,
char*U,char*P,int a,int nrl,int
cout<<"\nPresiunea de iesire din Statia de Gaze
nrc):SMCAD(T,U,P,a)
este(bar): "<<PresiuneGazStatieGaze;
{
cout<<"\nDebitul de gaz este(m3/h):
"<<DebitGazStatieGaze<<endl; NrColoaneTabelServer=nrc;
} NrLiniiTabelServer=nrl;
}
void Proces::AfisareCompresor()
{ void SistemSCADA::Afisare()
cout<<"\nTip Proces: "<<tipProces; { SMCAD::Afisare();}
cout<<"\nDenumire Element"<<denumireElement;
cout<<"\nCurentul motorului electric care actioneaza
compresorul este(A): "<<CurentMotorElectric;
SCADA_gaze::SCADA_gaze(char*T,c
cout<<"\nTensiunea motorului electric care actioneaza har*U,char*P,int a, int nrl,int nrc,char*
compresorul este(v): "<<TensiuneMotorElectric; N):SistemSCADA(T,U,P,a,nrl,nrc)
cout<<"\nPierderile de presiune la intrare in {
compresor(bar): "<<PierderiPresiuneIntrareCompresor;
Nume=new char[strlen(N)+1];
cout<<"\nPresiunea de intrare in compresor(PresStatie-
strcpy(Nume,N);
Pierderi)(bar): "<<CalculPresiuneIntrareCompresor();
}
cout<<endl;
void SCADA_gaze::Afisare()
}
{
void Proces::AfisareGenerator()
SistemSCADA::Afisare();
{
cout<<"\nNume SCADA pe gaze
cout<<"\nTip Proces: "<<tipProces;
esete: "<<Nume<<endl ;
cout<<"\nDenumire Element"<<denumireElement;
}
CalculTuratieIntrareGeneratorElectric();
10
cout<<"\nTuratie intrare generator(turatii/min): SCADA_gaze::~SCADA_gaze()
"<<TuratieIntrareGeneratorElectric;
{ delete Nume;}
cout<<"\nCurent de iesire(A): "<<CurentDeIesire;
cout<<"\nTensiune de iesire(V):
void
"<<TensiuneDeIesire<<endl;
SMCADPLC::setPresiuneIesireCompre
} sor(float x)
void Proces::AfisareTurbina() { PresiuneIesireCompresor=x;}
{
cout<<"\nTip Proces: "<<tipProces; float
SMCADPLC::getPresiuneReferintaCo
cout<<"\nDenumire Element"<<denumireElement;
mpresor()
cout<<"\nTuratii(turatii/min):
{ return PresiuneReferintaCompresor;
"<<TuratieIesireTurbina<<endl;
}
}
void
int Proces::getNr()
SMCADPLC::setPresiuneReferintaCo
{ mpresor(float x)
return nr; { PresiuneReferintaCompresor=x;}
}
float
float Proces::CalculPuterMotorElectric() SMCADPLC::getProcentDeschidereVe
ntilCompresor()
{
{
return TensiuneMotorElectric*CurentMotorElectric;
return
} ProcentDeschidereVentilCompresor;
}
float Proces::CalculPresiuneIntrareCompresor()
{ void
PresiuneIntrareCompresor=PresiuneGazStatieGaze- SMCADPLC::setProcentDeschidereVe
PierderiPresiuneIntrareCompresor; ntilCompresor(float x)
return PresiuneIntrareCompresor; {
}
ProcentDeschidereVentilCompresor=x;
11
float Proces::CalculTuratieIntrareGeneratorElectric() }
{
SMCADPLC::SMCADPLC(char*T,cha
r*F,char*U,char*P,int a,float PI,float
TuratieIntrareGeneratorElectric=TuratieIesireTurbina-
PE,float PV):SMCAD(T,U,P,a)
PierderiTuratie;
{ PresiuneIntrareCompresor=PI;
return TuratieIntrareGeneratorElectric;
PresiuneIesireCompresor=PE;
}
ProcentDeschidereVentilCompresor=P
float Proces::CalculPutereaActiva() V;
{ Functie=new char[strlen(F)+1];
strcpy(Functie,F);
}
PutereActivaIesire=0.001*CurentDeIesire*TensiuneDeIesi
SMCADPLC::SMCADPLC(char*T,cha
re;
r*F,char*U,char*P,int a,float
return PutereActivaIesire; Tu):SMCAD(T,U,P,a)
} {
TuratieIntrareGenerator=Tu;
#include <iostream>
Functie=new char[strlen(F)+1];
#include "Operator.h"
strcpy(Functie,F);
#include "SCADA_gaze.h"
}
#include "Proces.h"
#include <string.h>
void SMCADPLC::AfisareVentil()
using namespace std;
{
SMCAD::Afisare();
int Proces::nr=0;
cout<<"\nFunctia este: "<<Functie;
cout<<"\nPresiunea De intrare in
Compresor(bar):
int main() "<<PresiuneIntrareCompresor;
{ cout<<"\nPresiunea de referinta(bar):
"<<PresiuneReferintaCompresor;
Sistem *S;
cout<<"\nPresiunea de iesire
float x,y;
12
Persoana P("Ivan","Vlad","1971112297345",20); este(bar): "<<PresiuneIesireCompresor;
Operator cout<<"\nProcent deschidere
O("Vulpe","Andreea","2980925353432",19,3000,"SCAD ventil(%):
A",3); "<<ProcentDeschidereVentilCompresor
<<endl;
Proces StatieGaz("TransferaGaz","Statie de Gaze",
6.45,5755);//pres intrare,debit }
Proces void SMCADPLC::AfisareTuratie()
Compresor("RidicaPresiunea","Compresor",115,5700,0.2,
{
80);//A,V,pierderi,%
SMCAD::Afisare();
Proces Generator("ProdEnEl","Generator
Electric",1000,1500,11500);//pierderi,a,v cout<<"\nFunctia este: "<<Functie;
SMCADPLC void
PLC2("PLC","SeteazaProcentDeschidereVentil","COMP1. SchimbaPresiuneCompresor(SMCADP
2", "Parola",1990,6.45,32,80); LC&s)
SCADA_gaze {
TurboAgregatPeGaze("SCADA","BOB1.3","Parola",1989 if (s.PresiuneIesireCompresor!
,10,10,"TurboAgregatPeGaze"); =s.PresiuneReferintaCompresor)
x=O.setPresiuneCompresor(25);//Setam referinta pentru
presiunea de iesire din compresor: "; s.PresiuneIesireCompresor=s.PresiuneR
y=O.setTuratieIntrareGenerator(2500);//Setam referinta eferintaCompresor;
pentru turatia de intrare in generator; if
PLC2.setPresiuneReferintaCompresor(x); (s.PresiuneIesireCompresor>s.Presiune
ReferintaCompresor)
PLC1.setTuratieReferintTuratieaGenerator(y);
x=StatieGaz.getPresiuneGazStatieGaze();
s.ProcentDeschidereVentilCompresor--;
Compresor.setPresiuneGazStatieGaze(x);
else
Compresor.CalculPresiuneIntrareCompresor(); s.ProcentDeschidereVentilCompresor++;
}
x=Turbina.getTuratieIesireTurbina();
void SMCADPLC::SchimbaTuratie()
Generator.setTuratieIesireTurbina(x);
{
if (TuratieIntrareGenerator!
13
cout<<P; =TuratieReferintaGenerator)
O.Afisare();
TuratieIntrareGenerator=TuratieReferin
S=&TurboAgregatPeGaze;
taGenerator;
S->Afisare();
}
PLC1.AfisareTuratie();
PLC2.AfisareVentil();
void
StatieGaz.AfisareStatieGaze(); SMCADPLC::setTuratieReferintTuratie
Compresor.AfisareCompresor(); aGenerator(float x)
float
SMCADPLC::getPresiuneIesireCompre
sor()
cout<<endl<<"\Numarul elementelor de {
proces(declarate static): "<<Turbina.getNr()<<endl<<endl;
return PresiuneIesireCompresor;
}
SchimbaPresiuneCompresor(PLC2);
float
PLC1.SchimbaTuratie(); SMCADPLC::getTuratieIntrareGenerat
or()
14
return 0;}
7. Testarea
sistemului
15
16
8. Bibliografie
-Îndrumar de laborator, Mădălina Cărbureanu & Mihaela Oprea, editura UPG Ploiești, 2018
-Curs POO, Mihaela Oprea
17