This commit is contained in:
gongxh
2022-06-01 14:33:10 +08:00
parent ae42a43f15
commit a7afd29d82
8 changed files with 4436 additions and 269 deletions

View File

@@ -346,19 +346,30 @@ namespace CleanMachineHMI.FrmUserControl
int fullPalletNum = _device.WorkedFullPalletNum;
//
// int remainingQty = 0;
if (0 < (fullPalletNum - currNum) && (fullPalletNum - currNum) <= 10 && fullPalletNum != 0)
{
if ((fullPalletNum - currNum) != remainingQty)
{
frmMainNew.RefreshFrmHost($"The tray is about to fill up and the remaining quantity is [{fullPalletNum - currNum}]!!");
LogHelper.WriteLog($"托盘即将满料,剩余数量为【{fullPalletNum - currNum}】!!", LogTypeEum.Run);
remainingQty = fullPalletNum - currNum;
}
//if ((fullPalletNum - currNum) != remainingQty)
//{
//frmMainNew.RefreshFrmHost($"The tray is about to fill up and the remaining quantity is [{fullPalletNum - currNum}]!!");
int remaining = fullPalletNum - currNum;
frmMainNew.RefreshFrmHost(this.T("The tray is about to fill up and the remaining quantity is [{{remaining}}]!!", "trayfullmsg"
, new { remaining }));
LogHelper.WriteLog($"托盘即将满料,剩余数量为【{fullPalletNum - currNum}】!!", LogTypeEum.Run);
// remainingQty = fullPalletNum - currNum;
//}
}
else
{
remainingQty = fullPalletNum - currNum;
// remainingQty = fullPalletNum - currNum;
frmMainNew.RefreshFrmHost(null);
}
//托盘在当前IR中的数量
@@ -408,6 +419,9 @@ namespace CleanMachineHMI.FrmUserControl
}
cbt_StartTran.BackColor = _device.ManualOrAuto ? Color.Yellow : Color.Lime;
cbt_RunStatusTran.BackColor = _device.CleanMacRunStatusNew ? Color.Lime : Color.Gray;
cbt_Brush1StatusTran.BackColor = _device.Hairbrush1Selection ? Color.Lime : Color.Gray;
@@ -1032,7 +1046,7 @@ namespace CleanMachineHMI.FrmUserControl
new CleanMachine.BLL.CM.IncomingReceipt().Print(workingIrCodeMsg, Global.MacCode, this._reportFolder);
}
private int remainingQty = 0;
// private int remainingQty = 0;
/// <summary>
/// PLC 信号处理
/// </summary>
@@ -1447,6 +1461,7 @@ namespace CleanMachineHMI.FrmUserControl
{
if (PlcOperationHelper.Instance.WritePlcItem("ResetSys", "True", PlcItemTypeDesc.M))
{
this.lastPaltteRemain = 0;
LogHelper.WriteLog($"用户:【{Global.UserInfo.UserName}】点击重置设备按钮,重置信号发送PLC成功!", LogTypeEum.Run);
}
}
@@ -2864,5 +2879,10 @@ namespace CleanMachineHMI.FrmUserControl
{
_device.NextStop = false;
}
private void cbt_ResetSys_Click(object sender, EventArgs e)
{
}
}
}