|
|
|
@ -8,6 +8,7 @@ using SlnMesnac.Model.enums;
|
|
|
|
|
using SlnMesnac.Plc;
|
|
|
|
|
using SlnMesnac.Repository.service;
|
|
|
|
|
using SlnMesnac.WPF.Dto;
|
|
|
|
|
using SlnMesnac.WPF.MessageTips;
|
|
|
|
|
using SlnMesnac.WPF.Model;
|
|
|
|
|
using SlnMesnac.WPF.ViewModel;
|
|
|
|
|
using SqlSugar;
|
|
|
|
@ -44,7 +45,7 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
// 设备参数实时状态
|
|
|
|
|
private List<DmsRealtimeStatus>? realtimeStatusList = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ISqlSugarClient? sqlClient = null;
|
|
|
|
|
private BaseBusiness? baseBusiness = null;
|
|
|
|
|
private readonly ConfigInfoBusiness? _configInfoBusiness;
|
|
|
|
@ -67,7 +68,7 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
dmsRecordShutDownService = App.ServiceProvider.GetService<IDmsRecordShutDownService>();
|
|
|
|
|
dmsRecordAlarmTimeService = App.ServiceProvider.GetService<IDmsRecordAlarmTimeService>();
|
|
|
|
|
dmsRealtimeStatusService = App.ServiceProvider.GetService<IDmsRealtimeStatusService>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RecipeModeSetWindow.ManualChangeRecipeEvent += ManualChangeRecipe;
|
|
|
|
|
_logger = App.ServiceProvider.GetService<ILogger<DevMonitorPage>>();
|
|
|
|
|
_configInfoBusiness = App.ServiceProvider.GetService<ConfigInfoBusiness>();
|
|
|
|
@ -105,6 +106,8 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
// HotSpiralSpeedTxt.Text = configInfos.Where(x => x.ConfigKey == "烘干机螺旋频率设定值").FirstOrDefault().ConfigValue;
|
|
|
|
|
|
|
|
|
|
//HotTempTxt.Text = configInfos.Where(x => x.ConfigKey == "烘干机温度设定值").FirstOrDefault().ConfigValue;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -395,20 +398,25 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
{
|
|
|
|
|
int status = getStopLevelByWarnStatus(warnStatusEnum);
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
var alarmWindow = new SystemAlarmWindow();
|
|
|
|
|
var viewModel = new SystemAlarmViewModel();
|
|
|
|
|
viewModel.AlarmMsg = warnStatusEnum.ToString();
|
|
|
|
|
viewModel.AlarmConfirmed += (sender, isConfirmed) =>
|
|
|
|
|
{
|
|
|
|
|
alarmWindow.Close();
|
|
|
|
|
};
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"{warnStatusEnum.ToString()}", 2, 8);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
alarmWindow.DataContext = viewModel;
|
|
|
|
|
//Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
// {
|
|
|
|
|
// var alarmWindow = new SystemAlarmWindow();
|
|
|
|
|
// var viewModel = new SystemAlarmViewModel();
|
|
|
|
|
// viewModel.AlarmMsg = warnStatusEnum.ToString();
|
|
|
|
|
// viewModel.AlarmConfirmed += (sender, isConfirmed) =>
|
|
|
|
|
// {
|
|
|
|
|
// alarmWindow.Close();
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
alarmWindow.ShowDialog();
|
|
|
|
|
});
|
|
|
|
|
if (status >= 0)
|
|
|
|
|
// alarmWindow.DataContext = viewModel;
|
|
|
|
|
|
|
|
|
|
// alarmWindow.ShowDialog();
|
|
|
|
|
// });
|
|
|
|
|
//if (status >= 0)
|
|
|
|
|
{
|
|
|
|
|
Task.Run(() =>
|
|
|
|
|
{
|
|
|
|
@ -730,22 +738,39 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
|
|
|
|
|
if (plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("拆包机MES允许远程")) == false)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("拆包机MES屏蔽");
|
|
|
|
|
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("拆包机MES屏蔽!", 1, 5);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("磁选机MES允许远程")) == false)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("磁选机MES屏蔽");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("磁选机MES屏蔽!", 1, 5);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("螺旋1MES允许远程")) == false)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("螺旋1MES屏蔽");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("螺旋1MES屏蔽!", 1, 5);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("螺旋2MES允许远程")) == false)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("螺旋2MES屏蔽");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("螺旋2MES屏蔽!", 1, 5);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
App.Current.Dispatcher.BeginInvoke((Action)(() =>
|
|
|
|
@ -798,6 +823,7 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
{
|
|
|
|
|
StartButton.IsEnabled = true;
|
|
|
|
|
}));
|
|
|
|
|
MessageBoxAndLog("一键启动所有机器成功!");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -805,7 +831,11 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogError($"一键启动异常:{ex.Message}");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"一键启动异常:{ex.Message}", 2, 5);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
StartButton.IsEnabled = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -852,7 +882,11 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogError($"一键停止:{ex.Message}");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"一键停止:{ex.Message}", 2, 5);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
StopButton.IsEnabled = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -970,18 +1004,30 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
{
|
|
|
|
|
if(StopUrgentButton.Content.ToString() == "复位")
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("请先点击复位按钮");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("请先点击复位按钮!", 1, 5);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("拆包机MES允许远程")) == false)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("拆包机MES屏蔽");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("拆包机MES屏蔽!", 1, 5);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
bool unPackWarn = plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("拆包机堵料停螺旋"));
|
|
|
|
|
if (unPackWarn)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("拆包机堵料停螺旋,请先处理再开机!");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("拆包机堵料停螺旋,请先处理再开机!!", 1, 5);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Task.Run(() =>
|
|
|
|
@ -1056,14 +1102,23 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
{
|
|
|
|
|
if (plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("磁选机MES允许远程")) == false)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("磁选机MES屏蔽");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("磁选机MES屏蔽", 1, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//判断报警---
|
|
|
|
|
bool magNetWarn = plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("磁选机设备故障反馈"));
|
|
|
|
|
if (magNetWarn)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("磁选机设备故障,请检查后再启动");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("磁选机设备故障,请检查后再启动", 1, 5);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Task.Run(() =>
|
|
|
|
@ -1116,7 +1171,13 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
{
|
|
|
|
|
if (plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("除尘报警")) == true)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("除尘故障报警,请先点击除尘机变频器复位按钮");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("除尘故障报警,请先点击除尘机变频器复位按钮", 1, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
//1除尘远程启动
|
|
|
|
@ -1147,7 +1208,13 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show($"除尘启动:{ex.Message}");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"除尘启动:{ex.Message}", 2, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1189,7 +1256,11 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
return true;
|
|
|
|
|
}catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show($"除尘停止异常:{ex.Message}");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"除尘停止异常:{ex.Message}", 2, 5);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_logger.LogError($"除尘停止异常:{ex.Message}");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -1210,14 +1281,23 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
{
|
|
|
|
|
if (plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("螺旋1MES允许远程")) == false)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("螺旋1MES允许远程,未切换远程");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("螺旋1MES允许远程,未切换远程", 1, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
bool spiralWarn = plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("螺旋1变频器状态"));
|
|
|
|
|
bool spira2Warn = plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("螺旋2变频器状态"));
|
|
|
|
|
if (spiralWarn || spira2Warn)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("螺旋1或螺旋2设备故障,请检查后再启动");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("螺旋1或螺旋2设备故障,请检查后再启动", 1, 5);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
plc.writeBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("螺旋1启动"), true);
|
|
|
|
@ -1225,7 +1305,11 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBoxAndLog($"螺旋1启动异常:{ex.Message}", true);
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"螺旋1启动异常:{ex.Message}", 2, 5);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
@ -1245,7 +1329,12 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
|
|
|
|
|
if (plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("螺旋2MES允许远程")) == false)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("螺旋2MES允许远程,未切换远程");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("螺旋2MES允许远程,未切换远程", 1, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -1254,7 +1343,12 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
bool spira2Warn = plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("螺旋2变频器状态"));
|
|
|
|
|
if (spiralWarn || spira2Warn)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("螺旋1或螺旋2设备故障,请检查后再启动");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("螺旋1或螺旋2设备故障,请检查后再启动", 1, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1478,7 +1572,12 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
|
|
|
|
|
if (plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("螺旋2MES允许远程")) == false)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("螺旋2MES允许远程,未切换远程");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("螺旋2MES允许远程,未切换远程", 1, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
result = false;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -1509,7 +1608,12 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
{
|
|
|
|
|
if (plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("磁选机MES允许远程")) == false)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("磁选机MES允许远程,未切换远程");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow("磁选机MES允许远程,未切换远程", 1, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
#region 启动磁选机 / 前提:check螺旋2启动及速度是否达标
|
|
|
|
@ -1518,13 +1622,23 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
int speed2 = plc.readInt16ByAddress(baseBusiness.GetPlcAddressByConfigKey("螺旋2速度反馈"));
|
|
|
|
|
if (!startFlag)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show($"前提条件螺旋2未成功启动,请检查后重新启动");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"前提条件螺旋2未成功启动,请检查后重新启动", 2, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (speed2 < value2 * 100 * 0.8)
|
|
|
|
|
{
|
|
|
|
|
plc.writeBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("螺旋2启动"), false);
|
|
|
|
|
MessageBox.Show($"前提条件螺旋2速度{speed2}未达到设定值{value2}的下限阈值80%,请检查后重新启动");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"前提条件螺旋2速度{speed2}未达到设定值{value2}的下限阈值80%,请检查后重新启动", 2, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
SendPulseSignal("磁选机一键启动");
|
|
|
|
@ -1560,14 +1674,24 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
{
|
|
|
|
|
if (plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("螺旋1MES允许远程")) == false)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("螺旋1MES允许远程,未切换远程");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"螺旋1MES允许远程,未切换远程", 1, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool flag1 = plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("磁选机磁选启动"));
|
|
|
|
|
bool flag2 = plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("磁选机震动启动"));
|
|
|
|
|
if (!flag1 || !flag2)
|
|
|
|
|
{
|
|
|
|
|
MessageBoxAndLog("前提条件磁选机未启动,请先检查设备状态再启动", true);
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"前提条件磁选机未启动,请先检查设备状态再启动", 1, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1580,7 +1704,12 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBoxAndLog($"螺旋1启动异常:{ex.Message}", true);
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"螺旋1启动异常:{ex.Message}", 1, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
result = false;
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
@ -1601,13 +1730,24 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
int speed1 = plc.readInt16ByAddress(baseBusiness.GetPlcAddressByConfigKey("螺旋1速度反馈"));
|
|
|
|
|
if (!startFlag)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show($"烘干机螺旋启动失败:前提条件螺旋1未成功启动,请检查后重新启动");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"烘干机螺旋启动失败:前提条件螺旋1未成功启动,请检查后重新启动", 2, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (speed1 < value1 * 100 * 0.8)
|
|
|
|
|
{
|
|
|
|
|
// plc.writeBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("螺旋2启动"), false);
|
|
|
|
|
MessageBox.Show($"烘干机螺旋启动失败:前提条件螺旋1速度{speed1}未达到设定值{value1}的下限阈值80%,请检查后重新启动");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"烘干机螺旋启动失败:前提条件螺旋1速度{speed1}未达到设定值{value1}的下限阈值80%,请检查后重新启动", 2, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1636,7 +1776,13 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
bool startFlag = plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("烘干机反馈传动启动"));
|
|
|
|
|
if (!startFlag)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show($"烘干机风机启动失败:前提条件烘干机螺旋未成功启动,请检查后重新启动");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"烘干机风机启动失败:前提条件烘干机螺旋未成功启动,请检查后重新启动", 2, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
SendPulseSignal("烘干机风机启动");
|
|
|
|
@ -1662,7 +1808,12 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
bool startFlag = plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("烘干机反馈风机启动"));
|
|
|
|
|
if (!startFlag)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show($"烘干机燃烧启动失败:前提条件烘干机风机未成功启动,请检查后重新启动");
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"烘干机燃烧启动失败:前提条件烘干机风机未成功启动,请检查后重新启动", 2, 5);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
int value = int.Parse(baseBusiness.GetPlcAddressByConfigKey("烘干机温度设定值"));
|
|
|
|
@ -2088,7 +2239,11 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation(message);
|
|
|
|
|
}
|
|
|
|
|
MessageBox.Show(message);
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow(message, isError==false?0:2, 5);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2300,6 +2455,27 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
window.ShowDialog();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void testTips()
|
|
|
|
|
{
|
|
|
|
|
MessageBoxAndLog("一键启动所有机器成功");
|
|
|
|
|
Task.Run(() =>
|
|
|
|
|
{
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
|
|
|
|
Thread.Sleep(7000);
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Random random = new Random();
|
|
|
|
|
int randomValue = random.Next(0, 3); // 生成 0 到 2 之间的随机整数
|
|
|
|
|
Msg.MsgShow("消息提示测试", randomValue, 5);
|
|
|
|
|
// MessageBoxAndLog("一键启动所有机器成功");
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|