|
|
@ -939,54 +939,58 @@ namespace DyeingComputer.ViewModel |
|
|
|
|
|
|
|
void LOG_view()//细节页面
|
|
|
|
{ |
|
|
|
Sys_log = Resources.Target + Resources.Temperature + ":" + string.Format(" {0:###.#}", TEMP_tar) + "°C";//显示目标温度
|
|
|
|
Sys_log = Sys_log + " | " + Resources.MasterCylinder + Resources.Temperature + ":" + string.Format(" {0:###.#}", Convert.ToDouble(Selet_dtm("1010"))) + "°C";//显示实际温度
|
|
|
|
Sys_log = Sys_log + "\n" + Resources.Compute + Resources.Temperature + ":" + string.Format(" {0:###.#}", Convert.ToDouble(Selet_dtm("1005"))) + "°C";//显示计算温度
|
|
|
|
Sys_log = Sys_log + " | " + Resources.ProportionalValves + ":" + string.Format("{0:###.#}", Convert.ToDouble(Selet_dtm("1004"))) + "%";//显示比例
|
|
|
|
Sys_log = Resources.Target + Resources.Temperature + " : " + string.Format(" {0:###.#}", TEMP_tar) + "°C";//显示目标温度
|
|
|
|
Sys_log = Sys_log + " | " + Resources.MasterCylinder + Resources.Temperature + " : " + string.Format(" {0:###.#}", Convert.ToDouble(Selet_dtm("1010"))) + "°C";//显示实际温度
|
|
|
|
Sys_log = Sys_log + "\n" + Resources.Compute + Resources.Temperature + " : " + string.Format(" {0:###.#}", Convert.ToDouble(Selet_dtm("1005"))) + "°C";//显示计算温度
|
|
|
|
Sys_log = Sys_log + " | " + Resources.ProportionalValves + " : " + string.Format("{0:###.#}", Convert.ToDouble(Selet_dtm("1004"))) + "%";//显示比例
|
|
|
|
int IO1015 = Convert.ToInt16(Selet_dtm("1015")); |
|
|
|
if (IO1015 < MT39) |
|
|
|
{ |
|
|
|
Sys_log = Sys_log + "\n" + Resources.MasterCylinder + Resources.WaterLevel + ":" + string.Format("{0:D4}", IO1015) + "L =>[" + Resources.Low_waterlevel + "]";//显示水位
|
|
|
|
Sys_log = Sys_log + "\n" + Resources.MasterCylinder + Resources.WaterLevel + " : " + string.Format("{0:D4}", IO1015) + "L =>[" + Resources.Low_waterlevel + "]";//显示水位
|
|
|
|
} |
|
|
|
else if ((IO1015 > MT39) && (IO1015 < MT38)) |
|
|
|
{ |
|
|
|
Sys_log = Sys_log + "\n" + Resources.MasterCylinder + Resources.WaterLevel + ":" + string.Format("{0:D4}", IO1015) + "L =>[" + Resources.Mid_waterlevel + "]";//显示水位
|
|
|
|
Sys_log = Sys_log + "\n" + Resources.MasterCylinder + Resources.WaterLevel + " : " + string.Format("{0:D4}", IO1015) + "L =>[" + Resources.Mid_waterlevel + "]";//显示水位
|
|
|
|
} |
|
|
|
else if (IO1015 > MT38) |
|
|
|
{ |
|
|
|
Sys_log = Sys_log + "\n" + Resources.MasterCylinder + Resources.WaterLevel + ":" + string.Format("{0:D4}", IO1015) + "L =>[" + Resources.High_waterlevel + "]";//显示水位
|
|
|
|
Sys_log = Sys_log + "\n" + Resources.MasterCylinder + Resources.WaterLevel + " : " + string.Format("{0:D4}", IO1015) + "L =>[" + Resources.High_waterlevel + "]";//显示水位
|
|
|
|
} |
|
|
|
if (Pump_M) //主泵状态
|
|
|
|
{ |
|
|
|
Sys_log = Sys_log + "\n" + Resources.PumpSpeed + ":" + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1020"))) + "% => [" + Resources.PumpStart + "]";//主泵状态
|
|
|
|
Sys_log = Sys_log + "\n" + Resources.PumpSpeed + " : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1020"))) + "% => [" + Resources.PumpStart + "]";//主泵状态
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
Sys_log = Sys_log + "\n" + Resources.PumpSpeed + ":" + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1020"))) + "% => [" + Resources.PumpStops + "]";//主泵状态
|
|
|
|
Sys_log = Sys_log + "\n" + Resources.PumpSpeed + " : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1020"))) + "% => [" + Resources.PumpStops + "]";//主泵状态
|
|
|
|
} |
|
|
|
Sys_log = Sys_log + "\n" + Resources.MasterCylinder + Resources.Pressure + " : " + string.Format("{0:###.#}", Convert.ToDouble(Selet_dtm("1042")))+ "Bar"; |
|
|
|
Sys_log = Sys_log + " | " + Resources.Nozzle + Resources.Pressure + " : " + string.Format("{0:###.#}", Convert.ToDouble(Selet_dtm("1043"))) + "Bar"; |
|
|
|
Sys_log = Sys_log + "\n-------------------------------------------------------"; |
|
|
|
if (S16 == 0) |
|
|
|
{ |
|
|
|
Sys_log = Sys_log + "\n" + Resources.ClothWheel + "1 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1022"))); |
|
|
|
if (MT18 >= 2) Sys_log = Sys_log + " | " + Resources.ClothWheel + "2 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1023"))); |
|
|
|
if (MT18 >= 3) Sys_log = Sys_log + " | " + Resources.ClothWheel + "3 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1024"))); |
|
|
|
if (MT18 >= 4) Sys_log = Sys_log + "\n" + Resources.ClothWheel + "4 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1025"))); |
|
|
|
if (MT18 >= 5) Sys_log = Sys_log + " | " + Resources.ClothWheel + "5 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1026"))); |
|
|
|
if (MT18 >= 6) Sys_log = Sys_log + " | " + Resources.ClothWheel + "6 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1027"))); |
|
|
|
if (MT18 >= 7) Sys_log = Sys_log + "\n" + Resources.ClothWheel + "7 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1028"))); |
|
|
|
if (MT18 >= 8) Sys_log = Sys_log + " | " + Resources.ClothWheel + "8 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1029"))); |
|
|
|
if (MT18 >= 9) Sys_log = Sys_log + " | " + Resources.ClothWheel + "9 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1030"))); |
|
|
|
if (MT18 >= 10) Sys_log = Sys_log + "\n" + Resources.ClothWheel + "10 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1031"))); |
|
|
|
Sys_log = Sys_log + "\n" + Resources.Cycletime + "1 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1032"))); |
|
|
|
if (MT18 >= 2) Sys_log = Sys_log + " | " + Resources.Cycletime + "2 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1033"))); |
|
|
|
if (MT18 >= 3) Sys_log = Sys_log + " | " + Resources.Cycletime + "3 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1034"))); |
|
|
|
if (MT18 >= 4) Sys_log = Sys_log + "\n" + Resources.Cycletime + "4 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1035"))); |
|
|
|
if (MT18 >= 5) Sys_log = Sys_log + " | " + Resources.Cycletime + "5 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1036"))); |
|
|
|
if (MT18 >= 6) Sys_log = Sys_log + " | " + Resources.Cycletime + "6 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1037"))); |
|
|
|
if (MT18 >= 7) Sys_log = Sys_log + "\n" + Resources.Cycletime + "7 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1038"))); |
|
|
|
if (MT18 >= 8) Sys_log = Sys_log + " | " + Resources.Cycletime + "8 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1039"))); |
|
|
|
if (MT18 >= 9) Sys_log = Sys_log + " | " + Resources.Cycletime + "9 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1040"))); |
|
|
|
if (MT18 >= 10) Sys_log = Sys_log + "\n" + Resources.Cycletime + "10 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1041"))); |
|
|
|
Sys_log = Sys_log + "\n" + Resources.ClothWheel +"M/min"; |
|
|
|
Sys_log = Sys_log + "\n" + "1 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1022"))); |
|
|
|
if (MT18 >= 2) Sys_log = Sys_log + " | " + "2 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1023"))); |
|
|
|
if (MT18 >= 3) Sys_log = Sys_log + " | " + "3 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1024"))); |
|
|
|
if (MT18 >= 4) Sys_log = Sys_log + "\n" + "4 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1025"))); |
|
|
|
if (MT18 >= 5) Sys_log = Sys_log + " | " + "5 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1026"))); |
|
|
|
if (MT18 >= 6) Sys_log = Sys_log + " | " + "6 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1027"))); |
|
|
|
if (MT18 >= 7) Sys_log = Sys_log + "\n" + "7 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1028"))); |
|
|
|
if (MT18 >= 8) Sys_log = Sys_log + " | " + "8 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1029"))); |
|
|
|
if (MT18 >= 9) Sys_log = Sys_log + " | " + "9 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1030"))); |
|
|
|
if (MT18 >= 10) Sys_log = Sys_log + "\n" + "10 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1031"))); |
|
|
|
Sys_log = Sys_log + "\n" + Resources.Cycletime + "Sec"; |
|
|
|
Sys_log = Sys_log + "\n" + "1 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1032"))); |
|
|
|
if (MT18 >= 2) Sys_log = Sys_log + " | " + "2 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1033"))); |
|
|
|
if (MT18 >= 3) Sys_log = Sys_log + " | " + "3 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1034"))); |
|
|
|
if (MT18 >= 4) Sys_log = Sys_log + "\n" + "4 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1035"))); |
|
|
|
if (MT18 >= 5) Sys_log = Sys_log + " | " + "5 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1036"))); |
|
|
|
if (MT18 >= 6) Sys_log = Sys_log + " | " + "6 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1037"))); |
|
|
|
if (MT18 >= 7) Sys_log = Sys_log + "\n" + "7 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1038"))); |
|
|
|
if (MT18 >= 8) Sys_log = Sys_log + " | " + "8 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1039"))); |
|
|
|
if (MT18 >= 9) Sys_log = Sys_log + " | " + "9 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1040"))); |
|
|
|
if (MT18 >= 10) Sys_log = Sys_log + "\n" + "10 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1041"))); |
|
|
|
}//溢流/o型
|
|
|
|
else if (S16 == 1) //气流
|
|
|
|
{ } |
|
|
@ -1005,9 +1009,9 @@ namespace DyeingComputer.ViewModel |
|
|
|
{ |
|
|
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
|
|
|
SQLiteHelpers.Open(); //打开数据库
|
|
|
|
dt_d = SQLiteHelpers.ExecuteDataSet("select * from IOName where ID>'2000' AND ID<'4000'", null).Tables[0]; //读取表写入缓存
|
|
|
|
dt_a = SQLiteHelpers.ExecuteDataSet("select * from IOName where type='AI' OR type='AO'", null).Tables[0]; |
|
|
|
dt_m = SQLiteHelpers.ExecuteDataSet("select * from IOName where type='M'", null).Tables[0]; |
|
|
|
dt_d = SQLiteHelpers.ExecuteDataSet("select * from IOName where ID>'2000' AND ID<'4000' order by ID", null).Tables[0]; //读取表写入缓存
|
|
|
|
dt_a = SQLiteHelpers.ExecuteDataSet("select * from IOName where type='AI' OR type='AO' order by ID", null).Tables[0]; |
|
|
|
dt_m = SQLiteHelpers.ExecuteDataSet("select * from IOName where ID<'2000' order by ID", null).Tables[0]; |
|
|
|
SQLiteHelpers.Close(); |
|
|
|
//创建dt_d主建
|
|
|
|
DataColumn[] dt_dcols =new DataColumn[] { dt_d.Columns["ID"] }; |
|
|
|