|
|
@@ -1584,23 +1584,59 @@ namespace AssistClient |
|
|
{
|
|
|
{
|
|
|
AddTextEvent("中断命令", $"{portIndex}-HEX:{Convert.ToString(data, 16)}");
|
|
|
AddTextEvent("中断命令", $"{portIndex}-HEX:{Convert.ToString(data, 16)}");
|
|
|
if (compareIOInput(CMDName.启动按钮) && this.tsbtnStart.Enabled)
|
|
|
if (compareIOInput(CMDName.启动按钮) && this.tsbtnStart.Enabled)
|
|
|
|
|
|
{
|
|
|
|
|
|
AddTextEvent("中断命令", $"启动-按钮");
|
|
|
startCommand();
|
|
|
startCommand();
|
|
|
|
|
|
AddTextEvent("中断命令", $"启动-完成");
|
|
|
|
|
|
}
|
|
|
else if (compareIOInput(CMDName.暂停按钮) && this.tsbtnPause.Enabled)
|
|
|
else if (compareIOInput(CMDName.暂停按钮) && this.tsbtnPause.Enabled)
|
|
|
|
|
|
{
|
|
|
|
|
|
AddTextEvent("中断命令", $"暂停-按钮");
|
|
|
warning(WarningEnum.Low, false);
|
|
|
warning(WarningEnum.Low, false);
|
|
|
|
|
|
AddTextEvent("中断命令", $"暂停-完成");
|
|
|
|
|
|
}
|
|
|
else if (compareIOInput(CMDName.完成下料) && this.tsbtnGoDownPT.Enabled)
|
|
|
else if (compareIOInput(CMDName.完成下料) && this.tsbtnGoDownPT.Enabled)
|
|
|
|
|
|
{
|
|
|
|
|
|
AddTextEvent("中断命令", $"完成-按钮");
|
|
|
gotoDownPT();
|
|
|
gotoDownPT();
|
|
|
|
|
|
AddTextEvent("中断命令", $"完成-完成");
|
|
|
|
|
|
}
|
|
|
else if (compareIOInput(CMDName.下光源按钮))
|
|
|
else if (compareIOInput(CMDName.下光源按钮))
|
|
|
|
|
|
{
|
|
|
|
|
|
AddTextEvent("中断命令", $"下光源-按钮");
|
|
|
openLowerLight();
|
|
|
openLowerLight();
|
|
|
|
|
|
AddTextEvent("中断命令", $"下光源-完成");
|
|
|
|
|
|
}
|
|
|
else if (compareIOInput(CMDName.上一张图) && currentState == CurrentStateEnum.打标中 && currDefectIndex > 0)
|
|
|
else if (compareIOInput(CMDName.上一张图) && currentState == CurrentStateEnum.打标中 && currDefectIndex > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
AddTextEvent("中断命令", $"上一张图-按钮");
|
|
|
gotoPrePic();
|
|
|
gotoPrePic();
|
|
|
|
|
|
AddTextEvent("中断命令", $"上一张图-完成");
|
|
|
|
|
|
}
|
|
|
else if (compareIOInput(CMDName.下一张图) && currentState == CurrentStateEnum.打标中 && currDefectIndex < defectList.Count - 1)
|
|
|
else if (compareIOInput(CMDName.下一张图) && currentState == CurrentStateEnum.打标中 && currDefectIndex < defectList.Count - 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
AddTextEvent("中断命令", $"下一张图-按钮");
|
|
|
gotoNextPic();
|
|
|
gotoNextPic();
|
|
|
|
|
|
AddTextEvent("中断命令", $"下一张图-完成");
|
|
|
|
|
|
}
|
|
|
else if (compareIOInput(CMDName.上一缺陷) && currentState == CurrentStateEnum.打标中 && currDefectIndex > 0)
|
|
|
else if (compareIOInput(CMDName.上一缺陷) && currentState == CurrentStateEnum.打标中 && currDefectIndex > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
AddTextEvent("中断命令", $"上一缺陷-按钮");
|
|
|
gotoDefctListIndex(--currDefectIndex, currDefectIndex + 1);
|
|
|
gotoDefctListIndex(--currDefectIndex, currDefectIndex + 1);
|
|
|
|
|
|
AddTextEvent("中断命令", $"上一缺陷-完成");
|
|
|
|
|
|
}
|
|
|
else if (compareIOInput(CMDName.下一缺陷) && currentState == CurrentStateEnum.打标中 && currDefectIndex < defectList.Count - 1)
|
|
|
else if (compareIOInput(CMDName.下一缺陷) && currentState == CurrentStateEnum.打标中 && currDefectIndex < defectList.Count - 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
AddTextEvent("中断命令", $"下一缺陷-按钮");
|
|
|
gotoDefctListIndex(++currDefectIndex, currDefectIndex - 1);
|
|
|
gotoDefctListIndex(++currDefectIndex, currDefectIndex - 1);
|
|
|
|
|
|
AddTextEvent("中断命令", $"下一缺陷-完成");
|
|
|
|
|
|
}
|
|
|
else if (compareIOInput(CMDName.复位按钮) && this.tsbtnReset.Enabled)
|
|
|
else if (compareIOInput(CMDName.复位按钮) && this.tsbtnReset.Enabled)
|
|
|
|
|
|
{
|
|
|
|
|
|
AddTextEvent("中断命令", $"复位-按钮");
|
|
|
resetCommand();
|
|
|
resetCommand();
|
|
|
|
|
|
AddTextEvent("中断命令", $"复位-完成");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
//
|
|
|
//
|
|
|
if (devContainer.state && warningLevel == WarningEnum.Normal
|
|
|
if (devContainer.state && warningLevel == WarningEnum.Normal
|
|
|
|