|
|
|
@ -43,8 +43,8 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
|
|
|
|
|
DataTable ParametersWithPCTable = new DataTable();
|
|
|
|
|
DataTable AllAlarmTable = new DataTable();
|
|
|
|
|
DataTable LogAlarmTable = new DataTable();
|
|
|
|
|
DataTable NowAlarmTable = new DataTable();
|
|
|
|
|
//DataTable LogAlarmTable = new DataTable();
|
|
|
|
|
//DataTable NowAlarmTable = new DataTable();
|
|
|
|
|
DataTable TempTable = new DataTable();
|
|
|
|
|
|
|
|
|
|
byte[] b2;
|
|
|
|
@ -103,18 +103,18 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
ParametersWithPCTable.Columns.Add("currnet", typeof(float));
|
|
|
|
|
ParametersWithPCTable.Columns.Add("pressure", typeof(float));
|
|
|
|
|
|
|
|
|
|
LogAlarmTable.Columns.Add("Equip_Name", typeof(string));
|
|
|
|
|
LogAlarmTable.Columns.Add("Alarm_ID", typeof(int));
|
|
|
|
|
LogAlarmTable.Columns.Add("Alarm_Cn_Info", typeof(string));
|
|
|
|
|
LogAlarmTable.Columns.Add("Alarm_Other_Info", typeof(string));
|
|
|
|
|
LogAlarmTable.Columns.Add("Alarm_Occur_Time", typeof(string));
|
|
|
|
|
LogAlarmTable.Columns.Add("Alarm_Claer_Time", typeof(string));
|
|
|
|
|
LogAlarmTable.Columns.Add("Alarm_Status", typeof(int));
|
|
|
|
|
LogAlarmTable.Columns.Add("Alarm_GUID", typeof(string));
|
|
|
|
|
//LogAlarmTable.Columns.Add("Equip_Name", typeof(string));
|
|
|
|
|
//LogAlarmTable.Columns.Add("Alarm_ID", typeof(int));
|
|
|
|
|
//LogAlarmTable.Columns.Add("Alarm_Cn_Info", typeof(string));
|
|
|
|
|
//LogAlarmTable.Columns.Add("Alarm_Other_Info", typeof(string));
|
|
|
|
|
//LogAlarmTable.Columns.Add("Alarm_Occur_Time", typeof(string));
|
|
|
|
|
//LogAlarmTable.Columns.Add("Alarm_Claer_Time", typeof(string));
|
|
|
|
|
//LogAlarmTable.Columns.Add("Alarm_Status", typeof(int));
|
|
|
|
|
//LogAlarmTable.Columns.Add("Alarm_GUID", typeof(string));
|
|
|
|
|
|
|
|
|
|
NowAlarmTable.Columns.Add("报警设备", typeof(string));
|
|
|
|
|
NowAlarmTable.Columns.Add("报警内容", typeof(string));
|
|
|
|
|
NowAlarmTable.Columns.Add("报警时间", typeof(string));
|
|
|
|
|
//NowAlarmTable.Columns.Add("报警设备", typeof(string));
|
|
|
|
|
//NowAlarmTable.Columns.Add("报警内容", typeof(string));
|
|
|
|
|
//NowAlarmTable.Columns.Add("报警时间", typeof(string));
|
|
|
|
|
|
|
|
|
|
TempTable.Columns.Add("报警设备", typeof(string));
|
|
|
|
|
TempTable.Columns.Add("报警内容", typeof(string));
|
|
|
|
@ -259,6 +259,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
|
|
|
|
|
private void AlarmControl()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//DataTable TempTable = DBHelp.GetTable(@"SELECT
|
|
|
|
|
// t2.Alarm_Other_Info,
|
|
|
|
|
// t2.Alarm_Cn_Info,
|
|
|
|
@ -284,24 +285,24 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
if ((int)rows["Alarm_Block"] == 2102 && b2[(int)rows["Alarm_Word"]].GetBit((int)rows["Alarm_bit"]) == true)
|
|
|
|
|
{
|
|
|
|
|
DataRow dr = TempTable.NewRow();
|
|
|
|
|
dr[0] = rows["Alarm_Cn_Info"];
|
|
|
|
|
dr[1] = rows["Alarm_Other_Info"];
|
|
|
|
|
dr[0] = rows["Alarm_Other_Info"];
|
|
|
|
|
dr[1] = rows["Alarm_Cn_Info"];
|
|
|
|
|
dr[2] = nowtime;
|
|
|
|
|
TempTable.Rows.Add(dr);
|
|
|
|
|
}
|
|
|
|
|
else if ((int)rows["Alarm_Block"] == 2107 && b7[(int)rows["Alarm_Word"]].GetBit((int)rows["Alarm_bit"]) == true)
|
|
|
|
|
{
|
|
|
|
|
DataRow dr = TempTable.NewRow();
|
|
|
|
|
dr[0] = rows["Alarm_Cn_Info"];
|
|
|
|
|
dr[1] = rows["Alarm_Other_Info"];
|
|
|
|
|
dr[0] = rows["Alarm_Other_Info"];
|
|
|
|
|
dr[1] = rows["Alarm_Cn_Info"];
|
|
|
|
|
dr[2] = nowtime;
|
|
|
|
|
TempTable.Rows.Add(dr);
|
|
|
|
|
}
|
|
|
|
|
else if ((int)rows["Alarm_Block"] == 2103 && b3[(int)rows["Alarm_Word"]].GetBit((int)rows["Alarm_bit"]) == true)
|
|
|
|
|
{
|
|
|
|
|
DataRow dr = TempTable.NewRow();
|
|
|
|
|
dr[0] = rows["Alarm_Cn_Info"];
|
|
|
|
|
dr[1] = rows["Alarm_Other_Info"];
|
|
|
|
|
dr[0] = rows["Alarm_Other_Info"];
|
|
|
|
|
dr[1] = rows["Alarm_Cn_Info"];
|
|
|
|
|
dr[2] = nowtime;
|
|
|
|
|
TempTable.Rows.Add(dr);
|
|
|
|
|
}
|
|
|
|
|