add - 自动控制添加下料检测 展示界面添加混炼完成指示无故熄灭报警

wangsr
wangsr 1 year ago
parent 18e0614a3d
commit 7ae0b0f22c

@ -5,6 +5,7 @@ using Mesnac.Action.ChemicalWeighing.AutoControl.DB;
using Mesnac.Action.ChemicalWeighing.AutoControl.Entity; using Mesnac.Action.ChemicalWeighing.AutoControl.Entity;
using Mesnac.Action.ChemicalWeighing.LjMixManager; using Mesnac.Action.ChemicalWeighing.LjMixManager;
using Mesnac.Action.ChemicalWeighing.LjPlanning; using Mesnac.Action.ChemicalWeighing.LjPlanning;
using Mesnac.Action.ChemicalWeighing.MinAn;
using Mesnac.Controls.Default; using Mesnac.Controls.Default;
using Mesnac.Core.Service; using Mesnac.Core.Service;
using System; using System;
@ -540,35 +541,42 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
switch (ControlsHelper.SingleSelect(RadioE)) switch (ControlsHelper.SingleSelect(RadioE))
{ {
case 1: case 1:
PowderDownSignel(MinAnPlc.Heir1, 1);
DB2105WriteHelper.WriteManScrewH1(); DB2105WriteHelper.WriteManScrewH1();
DB2105WriteHelper.WriteSetValueH1(value); DB2105WriteHelper.WriteSetValueH1(value);
break; break;
case 2: case 2:
PowderDownSignel(MinAnPlc.Heir1, 1);
DB2105WriteHelper.WriteManScrewH2(); DB2105WriteHelper.WriteManScrewH2();
DB2105WriteHelper.WriteSetValueH1(value); DB2105WriteHelper.WriteSetValueH1(value);
break; break;
case 3: case 3:
PowderDownSignel(MinAnPlc.Heir2, 2);
DB2105WriteHelper.WriteManScrewH3(); DB2105WriteHelper.WriteManScrewH3();
DB2105WriteHelper.WriteSetValueH2(value); DB2105WriteHelper.WriteSetValueH2(value);
break; break;
case 4: case 4:
PowderDownSignel(MinAnPlc.Heir2, 2);
DB2105WriteHelper.WriteManScrewH4(); DB2105WriteHelper.WriteManScrewH4();
DB2105WriteHelper.WriteSetValueH2(value); DB2105WriteHelper.WriteSetValueH2(value);
break; break;
case 5: case 5:
PowderDownSignel(MinAnPlc.Heir3, 3);
DB2105WriteHelper.WriteManScrewH5(); DB2105WriteHelper.WriteManScrewH5();
DB2105WriteHelper.WriteSetValueH3(value); DB2105WriteHelper.WriteSetValueH3(value);
break; break;
case 6: case 6:
PowderDownSignel(MinAnPlc.Heir3, 3);
DB2105WriteHelper.WriteManScrewH6(); DB2105WriteHelper.WriteManScrewH6();
DB2105WriteHelper.WriteSetValueH3(value); DB2105WriteHelper.WriteSetValueH3(value);
break; break;
case 7: case 7:
PowderDownSignel(MinAnPlc.Heir4, 4);
DB2105WriteHelper.WriteManScrewH7(); DB2105WriteHelper.WriteManScrewH7();
DB2105WriteHelper.WriteSetValueH4(value); DB2105WriteHelper.WriteSetValueH4(value);
break; break;
case 8: case 8:
PowderDownSignel(MinAnPlc.Heir4, 4);
DB2105WriteHelper.WriteManScrewH8(); DB2105WriteHelper.WriteManScrewH8();
DB2105WriteHelper.WriteSetValueH4(value); DB2105WriteHelper.WriteSetValueH4(value);
break; break;
@ -755,5 +763,21 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
} }
#endregion #endregion
#region 上料提示封装
private static void PowderDownSignel(bool minanResult, int num)
{
if (minanResult)
{
DialogResult result = MessageBox.Show(num + "号罐正在上料", "温馨提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
if (result == DialogResult.OK)
{
return;
}
}
}
#endregion
} }
} }

@ -27,7 +27,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.WetWaitTime
this.list = list; this.list = list;
FileName = address; FileName = address;
this.ExportTo(); this.ExportTo();
} }
public Export(List<Lj_RGVTimeRecord> list) public Export(List<Lj_RGVTimeRecord> list)
@ -64,9 +63,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.WetWaitTime
workbook.SaveAs(this.FileName); workbook.SaveAs(this.FileName);
MessageBox.Show("导出成功!"); MessageBox.Show("导出成功!");
} }
catch catch(Exception e)
{ {
MessageBox.Show("请重新选择导出路径"); MessageBox.Show("请重新选择导出路径或关闭已打开的导出文件 " + e);
} }
// 关闭 Excel 应用程序和工作簿对象,并释放资源 // 关闭 Excel 应用程序和工作簿对象,并释放资源

@ -306,7 +306,6 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
record = entity; record = entity;
FreeSqlUnit.Instance.Insert(entity).ExecuteAffrows(); FreeSqlUnit.Instance.Insert(entity).ExecuteAffrows();
} }
//逻辑判断插入数据库 //逻辑判断插入数据库
if (Mixes[i] && !record.MixIsReady) if (Mixes[i] && !record.MixIsReady)
{ {
@ -339,6 +338,10 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
.Set(x => x.Done, true) .Set(x => x.Done, true)
.Where(x => x.DeviceNo == deviceNo && !x.Done).ExecuteAffrows(); .Where(x => x.DeviceNo == deviceNo && !x.Done).ExecuteAffrows();
} }
if (!Mixes[i] && !record.RGVIsReach && record.MixIsReady)
{
MessageBox.Show("湿混机搅拌完毕指示灯无故熄灭\nRGV小车未到达 接料未结束");
}
} }
} }

@ -888,16 +888,12 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
{ {
if (MinAnPlc.Heir1) if (MinAnPlc.Heir1)
{ {
DialogResult result1 = DialogResult result1 = MessageBox.Show("1号罐正在上料", "温馨提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("1号罐正在上料", "温馨提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
if (result1 == DialogResult.OK) if (result1 == DialogResult.OK)
{ {
return; return;
} }
} }
short valueSet; short valueSet;
short valueFast; short valueFast;
short valuePoint; short valuePoint;

Loading…
Cancel
Save