|
|
|
@ -47,7 +47,14 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
// 设备参数实时状态
|
|
|
|
|
private List<DmsRealtimeStatus>? realtimeStatusList = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 刷新日志信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="msg"></param>
|
|
|
|
|
public delegate void PrintMessageToListBox(string msg);
|
|
|
|
|
public static event PrintMessageToListBox? PrintMessageToListBoxEvent;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ISqlSugarClient? sqlClient = null;
|
|
|
|
|
private BaseBusiness? baseBusiness = null;
|
|
|
|
|
private readonly ConfigInfoBusiness? _configInfoBusiness;
|
|
|
|
@ -258,8 +265,19 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
double Cache_MaxWeight = recipeManageCache.MaxBufferWeight;
|
|
|
|
|
double Cache_MinWeight = recipeManageCache.MinBufferWeight;
|
|
|
|
|
double Cache_Weight = recipeManageCache.BufferWeight;
|
|
|
|
|
|
|
|
|
|
//阈值预警消息,100范围,推送到首页系统监控提示
|
|
|
|
|
if(Cache_Weight - Cache_MinWeight >0 && Cache_Weight - Cache_MinWeight <= 100)
|
|
|
|
|
{
|
|
|
|
|
PrintMessageToListBoxEvent?.Invoke("");
|
|
|
|
|
}
|
|
|
|
|
if (Cache_MaxWeight - Cache_Weight > 0 && Cache_MaxWeight - Cache_Weight <= 100)
|
|
|
|
|
{
|
|
|
|
|
PrintMessageToListBoxEvent?.Invoke("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool unPackStatus = plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("拆包机系统运行状态"));
|
|
|
|
|
if (recipeManageCache.SystemStatus == "1" && unPackStatus && (Cache_MaxWeight <= Cache_Weight))
|
|
|
|
|
if (unPackStatus && (Cache_MaxWeight <= Cache_Weight))
|
|
|
|
|
{
|
|
|
|
|
// 停所有设备
|
|
|
|
|
StopMachine(99);
|
|
|
|
@ -417,7 +435,8 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
WarningList = dmsRecordAlarmTimeService.GetMachineWarnList();
|
|
|
|
|
|
|
|
|
|
#region 停止设备
|
|
|
|
|
recipeManageCache.SystemStatus = "0";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StopAndMessageWarn(machineStatusDto.warnStatus);
|
|
|
|
|
//添加报警停机记录
|
|
|
|
|
// OeeCollection(machineStatusDto, 2);
|
|
|
|
@ -475,6 +494,7 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
// });
|
|
|
|
|
if (status >= 0)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"{warnStatusEnum.ToString()}", 2, 8);
|
|
|
|
@ -1134,7 +1154,8 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
bool result = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plc.writeBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("拆包机远程启动"), false);
|
|
|
|
|
SendPulseSignal("拆包机远程停止");
|
|
|
|
|
Thread.Sleep(MachineSleep);
|
|
|
|
@ -1186,6 +1207,7 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
Thread.Sleep(MachineSleep);
|
|
|
|
|
plc.writeBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("螺旋2启动"), false);
|
|
|
|
|
result = true;
|
|
|
|
|
recipeManageCache.SystemStatus = "0";
|
|
|
|
|
// MessageBoxAndLog("一键停止所有机器成功!");
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|