Browse Source

版本-v1.2.4 上传公共服务器

master
CPL 2 years ago
parent
commit
813f41017e
3 changed files with 38 additions and 1 deletions
  1. +0
    -0
     
  2. +2
    -1
      halftoneproject-master/AssistClient/Device/IOCardDev.cs
  3. +36
    -0
      halftoneproject-master/AssistClient/FrmMain.cs

+ 0
- 0
View File


+ 2
- 1
halftoneproject-master/AssistClient/Device/IOCardDev.cs View File

@@ -244,6 +244,7 @@ namespace AssistClient.Device
//errorCode = instantDiCtrl.ReadBit(startPort, bit, out data); //errorCode = instantDiCtrl.ReadBit(startPort, bit, out data);
if (BioFailed(result)) if (BioFailed(result))
{ {
INEvent?.Invoke(999, 0xff);
//throw new Exception(); //throw new Exception();
continue; continue;
} }
@@ -255,7 +256,7 @@ namespace AssistClient.Device
INEvent?.Invoke(i, DIData[i]); INEvent?.Invoke(i, DIData[i]);
} }
} }
Thread.Sleep(10);
Thread.Sleep(100);
} while (IsInit); } while (IsInit);
} }




+ 36
- 0
halftoneproject-master/AssistClient/FrmMain.cs View File

@@ -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


Loading…
Cancel
Save