修改
This commit is contained in:
@@ -961,6 +961,9 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
PrintPalletData(dt_workingIrMsg.Rows[0][0].ToString(), palletCodeMsg, false);
|
||||
LogHelper.WriteLog($"作业托盘:【{palletCodeMsg}】,计数满料业务正常处理完成,数据打印完成。", LogTypeEum.Run);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
else if (currentNum < countFullNum && isFinishWorkingPallet && isForceFullPallet && countFullNum > 0)//强制满料
|
||||
{
|
||||
@@ -1415,6 +1418,33 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
|
||||
LogHelper.WriteLog($"作业IR:【{workingIrMsg}】已经结束,数据库信息重置完成。", LogTypeEum.Run);
|
||||
}
|
||||
|
||||
if (this.NextFullStop)
|
||||
{
|
||||
this.NextFullStop = false;
|
||||
//
|
||||
|
||||
|
||||
if (!Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("StopSys", PlcItemTypeDesc.M))
|
||||
&& !Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("ManualOrAuto", PlcItemTypeDesc.M)))
|
||||
{
|
||||
if (PlcOperationHelper.Instance.WritePlcItem("StopSys", "True", PlcItemTypeDesc.M))
|
||||
{
|
||||
//GlobalHelper.SysIsRunFlag = false;
|
||||
LogHelper.WriteLog($"用户:【{Global.UserInfo.UserName}】点击停止设备按钮,停止信号发送PLC成功!", LogTypeEum.Run);
|
||||
}
|
||||
|
||||
Thread.Sleep(200);
|
||||
|
||||
if (PlcOperationHelper.Instance.WritePlcItem("StopSys", "False", PlcItemTypeDesc.M))
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
private void PrintWorkedIrMsg(string workingIrCodeMsg)
|
||||
{
|
||||
@@ -2374,6 +2404,41 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
}
|
||||
|
||||
private bool _nextFullStop = false;
|
||||
public bool NextFullStop
|
||||
{
|
||||
get
|
||||
{
|
||||
return _nextFullStop;
|
||||
|
||||
}
|
||||
set
|
||||
{
|
||||
_nextFullStop = value;
|
||||
this.BeginInvoke(new Action(() =>
|
||||
{
|
||||
|
||||
this.labelNextFullStop.Visible = value;
|
||||
}));
|
||||
|
||||
//if (value)
|
||||
//{
|
||||
//
|
||||
// thi
|
||||
//} else
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//自动模式下停止 M202 按1 松0 别名 StopSys
|
||||
private void cbt_StopTran_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
@@ -2390,13 +2455,28 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("StopSys", PlcItemTypeDesc.M)) && !Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("ManualOrAuto", PlcItemTypeDesc.M)))
|
||||
|
||||
|
||||
|
||||
if (!Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("StopSys", PlcItemTypeDesc.M))
|
||||
&& !Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("ManualOrAuto", PlcItemTypeDesc.M)))
|
||||
{
|
||||
if (PlcOperationHelper.Instance.WritePlcItem("StopSys", "True", PlcItemTypeDesc.M))
|
||||
if (KryptonMessageBox.Show("是否在下次满料时停止", "是否在下次满料时停止", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
{
|
||||
//GlobalHelper.SysIsRunFlag = false;
|
||||
LogHelper.WriteLog($"用户:【{Global.UserInfo.UserName}】点击停止设备按钮,停止信号发送PLC成功!", LogTypeEum.Run);
|
||||
NextFullStop = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (PlcOperationHelper.Instance.WritePlcItem("StopSys", "True", PlcItemTypeDesc.M))
|
||||
{
|
||||
//GlobalHelper.SysIsRunFlag = false;
|
||||
LogHelper.WriteLog($"用户:【{Global.UserInfo.UserName}】点击停止设备按钮,停止信号发送PLC成功!", LogTypeEum.Run);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
@@ -3305,7 +3385,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
|
||||
private void kbtn_forceFinish_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
kbtn_forceFinish.Enabled = false;
|
||||
|
||||
|
||||
#if RELEASE
|
||||
|
||||
@@ -3332,6 +3412,8 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
return;
|
||||
}
|
||||
DialogResult dr = KryptonMessageBox.Show("Are you sure you want to force the end of the current IR assignment? \n If you continue to reset the current job information, you will need to enter new IR and sheet information.\n Please carefully operation!!!", "Prompt", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
|
||||
kbtn_forceFinish.Enabled = false;
|
||||
if (dr == DialogResult.Yes)
|
||||
{
|
||||
//
|
||||
@@ -3657,5 +3739,15 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
frmMainNew.SwitchFrmMenu(EnumFormType.ShiftCountRecord, false);
|
||||
}
|
||||
|
||||
private void cbt_StopTran_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void labelNextFullStop_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.NextFullStop = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user