..
This commit is contained in:
@@ -112,22 +112,8 @@ public static partial class EEMStatus
|
||||
var mcid = Project.PUB.setting.MCID;
|
||||
var timestr = PUB.BMS.Current_DataTime.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
// BMS 데이터 (실제 값으로 교체 필요)
|
||||
var info_volt = PUB.BMS.Current_Volt;// "null"; // bms.Voltage
|
||||
var info_current = PUB.BMS.Current_Amp;// "null"; // bms.Current
|
||||
var info_capa = PUB.BMS.Current_MaxAmp;// "null"; // bms.Capacity
|
||||
var info_level = PUB.BMS.Current_Level;// "null"; // bms.Level
|
||||
var info_temp1 = PUB.BMS.Current_temp1;// "null"; // bms.Temp1
|
||||
var info_temp2 = PUB.BMS.Current_temp2;// "null"; // bms.Temp2
|
||||
var cell_volt1 = PUB.BMS.CellVoltage[0];// "null"; // bms.CellVolt1
|
||||
var cell_volt2 = PUB.BMS.CellVoltage[1]; // bms.CellVolt2
|
||||
var cell_volt3 = PUB.BMS.CellVoltage[2]; // bms.CellVolt3
|
||||
var cell_volt4 = PUB.BMS.CellVoltage[3]; // bms.CellVolt4
|
||||
var cell_volt5 = PUB.BMS.CellVoltage[4]; // bms.CellVolt5
|
||||
var cell_volt6 = PUB.BMS.CellVoltage[5]; // bms.CellVolt6
|
||||
var cell_volt7 = PUB.BMS.CellVoltage[6]; // bms.CellVolt7
|
||||
var cell_volt8 = PUB.BMS.CellVoltage[7]; // bms.CellVolt8
|
||||
|
||||
var data = PUB.BMS.BMSInformation;
|
||||
|
||||
// Status 폴더에 SQL 파일 생성
|
||||
var path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Status");
|
||||
if (System.IO.Directory.Exists(path) == false)
|
||||
@@ -135,10 +121,8 @@ public static partial class EEMStatus
|
||||
|
||||
var file = System.IO.Path.Combine(path, $"{DateTime.Now.ToString("HHmmssfff")}_BMS_INF.sql");
|
||||
|
||||
var sql = "insert into AGV_Shuttle_BMS(MCID,wdate,info_volt,info_current,info_capa,info_level,info_temp1,info_temp2) " +
|
||||
"values('{0}','{1}',{2},{3},{4},{5},{6},{7})";
|
||||
|
||||
sql = string.Format(sql, mcid, timestr, info_volt, info_current, info_capa, info_level, info_temp1, info_temp2);
|
||||
var sql = "insert into AGV_Shuttle_BMS(MCID,wdate,info_volt,info_current,info_capa,info_level,info_temp1,info_temp2,soc,cycle,protection,balance) " +
|
||||
$"values('{mcid}','{timestr}',{data.packVoltage},{data.current},{data.fullCapacity},{data.RawLevel},{data.ntcTemp[0]},{data.ntcTemp[1]},{data.rsoc},{data.cycleCount},{data.raw_protection},{data.fullBalance})";
|
||||
|
||||
System.IO.File.WriteAllText(file, sql, System.Text.Encoding.Default);
|
||||
LastBMSIFTime = DateTime.Now;
|
||||
@@ -167,20 +151,15 @@ public static partial class EEMStatus
|
||||
var timestr = PUB.BMS.Current_CellTime.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
// BMS 데이터 (실제 값으로 교체 필요)
|
||||
var info_volt = PUB.BMS.Current_Volt;// "null"; // bms.Voltage
|
||||
var info_current = PUB.BMS.Current_Amp;// "null"; // bms.Current
|
||||
var info_capa = PUB.BMS.Current_MaxAmp;// "null"; // bms.Capacity
|
||||
var info_level = PUB.BMS.Current_Level;// "null"; // bms.Level
|
||||
var info_temp1 = PUB.BMS.Current_temp1;// "null"; // bms.Temp1
|
||||
var info_temp2 = PUB.BMS.Current_temp2;// "null"; // bms.Temp2
|
||||
var cell_volt1 = PUB.BMS.CellVoltage[0];// "null"; // bms.CellVolt1
|
||||
var cell_volt2 = PUB.BMS.CellVoltage[1]; // bms.CellVolt2
|
||||
var cell_volt3 = PUB.BMS.CellVoltage[2]; // bms.CellVolt3
|
||||
var cell_volt4 = PUB.BMS.CellVoltage[3]; // bms.CellVolt4
|
||||
var cell_volt5 = PUB.BMS.CellVoltage[4]; // bms.CellVolt5
|
||||
var cell_volt6 = PUB.BMS.CellVoltage[5]; // bms.CellVolt6
|
||||
var cell_volt7 = PUB.BMS.CellVoltage[6]; // bms.CellVolt7
|
||||
var cell_volt8 = PUB.BMS.CellVoltage[7]; // bms.CellVolt8
|
||||
var volt = PUB.BMS.BMSCellVoltage;
|
||||
var cell_volt1 = volt.Voltage[0];// "null"; // bms.CellVolt1
|
||||
var cell_volt2 = volt.Voltage[1]; // bms.CellVolt2
|
||||
var cell_volt3 = volt.Voltage[2]; // bms.CellVolt3
|
||||
var cell_volt4 = volt.Voltage[3]; // bms.CellVolt4
|
||||
var cell_volt5 = volt.Voltage[4]; // bms.CellVolt5
|
||||
var cell_volt6 = volt.Voltage[5]; // bms.CellVolt6
|
||||
var cell_volt7 = volt.Voltage[6]; // bms.CellVolt7
|
||||
var cell_volt8 = volt.Voltage[7]; // bms.CellVolt8
|
||||
|
||||
// Status 폴더에 SQL 파일 생성
|
||||
var path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Status");
|
||||
|
||||
Reference in New Issue
Block a user