adicionado dados de tensao e corrente no motor

This commit is contained in:
Diego Freitas 2024-02-27 12:48:53 -03:00
parent d64c49f3cc
commit 3f05977b1e
7 changed files with 28 additions and 12 deletions

Binary file not shown.

View File

@ -321,6 +321,8 @@ namespace AgroBase.Models
frmInstancial.frmPrincipal.gridSenMotores.Columns.Add("clRPM", "RPM");
frmInstancial.frmPrincipal.gridSenMotores.Columns.Add("clVelocidade", "Velocidade");
frmInstancial.frmPrincipal.gridSenMotores.Columns.Add("clTemperatura", "Temperatura");
frmInstancial.frmPrincipal.gridSenMotores.Columns.Add("clCorrente", "Corrente");
frmInstancial.frmPrincipal.gridSenMotores.Columns.Add("clTensao", "Tensão");
//frmInstancial.frmPrincipal.gridSenMotores.Columns.Add("clUmidade", "Umidade");
foreach (var Motor in Motores)
{
@ -331,11 +333,13 @@ namespace AgroBase.Models
Enum.GetName(typeof(Sentido), Motor.Sentido_SP),
Enum.GetName(typeof(Sentido), Motor.Sentido),
Enum.GetName(typeof(StatusMotor), Motor.Aceleracao),
Motor.Potencia.ToString(),
Motor.RPM_Offset.ToString(),
Motor.RPM.ToString(),
Motor.VelocidadeInstantanea.ToString(),
Motor.Temperatura.ToString(),
Motor.Potencia.ToString("0.00"),
Motor.RPM_Offset.ToString("0.00"),
Motor.RPM.ToString("0.00"),
Motor.VelocidadeInstantanea.ToString("0.00"),
Motor.Temperatura.ToString("0.00"),
Motor.Corrente.ToString("0.00"),
Motor.Tensao.ToString("0.00"),
//Motor.Umidade.ToString(),
});
}
@ -350,11 +354,13 @@ namespace AgroBase.Models
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[2].Value = Enum.GetName(typeof(Sentido), Motor.Sentido_SP);
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[3].Value = Enum.GetName(typeof(Sentido), Motor.Sentido);
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[4].Value = Enum.GetName(typeof(StatusMotor), Motor.Aceleracao);
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[5].Value = Motor.Potencia.ToString();
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[6].Value = Motor.RPM_Offset.ToString();
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[7].Value = Motor.RPM.ToString();
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[8].Value = Motor.VelocidadeInstantanea.ToString();
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[9].Value = Motor.Temperatura.ToString();
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[5].Value = Motor.Potencia.ToString("0.00");
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[6].Value = Motor.RPM_Offset.ToString("0.00");
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[7].Value = Motor.RPM.ToString("0.00");
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[8].Value = Motor.VelocidadeInstantanea.ToString("0.00");
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[9].Value = Motor.Temperatura.ToString("0.00");
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[10].Value = Motor.Corrente.ToString("0.00");
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[11].Value = Motor.Tensao.ToString("0.00");
//frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[10].Value = Motor.Umidade.ToString();
}
}

View File

@ -546,7 +546,17 @@ namespace AgroBase.Models.Modules
null;
if (Motor != null)
{
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[9].Value = Motor.Temperatura.ToString();
switch (Sensor.Componente)
{
case S_Code.sTMP:
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[9].Value = Motor.Temperatura.ToString();
break;
case S_Code.sCOR:
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[10].Value = Motor.Temperatura.ToString();
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[11].Value = Motor.Temperatura.ToString();
break;
}
}
}
catch

File diff suppressed because one or more lines are too long