충방전 전류 및 전력량 계산 코드 추가

This commit is contained in:
ChiKyun Kim
2025-12-18 10:55:04 +09:00
parent 32217c8501
commit b62cd5f52e
3 changed files with 8 additions and 10 deletions

View File

@@ -180,11 +180,11 @@ namespace arDev
Current_Volt = (float)(batH / 100.0);
//충방전전류
//batH = (UInt16)LastReceiveBuffer[6];
//batL = (UInt16)LastReceiveBuffer[7];
//batH = (UInt16)(batH << 8);
//batH = (UInt16)(batH | batL);
//Charge_Amp = (float)(batH / 100.0);
Int16 batHi = (Int16)LastReceiveBuffer[6];
Int16 batLi = (Int16)LastReceiveBuffer[7];
batHi = (Int16)(batHi << 8);
batHi = (Int16)(batHi | batLi);
Charge_Amp = (float)(batHi / 100.0);
//잔량확인
batH = (UInt16)LastReceiveBuffer[8];
@@ -322,11 +322,9 @@ namespace arDev
//아직 변화가 없으니 종료일을 기록하지 않는다
}
}
}
}
public DateTime chk_times { get; set; } = new DateTime(1982, 11, 23);
public DateTime chk_timee { get; set; } = new DateTime(1982, 11, 23);
public float chk_values { get; set; } = 0f;
@@ -337,7 +335,7 @@ namespace arDev
{
get
{
return (Int16)((Charge_Amp / 100.0) * Current_Volt);
return (Int16)((Charge_Amp ) * Current_Volt);
}
}
/// <summary>

View File

@@ -64,7 +64,7 @@ namespace Project.ViewForm
{
timer1.Stop();
this.arLabel1.Text = PUB.BMS.Current_Level.ToString("N1") + "%";
this.arLabel1.Sign = $"{PUB.BMS.Current_Volt}v, {PUB.BMS.Charge_watt}w, {PUB.BMS.Charge_Amp}";// PUB.BMS.Current_Volt.ToString() + "v";
this.arLabel1.Sign = $"{PUB.BMS.Current_Volt}v, {PUB.BMS.Charge_watt}w";// PUB.BMS.Current_Volt.ToString() + "v";
this.cv1.Text = PUB.BMS.CellVoltage[0].ToString("N3") + "v";
this.cv2.Text = PUB.BMS.CellVoltage[1].ToString("N3") + "v";
this.cv3.Text = PUB.BMS.CellVoltage[2].ToString("N3") + "v";

Submodule Cs_HMI/SubProject/CommUtil updated: ed05439991...b070b711f0