diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/PlcAutoWriteHelper.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/PlcAutoWriteHelper.cs
index 95e7174..15c2051 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/PlcAutoWriteHelper.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/PlcAutoWriteHelper.cs
@@ -5,6 +5,7 @@ using Mesnac.Action.ChemicalWeighing.AutoControl.DB;
using Mesnac.Action.ChemicalWeighing.AutoControl.Entity;
using Mesnac.Action.ChemicalWeighing.LjMixManager;
using Mesnac.Action.ChemicalWeighing.LjPlanning;
+using Mesnac.Action.ChemicalWeighing.MinAn;
using Mesnac.Controls.Default;
using Mesnac.Core.Service;
using System;
@@ -426,7 +427,7 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
MessageBox.Show("当前未选择产线!");
break;
}
-
+
return isReady;
}
@@ -540,35 +541,42 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
switch (ControlsHelper.SingleSelect(RadioE))
{
case 1:
+ PowderDownSignel(MinAnPlc.Heir1, 1);
DB2105WriteHelper.WriteManScrewH1();
DB2105WriteHelper.WriteSetValueH1(value);
break;
case 2:
+ PowderDownSignel(MinAnPlc.Heir1, 1);
DB2105WriteHelper.WriteManScrewH2();
DB2105WriteHelper.WriteSetValueH1(value);
break;
case 3:
+ PowderDownSignel(MinAnPlc.Heir2, 2);
DB2105WriteHelper.WriteManScrewH3();
DB2105WriteHelper.WriteSetValueH2(value);
break;
case 4:
+ PowderDownSignel(MinAnPlc.Heir2, 2);
DB2105WriteHelper.WriteManScrewH4();
DB2105WriteHelper.WriteSetValueH2(value);
break;
-
case 5:
+ PowderDownSignel(MinAnPlc.Heir3, 3);
DB2105WriteHelper.WriteManScrewH5();
DB2105WriteHelper.WriteSetValueH3(value);
break;
case 6:
+ PowderDownSignel(MinAnPlc.Heir3, 3);
DB2105WriteHelper.WriteManScrewH6();
DB2105WriteHelper.WriteSetValueH3(value);
break;
case 7:
+ PowderDownSignel(MinAnPlc.Heir4, 4);
DB2105WriteHelper.WriteManScrewH7();
DB2105WriteHelper.WriteSetValueH4(value);
break;
case 8:
+ PowderDownSignel(MinAnPlc.Heir4, 4);
DB2105WriteHelper.WriteManScrewH8();
DB2105WriteHelper.WriteSetValueH4(value);
break;
@@ -720,7 +728,7 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
/// 物料集合
/// 步骤集合
/// 数据库物料记录
- private static void DryerGetValue(MCCombobox DryM, MCTextBox DryW, MCTextBox DryT,
+ private static void DryerGetValue(MCCombobox DryM, MCTextBox DryW, MCTextBox DryT,
List recipes, List materials, MCRadioButtonEntity RadioE)
{
int b = Convert.ToInt32(DryM.MCValue.ToString());
@@ -755,5 +763,21 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
#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
}
}
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/WetWaitTime/ExportToPc.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/WetWaitTime/ExportToPc.cs
index 4df9ccf..ec15a59 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/WetWaitTime/ExportToPc.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/WetWaitTime/ExportToPc.cs
@@ -27,7 +27,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.WetWaitTime
this.list = list;
FileName = address;
this.ExportTo();
-
}
public Export(List list)
@@ -64,9 +63,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.WetWaitTime
workbook.SaveAs(this.FileName);
MessageBox.Show("导出成功!");
}
- catch
+ catch(Exception e)
{
- MessageBox.Show("请重新选择导出路径!");
+ MessageBox.Show("请重新选择导出路径或关闭已打开的导出文件! " + e);
}
// 关闭 Excel 应用程序和工作簿对象,并释放资源
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs
index 2a2e917..09bf0b8 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs
@@ -306,7 +306,6 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
record = entity;
FreeSqlUnit.Instance.Insert(entity).ExecuteAffrows();
}
-
//逻辑判断插入数据库
if (Mixes[i] && !record.MixIsReady)
{
@@ -339,6 +338,10 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
.Set(x => x.Done, true)
.Where(x => x.DeviceNo == deviceNo && !x.Done).ExecuteAffrows();
}
+ if (!Mixes[i] && !record.RGVIsReach && record.MixIsReady)
+ {
+ MessageBox.Show("湿混机搅拌完毕指示灯无故熄灭\nRGV小车未到达 接料未结束");
+ }
}
}
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs
index 17a4f66..0c792d6 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs
@@ -888,16 +888,12 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
{
if (MinAnPlc.Heir1)
{
- DialogResult result1 =
- MessageBox.Show("1号罐正在上料", "温馨提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ DialogResult result1 = MessageBox.Show("1号罐正在上料", "温馨提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
if (result1 == DialogResult.OK)
{
return;
}
}
-
-
-
short valueSet;
short valueFast;
short valuePoint;
diff --git a/DataBlockHelper/DBHelpers/DB2105Helper.cs b/DataBlockHelper/DBHelpers/DB2105Helper.cs
index e590fef..7437c2c 100644
--- a/DataBlockHelper/DBHelpers/DB2105Helper.cs
+++ b/DataBlockHelper/DBHelpers/DB2105Helper.cs
@@ -10,7 +10,7 @@ namespace DataBlockHelper.DBHelpers
{
public class DB2105Helper : DBHelper
{
- public DB2105Helper()
+ public DB2105Helper()
{
this.bytes = PlcConnect.Instance.Read("DB2105.0.0", 126).Content;
}
@@ -28,8 +28,8 @@ namespace DataBlockHelper.DBHelpers
{
List ls = new List();
var b = bytes.Skip(52).Take(1).First();
-
- for (int i = 0; i <8; i++)
+
+ for (int i = 0; i < 8; i++)
{
int no = i + 1;
ls.Add(new NoVal()
@@ -37,13 +37,13 @@ namespace DataBlockHelper.DBHelpers
No = no,
Val = b.GetBit(i)
});
-
+
}
return ls;
}
}
-
+
///
/// 获取手动加粉料数据
///
@@ -53,8 +53,8 @@ namespace DataBlockHelper.DBHelpers
{
List ls = new List();
var b = bytes.Skip(53).Take(1).First();
-
- for (int i = 0; i <8; i++)
+
+ for (int i = 0; i < 8; i++)
{
int no = i + 1;
ls.Add(new NoVal()
@@ -62,7 +62,7 @@ namespace DataBlockHelper.DBHelpers
No = no,
Val = b.GetBit(i)
});
-
+
}
return ls;
@@ -92,12 +92,12 @@ namespace DataBlockHelper.DBHelpers
{
int no = i + 1;
var b = bytes.Skip(start).Take(8).ToArray();
-
+
ls.Add(new SetValue()
{
No = no,
- Value = PlcConnect.Instance.ByteTransform.TransSingle(b,0),
- Toterance = PlcConnect.Instance.ByteTransform.TransSingle(b,4),
+ Value = PlcConnect.Instance.ByteTransform.TransSingle(b, 0),
+ Toterance = PlcConnect.Instance.ByteTransform.TransSingle(b, 4),
});
start += 8;
}
@@ -108,40 +108,40 @@ namespace DataBlockHelper.DBHelpers
public List ReadReadyG1 => ReadReady(94);
-
+
public List ReadReadyG2 => ReadReady(96);
public List ReadReadyG3 => ReadReady(98);
-
+
public List ReadReadyG4 => ReadReady(100);
-
+
public List ReadReadyG5 => ReadReady(102);
-
-
+
+
public List ReadReadyG6 => ReadReady(104);
-
-
+
+
public List ReadReadyG7 => ReadReady(106);
-
+
public List ReadReadyG8 => ReadReady(108);
-
-
-
+
+
+
public bool ReadReadyM1 => ReadReadyM(110);
-
+
public bool ReadReadyM2 => ReadReadyM(112);
public bool ReadReadyM3 => ReadReadyM(114);
-
+
public bool ReadReadyM4 => ReadReadyM(116);
-
-
+
+
public bool ReadReadyM5 => ReadReadyM(118);
-
+
public bool ReadReadyM6 => ReadReadyM(120);
public bool ReadReadyM7 => ReadReadyM(122);
-
+
public bool ReadReadyM8 => ReadReadyM(124);
//94
@@ -152,7 +152,7 @@ namespace DataBlockHelper.DBHelpers
var pd = first.GetBit(3);
var cw = first.GetBit(4);
var hw = first.GetBit(5);
-
+
ls.Add(pd);
ls.Add(cw);
ls.Add(hw);
@@ -182,7 +182,7 @@ namespace DataBlockHelper.DBHelpers
public float Toterance { get; set; }
}
-
-
-
+
+
+
}